hdx.freshness.database.dbinfodataset
SQLAlchemy class representing DBInfoDataset row. Holds static dataset metadata.
DBInfoDataset Objects
class DBInfoDataset(Base)
id: Mapped[str] = mapped_column(primary_key=True) name: Mapped[str] = mapped_column(nullable=False) title: Mapped[str] = mapped_column(nullable=False) private: Mapped[bool] = mapped_column(nullable=False) organization_id: Mapped[str] = mapped_column( ForeignKey("dborganizations.id"), nullable=False ) location: Mapped[str] = mapped_column(nullable=True) maintainer: Mapped[str] = mapped_column(nullable=True)
__repr__
def __repr__() -> str
String representation of DBInfoDataset row
Returns:
str
- String representation of DBInfoDataset row
hdx.freshness.database.dbdataset
SQLAlchemy class representing DBDataset row. Holds dynamic dataset metadata for each run.
DBDataset Objects
class DBDataset(Base)
run_number: Mapped[int] = mapped_column( ForeignKey("dbruns.run_number"), primary_key=True ) id: Mapped[str] = mapped_column( ForeignKey("dbinfodatasets.id"), primary_key=True ) dataset_date: Mapped[str] = mapped_column(nullable=True) update_frequency: Mapped[int] = mapped_column(nullable=True) review_date: Mapped[datetime] = mapped_column(nullable=True) last_modified: Mapped[datetime] = mapped_column(nullable=False) updated_by_script: Mapped[datetime] = mapped_column(nullable=True) metadata_modified: Mapped[datetime] = mapped_column( nullable=False ) # this field and above are CKAN fields
latest_of_modifieds: Mapped[datetime] = mapped_column(nullable=False) what_updated: Mapped[str] = mapped_column(nullable=False) last_resource_updated: Mapped[str] = mapped_column( nullable=False ) # id of last resource updated last_resource_modified: Mapped[datetime] = mapped_column( nullable=False ) # date last resource updated fresh: Mapped[int] = mapped_column(nullable=True) error: Mapped[bool] = mapped_column(nullable=False)
metadata_modified
this field and above are CKAN fields
last_resource_updated
id of last resource updated
last_resource_modified
date last resource updated
__repr__
def __repr__() -> str
String representation of DBDataset row
Returns:
str
- String representation of DBDataset row
hdx.freshness.database.dbresource
SQLAlchemy class representing DBResource row. Holds dynamic resource metadata for each run.
DBResource Objects
class DBResource(Base)
run_number: Mapped[int] = mapped_column( ForeignKey("dbruns.run_number"), primary_key=True ) id: Mapped[str] = mapped_column(primary_key=True) name: Mapped[str] = mapped_column(nullable=False) dataset_id: Mapped[str] = mapped_column( ForeignKey("dbinfodatasets.id"), nullable=False ) url: Mapped[str] = mapped_column(nullable=False) last_modified: Mapped[datetime] = mapped_column(nullable=False) metadata_modified: Mapped[datetime] = mapped_column( default=None, nullable=True ) # this field and above are CKAN fields
latest_of_modifieds: Mapped[datetime] = mapped_column(nullable=False) what_updated: Mapped[str] = mapped_column(nullable=False) http_last_modified: Mapped[datetime] = mapped_column( default=None, nullable=True ) md5_hash: Mapped[str] = mapped_column(default=None, nullable=True) hash_last_modified: Mapped[datetime] = mapped_column( default=None, nullable=True ) when_checked: Mapped[datetime] = mapped_column(default=None, nullable=True) api: Mapped[bool] = mapped_column(nullable=True) error: Mapped[str] = mapped_column(nullable=True)
metadata_modified
this field and above are CKAN fields
__repr__
def __repr__() -> str
String representation of DBResource row
Returns:
str
- String representation of DBResource row
hdx.freshness.database.dbrun
SQLAlchemy class representing DBRun row. Holds date of each run.
DBRun Objects
class DBRun(Base)
run_number: Mapped[int] = mapped_column(primary_key=True) run_date: Mapped[datetime] = mapped_column(nullable=False)
__repr__
def __repr__() -> str
String representation of DBRun row
Returns:
str
- String representation of DBRun row
hdx.freshness.database.dborganization
SQLAlchemy class representing DBOrganization row. Holds static organisation metadata.
DBOrganization Objects
class DBOrganization(Base)
id: Mapped[str] = mapped_column(primary_key=True) name: Mapped[str] = mapped_column(nullable=False) title: Mapped[str] = mapped_column(nullable=False)
__repr__
def __repr__() -> str
String representation of DBOrganization row
Returns:
str
- String representation of DBOrganization row