catalog.models.Dataset
- class catalog.models.Dataset(*args, **kwargs)[source]
Pre-canned dataset model.
- id
The primary key for the dataset as stored in the website’s main database.
- Type:
django.models.UUIDField
- query
The query used to produce a dataset is itself modeled and stored in the database - this field is the query’s name.
- Type:
django.models.ForeignKeyofexplorer.models.Query
- sql
This is the SQL query used to generate the dataset from the database.
- Type:
django.models.TextField
- version
Datasets are versioned to distinguish between those generated by the same query at different times in the lifetime of the database. I.e., different snapshots as the database contents grows.
- Type:
django.models.CharField
- name
This is the name given to the dataset.
- Type:
django.models.CharField
- description
A more verbose text describing the semantics and contents of this particular dataset.
- Type:
django.models.TextField
- file
This is the link to the zip file. Click to download.
- Type:
django.models.FileField
- app_version
The version of the application deployed and thus used to generate the dataset.
- Type:
django.models.CharField
- sha256
The SHA-256 checksum of the entire zip file.
- Type:
django.models.CharField
- n_rows
The number of rows in the zipped data file. Depending on the query, this could be the total number of patients or something else.
- Type:
django.models.IntegerField
- data_sha256
The SHA-256 checksum of the data file archived within the zip file.
- Type:
django.models.IntegerField
- spectral_data_filenames
A list of all the file names for all individual spectral data files zipped within the downloadable zip file.
- Type:
django.models.JSONField
- __init__(*args, **kwargs)
Methods
__init__(*args, **kwargs)adelete(*args, **kwargs)arefresh_from_db([using, fields, from_queryset])asave(*args, **kwargs)check(**kwargs)clean(*args, **kwargs)Model validation.
clean_fields([exclude])Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur.
compute_checksum()Compute Checksum of zipped dataset file.
date_error_message(lookup_type, field_name, ...)delete(*args[, delete_files])execute_query()Execute the SQL query against the database to produce the resultant data that is the cataloged dataset.
from_db(db, field_names, values)full_clean([exclude, validate_unique, ...])Call clean_fields(), clean(), validate_unique(), and validate_constraints() on the model.
get_column_names([help_text])get_constraints()get_deferred_fields()Return a set containing names of deferred fields for this instance.
get_exporter()Get exporter handler for generating downloadable file content.
get_filename()Return filename.
get_next_by_created_at(*[, field, is_next])get_next_by_updated_at(*[, field, is_next])get_orphan_files()Return list of orphaned files that exist within the file system but don't have entries in the database.
get_previous_by_created_at(*[, field, is_next])get_previous_by_updated_at(*[, field, is_next])meta_info(**kwargs)Generate Meta Info
prepare_database_save(field)refresh_from_db([using, fields, from_queryset])Reload field values from the database.
save(*args, **kwargs)Save the current instance.
save_base([raw, force_insert, force_update, ...])Handle the parts of saving which should be done only once per save, yet need to be done in raw saves, too.
serializable_value(field_name)Return the value of the field name for this instance.
unique_error_message(model_class, unique_check)validate_constraints([exclude])validate_unique([exclude])Check unique constraints on the model and raise ValidationError if any failed.
Attributes
UPLOAD_DIRA wrapper for a deferred-loading field.
created_atA wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like::.
A wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
objectspkAccessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
query_idA wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
updated_atA wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.