Dataset

@AggregateRoot(lifecycle = [], ownership = Ownership.TENANT)
@Description(value = "A wide table over the catalog's sources: its definition, its versions and where each is published")
class Dataset(state: DatasetState)

A wide table over the catalog's sources (-2), named as its queries read it, <context>.<name>: an analyst drafts and revises its definition, which the catalog checks against its sources as they are each time (DatasetBinder), and publishes it, each version compiled into its own view (DatasetCompiler) which the publication creates in the warehouse; queries read the current version until the dataset is switched back to another or retired, whose views are dropped once the retention ends.

Constructors

Link copied to clipboard
constructor(state: DatasetState)

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Compiles the published definition again after a source changed (-2). The same compilation changes nothing (or clears a revision it needed). Another one is published as the next version only when its contract holds: the view gives the same columns, by name and type, as the published one, and it takes no new approval, so only its masking or its rendering differs. Anything else (a definition that no longer compiles, columns that would change, a new approval) marks the dataset as needing revision; the published version goes on serving while its view still gives the columns it was published with, and is refused otherwise.

Link copied to clipboard
Link copied to clipboard

Replaces the definition and title, checked as a draft's are. A dataset that needs revision says, from then on, what is wrong with the revised definition rather than with the one it replaced: none of it once the revision compiles, which a publication then serves.

Link copied to clipboard

Serves an earlier version again only as a publication of it would be served today: its definition is compiled against the sources as they are now, as onPublish compiles one. A definition that no longer compiles is refused, a source the catalog may not read among its reasons. One whose publication would take an approver is requested of one, who then publishes it as the next version. One that compiles to what the version was published as is served again as that version, its view created again if it went. Any other is published as the next version, with the protection its sources give today. So a rollback never serves a value or a row that a publication of the same definition would not.