Skip to main content

data_sources

Creates, updates, deletes, gets or lists a data_sources resource.

Overview

Namedata_sources
TypeResource
Iddatabricks_workspace.sql.data_sources

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringData source ID maps to the ID of the data source used by the resource and is distinct from the warehouse ID. [Learn more] [Learn more]: https://docs.databricks.com/api/workspace/datasources/list
namestringThe string name of this data source / SQL warehouse as it appears in the Databricks SQL web application.
warehouse_idstringThe ID of the associated SQL warehouse, if this data source is backed by a SQL warehouse.
pause_reasonstringReserved for internal use.
pausedintegerReserved for internal use.
supports_auto_limitbooleanReserved for internal use.
syntaxstringReserved for internal use.
typestringThe type of data source. For SQL warehouses, this will be `databricks_internal`.
view_onlybooleanReserved for internal use.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectdeployment_nameRetrieves a full list of SQL warehouses available in this workspace. All fields that appear in this

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)

SELECT examples

Retrieves a full list of SQL warehouses available in this workspace. All fields that appear in this

SELECT
id,
name,
warehouse_id,
pause_reason,
paused,
supports_auto_limit,
syntax,
type,
view_only
FROM databricks_workspace.sql.data_sources
WHERE deployment_name = '{{ deployment_name }}' -- required
;