Data Catalog
Description
A Data Catalog is a catalog, such as DataHub, that Hop reads dataset metadata from: whether a dataset exists, whether it is deprecated, when its data last changed and how the checks the catalog runs on it went. The catalog stays the owner of that metadata. Hop only reads it.
The Check data catalog action uses a Data Catalog to check datasets before a workflow goes on.
The Mask fields transform can use one to mask the fields that carry a tag or glossary term, such as PII.
The AI Assistant can include what a Data Catalog says about the tables and files of a pipeline (descriptions, owners, tags, glossary terms, deprecation) in its questions.
CSV file input and Text file input can fill their fields from one.
This metadata type is experimental: its options and what the catalog types can answer may still change.
Options
| Option | Description |
|---|---|
Name |
The name of the Data Catalog. |
Description |
A description of the Data Catalog. |
Catalog type |
The kind of catalog. The options below it depend on it. A catalog type comes with a plugin, so the list only shows the types of the plugins that are installed. |
Test (button at the bottom) |
Connects to the catalog with the options on the screen and the current variables, and shows the answer: the version of the catalog and the user Hop reads as, or why it could not be used. |
How datasets are found
Hop names a dataset the same way the DataHub lineage plugin does, so a catalog finds the dataset that lineage wrote to it.
The OpenLineage plugin names tables the same way, and files too when HOP_LINEAGE_OPENLINEAGE_FILE_SPEC_NAMING is Y.
-
A table: the host and port of its relational connection, and
database.schema.table. A table without a schema gets the preferred schema of the connection, and the database name of the connection is always added. A connection without a host, such as an embedded database or a connection with a manual URL, gives a table no name to look for: use its catalog id instead. -
A file: its path or URL, after the variables in it are resolved.
-
A catalog id: the id the catalog itself uses, for example a DataHub URN. Use it for a dataset that Hop doesn’t read or write itself.
Get fields from a data catalog
When the project has a Data Catalog, the CSV file input and Text file input dialogs have a Get fields from data catalog button. It asks for the Data Catalog and the dataset, which starts as the file of the transform, reads the fields the catalog has for it and fills the field table, after asking whether to add the new fields, add all of them or replace the table. A file that a Hop pipeline wrote with the DataHub lineage plugin enabled has its fields in DataHub, so the pipeline that reads it can start from them.
This happens only in the dialog: the transform keeps the fields it was given, and nothing is read from the catalog when the pipeline runs, so a change in the catalog never changes a run.
The native type of a field gives its Hop type, length and precision: VARCHAR(255) is a String of length 255, DECIMAL(10,2) a BigNumber with length 10 and precision 2, NUMERIC(10) an Integer, TIMESTAMP a Timestamp, TIME a Date, BIT a Boolean and BIT(8) a String of length 8.
A length too large for Hop, such as varchar(4294967295), leaves the field without a length.
Modifiers such as UNSIGNED don’t change the type, except that a BIGINT UNSIGNED is a BigNumber, as when Hop reads it from a database.
Dialect names such as INT64, FLOAT64, TIMESTAMP_NTZ and DATETIMEOFFSET are known too.
A native type Hop doesn’t know falls back to the catalog’s own type, and to a String after that.
A catalog has no formats, so a date gets none and uses Hop’s default format, yyyy/MM/dd HH:mm:ss.SSS. That is what Hop writes to a file when the output has no format of its own; check it against the file.
DataHub
The DataHub catalog type comes with the DataHub plugin. It reads from DataHub’s GraphQL API, with fields that DataHub has had since version 1.0.
| Option | Description | Default |
|---|---|---|
DataHub GMS URL |
The URL of DataHub’s metadata service (GMS), for example |
|
Access token |
A personal access token, with the right to view the datasets and their assertions. Leave it empty when DataHub doesn’t use token authentication. |
|
Environment |
The environment (fabric) in the dataset URNs, for example |
|
Connect timeout (ms) |
How long to wait for a connection to DataHub. |
|
Read timeout (ms) |
How long to wait for DataHub to answer a question. |
|
Trust store, Trust store password, Trust store type |
A trust store with the certificate of a DataHub whose certificate Java doesn’t trust, its password and its type ( |
|
Database platform instances |
A relational connection and the |
Every option takes variables, for example '${DATAHUB_URL}' and '${DATAHUB_TOKEN}'.
What DataHub answers:
-
Exists: whether DataHub has the dataset.
-
Deprecated: the deprecation set on the dataset in DataHub, with its note.
-
Last change: the newest operation DataHub has for the dataset. DataHub learns about operations from the sources that report them, such as the usage ingestion of some warehouses or dbt. The DataHub lineage sink reports one for each file and table a successful Hop run writes, so a dataset that only Hop writes has a last change too.
-
Assertions: the latest run of each assertion on the dataset, up to 100 assertions. The assertions themselves are defined and run in DataHub.
-
Fields: the fields of the dataset’s schema, with the tags and glossary terms on them, both the ones that came with the ingested schema and the ones added in DataHub. The Mask fields transform uses them.