Skip to content

SqlQuery

laktory.models.resources.databricks.SqlQuery ¤

Bases: BaseModel, PulumiResource, TerraformResource

Databricks SQL Query

ATTRIBUTE DESCRIPTION
access_controls

SQL Query access controls

TYPE: list[AccessControl]

comment

General description that conveys additional information about this query such as usage notes.

TYPE: str

data_source_id

Data source ID of the SQL warehouse that will be used to run the query.

TYPE: str

name

The title of this query that appears in list views, widget headings, and on the query page.

TYPE: str

parent

Id of the workspace folder storing the query

TYPE: str

query

The text of the query to be run.

TYPE: str

run_as_role

Run as role.

TYPE: Literal['viewer', 'owner']

tags

List of tags

TYPE: list[str]

Examples:

from laktory import models

q = models.resources.databricks.SqlQuery(
    name="create-view",
    query="CREATE VIEW google_stock_prices AS SELECT * FROM stock_prices WHERE symbol = 'GOOGL'",
    data_source_id="09z739ce103q9374",
    parent="folders/2479128258235163",
    access_controls=[
        {
            "group_name": "role-engineers",
            "permission_level": "CAN_RUN",
        }
    ],
)

Attributes¤

additional_core_resources property ¤

additional_core_resources
  • permissions