Databricks SQL Warehouse - Download Query Results to Platform
Overviewβ
Quickly download the results of Databricks SQL query to Platform. 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 Platform
Variablesβ
Name | Reference | Type | Required | Default | Options | Description |
---|---|---|---|---|---|---|
Access Token | DATABRICKS_SQL_ACCESS_TOKEN | Password | β | - | - | The access token generated in Databricks for programatic access |
Databricks Server Host | DATABRICKS_SQL_SERVER_HOST | Alphanumeric | β | - | - | The URL address of the SQL warehouse |
Warehouse HTTP Path | DATABRICKS_SQL_HTTP_PATH | Alphanumeric | β | - | - | The extended path for the SQL warehouse |
Catalog | DATABRICKS_SQL_CATALOG | Alphanumeric | β | - | - | The optional catalog to connect to. If none is provided, this will default to Hive Metastore |
Schema | DATABRICKS_SQL_SCHEMA | Alphanumeric | β | - | - | The optional schema to connect to. If none is provided, the blueprint will connect to the default schema |
Query | DATABRICKS_SQL_QUERY | Alphanumeric | β | - | - | The query to send to Databricks |
Shipyard Folder Name | DATABRICKS_SQL_FOLDER_NAME | Alphanumeric | β | - | - | The optional name of the folder where the file in Platform is located |
Shipyard File Name | DATABRICKS_SQL_FILE_NAME | Alphanumeric | β | - | - | The name of the outputted file |
File Type | DATABRICKS_SQL_FILE_TYPE | Select | β | csv | CSV: 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'