Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Data FAIR logo @data-fair/catalog-databricks

Databricks plugin for the Data Fair catalogs service.

The catalog browses Unity Catalog catalogs, then schemas, then tables and views, and imports each table or view as a CSV file. If the catalog field of the configuration is set, the catalog starts directly at the schemas of this catalog. This is a browsing shortcut, not an access restriction: access is governed by the privileges of the configured identity.

Requirements

  • A Databricks workspace with Unity Catalog.
  • The HTTPS URL of the workspace. Only the public, government and sovereign cloud domains are accepted (*.cloud.databricks.com, *.cloud.databricks.us, *.gcp.databricks.com, *.azuredatabricks.net, *.databricks.azure.us, *.databricks.azure.cn).
  • A SQL warehouse dedicated to the export, and its ID. The identity needs CAN USE on this warehouse.
  • USE CATALOG, USE SCHEMA and SELECT on the imported tables.
  • If the workspace restricts IP addresses, the egress of the catalogs service must be allowed. The storage holding the query results must also be reachable from the catalogs service.

Authentication

  • OAuth (recommended by Databricks): the client ID and an OAuth secret of a service principal. Access tokens are requested and renewed automatically.
  • Personal access token: preferably one belonging to a service principal. Workspace admins can disable these tokens.

The token and the client secret are stored as catalog secrets and masked in the configuration.

The connection test checks the credentials, the warehouse and the catalog (when set), without running a query, so saving a catalog does not start a warehouse.

Notes

  • The search filters the results of the current list by name.
  • Catalog, schema and table names are always quoted, so names with special characters are supported.
  • Exports run SELECT * on the warehouse through the Statement Execution API, with a 1 hour timeout after which the statement is canceled. A warehouse can take minutes to start. Results are downloaded chunk by chunk and streamed to the CSV file, so a table is never loaded in memory.
  • The number of exported rows is checked against the one announced by Databricks, and temporary failures are retried (expired links are renewed).
  • Values are written so that data-fair detects their types: TIMESTAMP as instants (in UTC when Databricks gives no time zone, which assumes the default session time zone of the warehouse), TIMESTAMP_NTZ without time zone nor fractional seconds (interpreted in the data-fair default time zone), NULL as empty values. Other types, such as BINARY, INTERVAL, ARRAY, MAP, STRUCT and VARIANT, are imported as strings.

Known limits

  • The Statement Execution API limits an export to 100 GiB. Beyond that, the import fails explicitly instead of being truncated: bigger tables have to be exported differently (for example with COPY INTO to a Unity Catalog volume).
  • Metric views are not listed, as they do not support SELECT *.
  • Only import is supported, not the publication of a Data Fair dataset to Databricks.
  • Only Unity Catalog is supported, not the legacy Hive metastore.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages