Skip to main content

Databricks SQL Warehouse - Download Query Results to Shipyard

Overview​

Quickly download the results of Databricks SQL query to Shipyard. You can choose to output the results as a CSV or a Parquet file.

Recommended Setup Although they are not required in order to connect, it is recommended that you provide the Catalog and the Schema that you will query. By not doing so, the connection will resort to the defaults and it is possible that the query will fail if the tables don't reside in the default schema and catalog.

NOTE This will not download the file to your local computer, but to the home directory within Shipyard

Variables​

NameReferenceTypeRequiredDefaultOptionsDescription
Access TokenDATABRICKS_SQL_ACCESS_TOKENPasswordβœ…--The access token generated in Databricks for programatic access
Databricks Server HostDATABRICKS_SQL_SERVER_HOSTAlphanumericβœ…--The URL address of the SQL warehouse
Warehouse HTTP PathDATABRICKS_SQL_HTTP_PATHAlphanumericβœ…--The extended path for the SQL warehouse
CatalogDATABRICKS_SQL_CATALOGAlphanumericβž–--The optional catalog to connect to. If none is provided, this will default to Hive Metastore
SchemaDATABRICKS_SQL_SCHEMAAlphanumericβž–--The optional schema to connect to. If none is provided, the blueprint will connect to the default schema
QueryDATABRICKS_SQL_QUERYAlphanumericβœ…--The query to send to Databricks
Shipyard Folder NameDATABRICKS_SQL_FOLDER_NAMEAlphanumericβž–--The optional name of the folder where the file in Shipyard is located
Shipyard File NameDATABRICKS_SQL_FILE_NAMEAlphanumericβœ…--The name of the outputted file
File TypeDATABRICKS_SQL_FILE_TYPESelectβœ…csvCSV: csv

Parquet: parquet

The file type to load

YAML​

Below is the YAML template for this Blueprint and can be used in the Fleet YAML Editor.

source:
blueprint: Databricks SQL Warehouse - Download Query Results to Shipyard
inputs:
DATABRICKS_SQL_ACCESS_TOKEN: null ## REQUIRED
DATABRICKS_SQL_SERVER_HOST: null ## REQUIRED
DATABRICKS_SQL_HTTP_PATH: null ## REQUIRED
DATABRICKS_SQL_CATALOG: null
DATABRICKS_SQL_SCHEMA: null
DATABRICKS_SQL_QUERY: null ## REQUIRED
DATABRICKS_SQL_FOLDER_NAME: null
DATABRICKS_SQL_FILE_NAME: null ## REQUIRED
DATABRICKS_SQL_FILE_TYPE: csv ## REQUIRED
type: BLUEPRINT
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- '200'
- '202'
- '203'
- '204'
- '205'
- '206'
- '207'
- '208'
- '209'
- '210'
- '211'
- '249'