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.
- 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 USEon this warehouse. USE CATALOG,USE SCHEMAandSELECTon 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.
- 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.
- 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:
TIMESTAMPas instants (in UTC when Databricks gives no time zone, which assumes the default session time zone of the warehouse),TIMESTAMP_NTZwithout time zone nor fractional seconds (interpreted in the data-fair default time zone),NULLas empty values. Other types, such asBINARY,INTERVAL,ARRAY,MAP,STRUCTandVARIANT, are imported as strings.
- 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 INTOto 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.