databricks.Query
Explore with Pulumi AI
Import
This resource can be imported using query ID:
bash
$ pulumi import databricks:index/query:Query this <query-id>
Create Query Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Query(name: string, args: QueryArgs, opts?: CustomResourceOptions);
@overload
def Query(resource_name: str,
args: QueryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Query(resource_name: str,
opts: Optional[ResourceOptions] = None,
display_name: Optional[str] = None,
query_text: Optional[str] = None,
warehouse_id: Optional[str] = None,
apply_auto_limit: Optional[bool] = None,
catalog: Optional[str] = None,
description: Optional[str] = None,
owner_user_name: Optional[str] = None,
parameters: Optional[Sequence[QueryParameterArgs]] = None,
parent_path: Optional[str] = None,
run_as_mode: Optional[str] = None,
schema: Optional[str] = None,
tags: Optional[Sequence[str]] = None)
func NewQuery(ctx *Context, name string, args QueryArgs, opts ...ResourceOption) (*Query, error)
public Query(string name, QueryArgs args, CustomResourceOptions? opts = null)
type: databricks:Query
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args QueryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args QueryArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args QueryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args QueryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args QueryArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var queryResource = new Databricks.Query("queryResource", new()
{
DisplayName = "string",
QueryText = "string",
WarehouseId = "string",
ApplyAutoLimit = false,
Catalog = "string",
Description = "string",
OwnerUserName = "string",
Parameters = new[]
{
new Databricks.Inputs.QueryParameterArgs
{
Name = "string",
DateRangeValue = new Databricks.Inputs.QueryParameterDateRangeValueArgs
{
DateRangeValue = new Databricks.Inputs.QueryParameterDateRangeValueDateRangeValueArgs
{
End = "string",
Start = "string",
},
DynamicDateRangeValue = "string",
Precision = "string",
StartDayOfWeek = 0,
},
DateValue = new Databricks.Inputs.QueryParameterDateValueArgs
{
DateValue = "string",
DynamicDateValue = "string",
Precision = "string",
},
EnumValue = new Databricks.Inputs.QueryParameterEnumValueArgs
{
EnumOptions = "string",
MultiValuesOptions = new Databricks.Inputs.QueryParameterEnumValueMultiValuesOptionsArgs
{
Prefix = "string",
Separator = "string",
Suffix = "string",
},
Values = new[]
{
"string",
},
},
NumericValue = new Databricks.Inputs.QueryParameterNumericValueArgs
{
Value = 0,
},
QueryBackedValue = new Databricks.Inputs.QueryParameterQueryBackedValueArgs
{
QueryId = "string",
MultiValuesOptions = new Databricks.Inputs.QueryParameterQueryBackedValueMultiValuesOptionsArgs
{
Prefix = "string",
Separator = "string",
Suffix = "string",
},
Values = new[]
{
"string",
},
},
TextValue = new Databricks.Inputs.QueryParameterTextValueArgs
{
Value = "string",
},
Title = "string",
},
},
ParentPath = "string",
RunAsMode = "string",
Schema = "string",
Tags = new[]
{
"string",
},
});
example, err := databricks.NewQuery(ctx, "queryResource", &databricks.QueryArgs{
DisplayName: pulumi.String("string"),
QueryText: pulumi.String("string"),
WarehouseId: pulumi.String("string"),
ApplyAutoLimit: pulumi.Bool(false),
Catalog: pulumi.String("string"),
Description: pulumi.String("string"),
OwnerUserName: pulumi.String("string"),
Parameters: databricks.QueryParameterArray{
&databricks.QueryParameterArgs{
Name: pulumi.String("string"),
DateRangeValue: &databricks.QueryParameterDateRangeValueArgs{
DateRangeValue: &databricks.QueryParameterDateRangeValueDateRangeValueArgs{
End: pulumi.String("string"),
Start: pulumi.String("string"),
},
DynamicDateRangeValue: pulumi.String("string"),
Precision: pulumi.String("string"),
StartDayOfWeek: pulumi.Int(0),
},
DateValue: &databricks.QueryParameterDateValueArgs{
DateValue: pulumi.String("string"),
DynamicDateValue: pulumi.String("string"),
Precision: pulumi.String("string"),
},
EnumValue: &databricks.QueryParameterEnumValueArgs{
EnumOptions: pulumi.String("string"),
MultiValuesOptions: &databricks.QueryParameterEnumValueMultiValuesOptionsArgs{
Prefix: pulumi.String("string"),
Separator: pulumi.String("string"),
Suffix: pulumi.String("string"),
},
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
NumericValue: &databricks.QueryParameterNumericValueArgs{
Value: pulumi.Float64(0),
},
QueryBackedValue: &databricks.QueryParameterQueryBackedValueArgs{
QueryId: pulumi.String("string"),
MultiValuesOptions: &databricks.QueryParameterQueryBackedValueMultiValuesOptionsArgs{
Prefix: pulumi.String("string"),
Separator: pulumi.String("string"),
Suffix: pulumi.String("string"),
},
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
TextValue: &databricks.QueryParameterTextValueArgs{
Value: pulumi.String("string"),
},
Title: pulumi.String("string"),
},
},
ParentPath: pulumi.String("string"),
RunAsMode: pulumi.String("string"),
Schema: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var queryResource = new Query("queryResource", QueryArgs.builder()
.displayName("string")
.queryText("string")
.warehouseId("string")
.applyAutoLimit(false)
.catalog("string")
.description("string")
.ownerUserName("string")
.parameters(QueryParameterArgs.builder()
.name("string")
.dateRangeValue(QueryParameterDateRangeValueArgs.builder()
.dateRangeValue(QueryParameterDateRangeValueDateRangeValueArgs.builder()
.end("string")
.start("string")
.build())
.dynamicDateRangeValue("string")
.precision("string")
.startDayOfWeek(0)
.build())
.dateValue(QueryParameterDateValueArgs.builder()
.dateValue("string")
.dynamicDateValue("string")
.precision("string")
.build())
.enumValue(QueryParameterEnumValueArgs.builder()
.enumOptions("string")
.multiValuesOptions(QueryParameterEnumValueMultiValuesOptionsArgs.builder()
.prefix("string")
.separator("string")
.suffix("string")
.build())
.values("string")
.build())
.numericValue(QueryParameterNumericValueArgs.builder()
.value(0)
.build())
.queryBackedValue(QueryParameterQueryBackedValueArgs.builder()
.queryId("string")
.multiValuesOptions(QueryParameterQueryBackedValueMultiValuesOptionsArgs.builder()
.prefix("string")
.separator("string")
.suffix("string")
.build())
.values("string")
.build())
.textValue(QueryParameterTextValueArgs.builder()
.value("string")
.build())
.title("string")
.build())
.parentPath("string")
.runAsMode("string")
.schema("string")
.tags("string")
.build());
query_resource = databricks.Query("queryResource",
display_name="string",
query_text="string",
warehouse_id="string",
apply_auto_limit=False,
catalog="string",
description="string",
owner_user_name="string",
parameters=[{
"name": "string",
"date_range_value": {
"date_range_value": {
"end": "string",
"start": "string",
},
"dynamic_date_range_value": "string",
"precision": "string",
"start_day_of_week": 0,
},
"date_value": {
"date_value": "string",
"dynamic_date_value": "string",
"precision": "string",
},
"enum_value": {
"enum_options": "string",
"multi_values_options": {
"prefix": "string",
"separator": "string",
"suffix": "string",
},
"values": ["string"],
},
"numeric_value": {
"value": 0,
},
"query_backed_value": {
"query_id": "string",
"multi_values_options": {
"prefix": "string",
"separator": "string",
"suffix": "string",
},
"values": ["string"],
},
"text_value": {
"value": "string",
},
"title": "string",
}],
parent_path="string",
run_as_mode="string",
schema="string",
tags=["string"])
const queryResource = new databricks.Query("queryResource", {
displayName: "string",
queryText: "string",
warehouseId: "string",
applyAutoLimit: false,
catalog: "string",
description: "string",
ownerUserName: "string",
parameters: [{
name: "string",
dateRangeValue: {
dateRangeValue: {
end: "string",
start: "string",
},
dynamicDateRangeValue: "string",
precision: "string",
startDayOfWeek: 0,
},
dateValue: {
dateValue: "string",
dynamicDateValue: "string",
precision: "string",
},
enumValue: {
enumOptions: "string",
multiValuesOptions: {
prefix: "string",
separator: "string",
suffix: "string",
},
values: ["string"],
},
numericValue: {
value: 0,
},
queryBackedValue: {
queryId: "string",
multiValuesOptions: {
prefix: "string",
separator: "string",
suffix: "string",
},
values: ["string"],
},
textValue: {
value: "string",
},
title: "string",
}],
parentPath: "string",
runAsMode: "string",
schema: "string",
tags: ["string"],
});
type: databricks:Query
properties:
applyAutoLimit: false
catalog: string
description: string
displayName: string
ownerUserName: string
parameters:
- dateRangeValue:
dateRangeValue:
end: string
start: string
dynamicDateRangeValue: string
precision: string
startDayOfWeek: 0
dateValue:
dateValue: string
dynamicDateValue: string
precision: string
enumValue:
enumOptions: string
multiValuesOptions:
prefix: string
separator: string
suffix: string
values:
- string
name: string
numericValue:
value: 0
queryBackedValue:
multiValuesOptions:
prefix: string
separator: string
suffix: string
queryId: string
values:
- string
textValue:
value: string
title: string
parentPath: string
queryText: string
runAsMode: string
schema: string
tags:
- string
warehouseId: string
Query Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Query resource accepts the following input properties:
- Display
Name string - Name of the query.
- Query
Text string - Text of SQL query.
- Warehouse
Id string - ID of a SQL warehouse which will be used to execute this query.
- Apply
Auto boolLimit - Whether to apply a 1000 row limit to the query result.
- Catalog string
- Name of the catalog where this query will be executed.
- Description string
- General description that conveys additional information about this query such as usage notes.
- Owner
User stringName - Query owner's username.
- Parameters
List<Query
Parameter> - Query parameter definition. Consists of following attributes (one of
*_value
is required): - Parent
Path string - The path to a workspace folder containing the query. The default is the user's home folder. If changed, the query will be recreated.
- Run
As stringMode - Sets the "Run as" role for the object.
- Schema string
- Name of the schema where this query will be executed.
- List<string>
- Tags that will be added to the query.
- Display
Name string - Name of the query.
- Query
Text string - Text of SQL query.
- Warehouse
Id string - ID of a SQL warehouse which will be used to execute this query.
- Apply
Auto boolLimit - Whether to apply a 1000 row limit to the query result.
- Catalog string
- Name of the catalog where this query will be executed.
- Description string
- General description that conveys additional information about this query such as usage notes.
- Owner
User stringName - Query owner's username.
- Parameters
[]Query
Parameter Args - Query parameter definition. Consists of following attributes (one of
*_value
is required): - Parent
Path string - The path to a workspace folder containing the query. The default is the user's home folder. If changed, the query will be recreated.
- Run
As stringMode - Sets the "Run as" role for the object.
- Schema string
- Name of the schema where this query will be executed.
- []string
- Tags that will be added to the query.
- display
Name String - Name of the query.
- query
Text String - Text of SQL query.
- warehouse
Id String - ID of a SQL warehouse which will be used to execute this query.
- apply
Auto BooleanLimit - Whether to apply a 1000 row limit to the query result.
- catalog String
- Name of the catalog where this query will be executed.
- description String
- General description that conveys additional information about this query such as usage notes.
- owner
User StringName - Query owner's username.
- parameters
List<Query
Parameter> - Query parameter definition. Consists of following attributes (one of
*_value
is required): - parent
Path String - The path to a workspace folder containing the query. The default is the user's home folder. If changed, the query will be recreated.
- run
As StringMode - Sets the "Run as" role for the object.
- schema String
- Name of the schema where this query will be executed.
- List<String>
- Tags that will be added to the query.
- display
Name string - Name of the query.
- query
Text string - Text of SQL query.
- warehouse
Id string - ID of a SQL warehouse which will be used to execute this query.
- apply
Auto booleanLimit - Whether to apply a 1000 row limit to the query result.
- catalog string
- Name of the catalog where this query will be executed.
- description string
- General description that conveys additional information about this query such as usage notes.
- owner
User stringName - Query owner's username.
- parameters
Query
Parameter[] - Query parameter definition. Consists of following attributes (one of
*_value
is required): - parent
Path string - The path to a workspace folder containing the query. The default is the user's home folder. If changed, the query will be recreated.
- run
As stringMode - Sets the "Run as" role for the object.
- schema string
- Name of the schema where this query will be executed.
- string[]
- Tags that will be added to the query.
- display_
name str - Name of the query.
- query_
text str - Text of SQL query.
- warehouse_
id str - ID of a SQL warehouse which will be used to execute this query.
- apply_
auto_ boollimit - Whether to apply a 1000 row limit to the query result.
- catalog str
- Name of the catalog where this query will be executed.
- description str
- General description that conveys additional information about this query such as usage notes.
- owner_
user_ strname - Query owner's username.
- parameters
Sequence[Query
Parameter Args] - Query parameter definition. Consists of following attributes (one of
*_value
is required): - parent_
path str - The path to a workspace folder containing the query. The default is the user's home folder. If changed, the query will be recreated.
- run_
as_ strmode - Sets the "Run as" role for the object.
- schema str
- Name of the schema where this query will be executed.
- Sequence[str]
- Tags that will be added to the query.
- display
Name String - Name of the query.
- query
Text String - Text of SQL query.
- warehouse
Id String - ID of a SQL warehouse which will be used to execute this query.
- apply
Auto BooleanLimit - Whether to apply a 1000 row limit to the query result.
- catalog String
- Name of the catalog where this query will be executed.
- description String
- General description that conveys additional information about this query such as usage notes.
- owner
User StringName - Query owner's username.
- parameters List<Property Map>
- Query parameter definition. Consists of following attributes (one of
*_value
is required): - parent
Path String - The path to a workspace folder containing the query. The default is the user's home folder. If changed, the query will be recreated.
- run
As StringMode - Sets the "Run as" role for the object.
- schema String
- Name of the schema where this query will be executed.
- List<String>
- Tags that will be added to the query.
Outputs
All input properties are implicitly available as output properties. Additionally, the Query resource produces the following output properties:
- Create
Time string - The timestamp string indicating when the query was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modifier stringUser Name - Username of the user who last saved changes to this query.
- Lifecycle
State string - The workspace state of the query. Used for tracking trashed status. (Possible values are
ACTIVE
orTRASHED
). - Update
Time string - The timestamp string indicating when the query was updated.
- Create
Time string - The timestamp string indicating when the query was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modifier stringUser Name - Username of the user who last saved changes to this query.
- Lifecycle
State string - The workspace state of the query. Used for tracking trashed status. (Possible values are
ACTIVE
orTRASHED
). - Update
Time string - The timestamp string indicating when the query was updated.
- create
Time String - The timestamp string indicating when the query was created.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modifier StringUser Name - Username of the user who last saved changes to this query.
- lifecycle
State String - The workspace state of the query. Used for tracking trashed status. (Possible values are
ACTIVE
orTRASHED
). - update
Time String - The timestamp string indicating when the query was updated.
- create
Time string - The timestamp string indicating when the query was created.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Modifier stringUser Name - Username of the user who last saved changes to this query.
- lifecycle
State string - The workspace state of the query. Used for tracking trashed status. (Possible values are
ACTIVE
orTRASHED
). - update
Time string - The timestamp string indicating when the query was updated.
- create_
time str - The timestamp string indicating when the query was created.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
modifier_ struser_ name - Username of the user who last saved changes to this query.
- lifecycle_
state str - The workspace state of the query. Used for tracking trashed status. (Possible values are
ACTIVE
orTRASHED
). - update_
time str - The timestamp string indicating when the query was updated.
- create
Time String - The timestamp string indicating when the query was created.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modifier StringUser Name - Username of the user who last saved changes to this query.
- lifecycle
State String - The workspace state of the query. Used for tracking trashed status. (Possible values are
ACTIVE
orTRASHED
). - update
Time String - The timestamp string indicating when the query was updated.
Look up Existing Query Resource
Get an existing Query resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: QueryState, opts?: CustomResourceOptions): Query
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
apply_auto_limit: Optional[bool] = None,
catalog: Optional[str] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
last_modifier_user_name: Optional[str] = None,
lifecycle_state: Optional[str] = None,
owner_user_name: Optional[str] = None,
parameters: Optional[Sequence[QueryParameterArgs]] = None,
parent_path: Optional[str] = None,
query_text: Optional[str] = None,
run_as_mode: Optional[str] = None,
schema: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
update_time: Optional[str] = None,
warehouse_id: Optional[str] = None) -> Query
func GetQuery(ctx *Context, name string, id IDInput, state *QueryState, opts ...ResourceOption) (*Query, error)
public static Query Get(string name, Input<string> id, QueryState? state, CustomResourceOptions? opts = null)
public static Query get(String name, Output<String> id, QueryState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Apply
Auto boolLimit - Whether to apply a 1000 row limit to the query result.
- Catalog string
- Name of the catalog where this query will be executed.
- Create
Time string - The timestamp string indicating when the query was created.
- Description string
- General description that conveys additional information about this query such as usage notes.
- Display
Name string - Name of the query.
- Last
Modifier stringUser Name - Username of the user who last saved changes to this query.
- Lifecycle
State string - The workspace state of the query. Used for tracking trashed status. (Possible values are
ACTIVE
orTRASHED
). - Owner
User stringName - Query owner's username.
- Parameters
List<Query
Parameter> - Query parameter definition. Consists of following attributes (one of
*_value
is required): - Parent
Path string - The path to a workspace folder containing the query. The default is the user's home folder. If changed, the query will be recreated.
- Query
Text string - Text of SQL query.
- Run
As stringMode - Sets the "Run as" role for the object.
- Schema string
- Name of the schema where this query will be executed.
- List<string>
- Tags that will be added to the query.
- Update
Time string - The timestamp string indicating when the query was updated.
- Warehouse
Id string - ID of a SQL warehouse which will be used to execute this query.
- Apply
Auto boolLimit - Whether to apply a 1000 row limit to the query result.
- Catalog string
- Name of the catalog where this query will be executed.
- Create
Time string - The timestamp string indicating when the query was created.
- Description string
- General description that conveys additional information about this query such as usage notes.
- Display
Name string - Name of the query.
- Last
Modifier stringUser Name - Username of the user who last saved changes to this query.
- Lifecycle
State string - The workspace state of the query. Used for tracking trashed status. (Possible values are
ACTIVE
orTRASHED
). - Owner
User stringName - Query owner's username.
- Parameters
[]Query
Parameter Args - Query parameter definition. Consists of following attributes (one of
*_value
is required): - Parent
Path string - The path to a workspace folder containing the query. The default is the user's home folder. If changed, the query will be recreated.
- Query
Text string - Text of SQL query.
- Run
As stringMode - Sets the "Run as" role for the object.
- Schema string
- Name of the schema where this query will be executed.
- []string
- Tags that will be added to the query.
- Update
Time string - The timestamp string indicating when the query was updated.
- Warehouse
Id string - ID of a SQL warehouse which will be used to execute this query.
- apply
Auto BooleanLimit - Whether to apply a 1000 row limit to the query result.
- catalog String
- Name of the catalog where this query will be executed.
- create
Time String - The timestamp string indicating when the query was created.
- description String
- General description that conveys additional information about this query such as usage notes.
- display
Name String - Name of the query.
- last
Modifier StringUser Name - Username of the user who last saved changes to this query.
- lifecycle
State String - The workspace state of the query. Used for tracking trashed status. (Possible values are
ACTIVE
orTRASHED
). - owner
User StringName - Query owner's username.
- parameters
List<Query
Parameter> - Query parameter definition. Consists of following attributes (one of
*_value
is required): - parent
Path String - The path to a workspace folder containing the query. The default is the user's home folder. If changed, the query will be recreated.
- query
Text String - Text of SQL query.
- run
As StringMode - Sets the "Run as" role for the object.
- schema String
- Name of the schema where this query will be executed.
- List<String>
- Tags that will be added to the query.
- update
Time String - The timestamp string indicating when the query was updated.
- warehouse
Id String - ID of a SQL warehouse which will be used to execute this query.
- apply
Auto booleanLimit - Whether to apply a 1000 row limit to the query result.
- catalog string
- Name of the catalog where this query will be executed.
- create
Time string - The timestamp string indicating when the query was created.
- description string
- General description that conveys additional information about this query such as usage notes.
- display
Name string - Name of the query.
- last
Modifier stringUser Name - Username of the user who last saved changes to this query.
- lifecycle
State string - The workspace state of the query. Used for tracking trashed status. (Possible values are
ACTIVE
orTRASHED
). - owner
User stringName - Query owner's username.
- parameters
Query
Parameter[] - Query parameter definition. Consists of following attributes (one of
*_value
is required): - parent
Path string - The path to a workspace folder containing the query. The default is the user's home folder. If changed, the query will be recreated.
- query
Text string - Text of SQL query.
- run
As stringMode - Sets the "Run as" role for the object.
- schema string
- Name of the schema where this query will be executed.
- string[]
- Tags that will be added to the query.
- update
Time string - The timestamp string indicating when the query was updated.
- warehouse
Id string - ID of a SQL warehouse which will be used to execute this query.
- apply_
auto_ boollimit - Whether to apply a 1000 row limit to the query result.
- catalog str
- Name of the catalog where this query will be executed.
- create_
time str - The timestamp string indicating when the query was created.
- description str
- General description that conveys additional information about this query such as usage notes.
- display_
name str - Name of the query.
- last_
modifier_ struser_ name - Username of the user who last saved changes to this query.
- lifecycle_
state str - The workspace state of the query. Used for tracking trashed status. (Possible values are
ACTIVE
orTRASHED
). - owner_
user_ strname - Query owner's username.
- parameters
Sequence[Query
Parameter Args] - Query parameter definition. Consists of following attributes (one of
*_value
is required): - parent_
path str - The path to a workspace folder containing the query. The default is the user's home folder. If changed, the query will be recreated.
- query_
text str - Text of SQL query.
- run_
as_ strmode - Sets the "Run as" role for the object.
- schema str
- Name of the schema where this query will be executed.
- Sequence[str]
- Tags that will be added to the query.
- update_
time str - The timestamp string indicating when the query was updated.
- warehouse_
id str - ID of a SQL warehouse which will be used to execute this query.
- apply
Auto BooleanLimit - Whether to apply a 1000 row limit to the query result.
- catalog String
- Name of the catalog where this query will be executed.
- create
Time String - The timestamp string indicating when the query was created.
- description String
- General description that conveys additional information about this query such as usage notes.
- display
Name String - Name of the query.
- last
Modifier StringUser Name - Username of the user who last saved changes to this query.
- lifecycle
State String - The workspace state of the query. Used for tracking trashed status. (Possible values are
ACTIVE
orTRASHED
). - owner
User StringName - Query owner's username.
- parameters List<Property Map>
- Query parameter definition. Consists of following attributes (one of
*_value
is required): - parent
Path String - The path to a workspace folder containing the query. The default is the user's home folder. If changed, the query will be recreated.
- query
Text String - Text of SQL query.
- run
As StringMode - Sets the "Run as" role for the object.
- schema String
- Name of the schema where this query will be executed.
- List<String>
- Tags that will be added to the query.
- update
Time String - The timestamp string indicating when the query was updated.
- warehouse
Id String - ID of a SQL warehouse which will be used to execute this query.
Supporting Types
QueryParameter, QueryParameterArgs
- Name string
- Literal parameter marker that appears between double curly braces in the query text.
- Date
Range QueryValue Parameter Date Range Value - Date-range query parameter value. Consists of following attributes (Can only specify one of
dynamic_date_range_value
ordate_range_value
): - Date
Value QueryParameter Date Value - Date query parameter value. Consists of following attributes (Can only specify one of
dynamic_date_value
ordate_value
): - Enum
Value QueryParameter Enum Value - Dropdown parameter value. Consists of following attributes:
- Numeric
Value QueryParameter Numeric Value - Numeric parameter value. Consists of following attributes:
- Query
Backed QueryValue Parameter Query Backed Value - Query-based dropdown parameter value. Consists of following attributes:
- Text
Value QueryParameter Text Value - Text parameter value. Consists of following attributes:
- Title string
- Text displayed in the user-facing parameter widget in the UI.
- Name string
- Literal parameter marker that appears between double curly braces in the query text.
- Date
Range QueryValue Parameter Date Range Value - Date-range query parameter value. Consists of following attributes (Can only specify one of
dynamic_date_range_value
ordate_range_value
): - Date
Value QueryParameter Date Value - Date query parameter value. Consists of following attributes (Can only specify one of
dynamic_date_value
ordate_value
): - Enum
Value QueryParameter Enum Value - Dropdown parameter value. Consists of following attributes:
- Numeric
Value QueryParameter Numeric Value - Numeric parameter value. Consists of following attributes:
- Query
Backed QueryValue Parameter Query Backed Value - Query-based dropdown parameter value. Consists of following attributes:
- Text
Value QueryParameter Text Value - Text parameter value. Consists of following attributes:
- Title string
- Text displayed in the user-facing parameter widget in the UI.
- name String
- Literal parameter marker that appears between double curly braces in the query text.
- date
Range QueryValue Parameter Date Range Value - Date-range query parameter value. Consists of following attributes (Can only specify one of
dynamic_date_range_value
ordate_range_value
): - date
Value QueryParameter Date Value - Date query parameter value. Consists of following attributes (Can only specify one of
dynamic_date_value
ordate_value
): - enum
Value QueryParameter Enum Value - Dropdown parameter value. Consists of following attributes:
- numeric
Value QueryParameter Numeric Value - Numeric parameter value. Consists of following attributes:
- query
Backed QueryValue Parameter Query Backed Value - Query-based dropdown parameter value. Consists of following attributes:
- text
Value QueryParameter Text Value - Text parameter value. Consists of following attributes:
- title String
- Text displayed in the user-facing parameter widget in the UI.
- name string
- Literal parameter marker that appears between double curly braces in the query text.
- date
Range QueryValue Parameter Date Range Value - Date-range query parameter value. Consists of following attributes (Can only specify one of
dynamic_date_range_value
ordate_range_value
): - date
Value QueryParameter Date Value - Date query parameter value. Consists of following attributes (Can only specify one of
dynamic_date_value
ordate_value
): - enum
Value QueryParameter Enum Value - Dropdown parameter value. Consists of following attributes:
- numeric
Value QueryParameter Numeric Value - Numeric parameter value. Consists of following attributes:
- query
Backed QueryValue Parameter Query Backed Value - Query-based dropdown parameter value. Consists of following attributes:
- text
Value QueryParameter Text Value - Text parameter value. Consists of following attributes:
- title string
- Text displayed in the user-facing parameter widget in the UI.
- name str
- Literal parameter marker that appears between double curly braces in the query text.
- date_
range_ Queryvalue Parameter Date Range Value - Date-range query parameter value. Consists of following attributes (Can only specify one of
dynamic_date_range_value
ordate_range_value
): - date_
value QueryParameter Date Value - Date query parameter value. Consists of following attributes (Can only specify one of
dynamic_date_value
ordate_value
): - enum_
value QueryParameter Enum Value - Dropdown parameter value. Consists of following attributes:
- numeric_
value QueryParameter Numeric Value - Numeric parameter value. Consists of following attributes:
- query_
backed_ Queryvalue Parameter Query Backed Value - Query-based dropdown parameter value. Consists of following attributes:
- text_
value QueryParameter Text Value - Text parameter value. Consists of following attributes:
- title str
- Text displayed in the user-facing parameter widget in the UI.
- name String
- Literal parameter marker that appears between double curly braces in the query text.
- date
Range Property MapValue - Date-range query parameter value. Consists of following attributes (Can only specify one of
dynamic_date_range_value
ordate_range_value
): - date
Value Property Map - Date query parameter value. Consists of following attributes (Can only specify one of
dynamic_date_value
ordate_value
): - enum
Value Property Map - Dropdown parameter value. Consists of following attributes:
- numeric
Value Property Map - Numeric parameter value. Consists of following attributes:
- query
Backed Property MapValue - Query-based dropdown parameter value. Consists of following attributes:
- text
Value Property Map - Text parameter value. Consists of following attributes:
- title String
- Text displayed in the user-facing parameter widget in the UI.
QueryParameterDateRangeValue, QueryParameterDateRangeValueArgs
- Date
Range QueryValue Parameter Date Range Value Date Range Value - Manually specified date-time range value. Consists of the following attributes:
- Dynamic
Date stringRange Value - Dynamic date-time range value based on current date-time. Possible values are
TODAY
,YESTERDAY
,THIS_WEEK
,THIS_MONTH
,THIS_YEAR
,LAST_WEEK
,LAST_MONTH
,LAST_YEAR
,LAST_HOUR
,LAST_8_HOURS
,LAST_24_HOURS
,LAST_7_DAYS
,LAST_14_DAYS
,LAST_30_DAYS
,LAST_60_DAYS
,LAST_90_DAYS
,LAST_12_MONTHS
. - Precision string
- Date-time precision to format the value into when the query is run. Possible values are
DAY_PRECISION
,MINUTE_PRECISION
,SECOND_PRECISION
. Defaults toDAY_PRECISION
(YYYY-MM-DD
). - Start
Day intOf Week - Specify what day that starts the week.
- Date
Range QueryValue Parameter Date Range Value Date Range Value - Manually specified date-time range value. Consists of the following attributes:
- Dynamic
Date stringRange Value - Dynamic date-time range value based on current date-time. Possible values are
TODAY
,YESTERDAY
,THIS_WEEK
,THIS_MONTH
,THIS_YEAR
,LAST_WEEK
,LAST_MONTH
,LAST_YEAR
,LAST_HOUR
,LAST_8_HOURS
,LAST_24_HOURS
,LAST_7_DAYS
,LAST_14_DAYS
,LAST_30_DAYS
,LAST_60_DAYS
,LAST_90_DAYS
,LAST_12_MONTHS
. - Precision string
- Date-time precision to format the value into when the query is run. Possible values are
DAY_PRECISION
,MINUTE_PRECISION
,SECOND_PRECISION
. Defaults toDAY_PRECISION
(YYYY-MM-DD
). - Start
Day intOf Week - Specify what day that starts the week.
- date
Range QueryValue Parameter Date Range Value Date Range Value - Manually specified date-time range value. Consists of the following attributes:
- dynamic
Date StringRange Value - Dynamic date-time range value based on current date-time. Possible values are
TODAY
,YESTERDAY
,THIS_WEEK
,THIS_MONTH
,THIS_YEAR
,LAST_WEEK
,LAST_MONTH
,LAST_YEAR
,LAST_HOUR
,LAST_8_HOURS
,LAST_24_HOURS
,LAST_7_DAYS
,LAST_14_DAYS
,LAST_30_DAYS
,LAST_60_DAYS
,LAST_90_DAYS
,LAST_12_MONTHS
. - precision String
- Date-time precision to format the value into when the query is run. Possible values are
DAY_PRECISION
,MINUTE_PRECISION
,SECOND_PRECISION
. Defaults toDAY_PRECISION
(YYYY-MM-DD
). - start
Day IntegerOf Week - Specify what day that starts the week.
- date
Range QueryValue Parameter Date Range Value Date Range Value - Manually specified date-time range value. Consists of the following attributes:
- dynamic
Date stringRange Value - Dynamic date-time range value based on current date-time. Possible values are
TODAY
,YESTERDAY
,THIS_WEEK
,THIS_MONTH
,THIS_YEAR
,LAST_WEEK
,LAST_MONTH
,LAST_YEAR
,LAST_HOUR
,LAST_8_HOURS
,LAST_24_HOURS
,LAST_7_DAYS
,LAST_14_DAYS
,LAST_30_DAYS
,LAST_60_DAYS
,LAST_90_DAYS
,LAST_12_MONTHS
. - precision string
- Date-time precision to format the value into when the query is run. Possible values are
DAY_PRECISION
,MINUTE_PRECISION
,SECOND_PRECISION
. Defaults toDAY_PRECISION
(YYYY-MM-DD
). - start
Day numberOf Week - Specify what day that starts the week.
- date_
range_ Queryvalue Parameter Date Range Value Date Range Value - Manually specified date-time range value. Consists of the following attributes:
- dynamic_
date_ strrange_ value - Dynamic date-time range value based on current date-time. Possible values are
TODAY
,YESTERDAY
,THIS_WEEK
,THIS_MONTH
,THIS_YEAR
,LAST_WEEK
,LAST_MONTH
,LAST_YEAR
,LAST_HOUR
,LAST_8_HOURS
,LAST_24_HOURS
,LAST_7_DAYS
,LAST_14_DAYS
,LAST_30_DAYS
,LAST_60_DAYS
,LAST_90_DAYS
,LAST_12_MONTHS
. - precision str
- Date-time precision to format the value into when the query is run. Possible values are
DAY_PRECISION
,MINUTE_PRECISION
,SECOND_PRECISION
. Defaults toDAY_PRECISION
(YYYY-MM-DD
). - start_
day_ intof_ week - Specify what day that starts the week.
- date
Range Property MapValue - Manually specified date-time range value. Consists of the following attributes:
- dynamic
Date StringRange Value - Dynamic date-time range value based on current date-time. Possible values are
TODAY
,YESTERDAY
,THIS_WEEK
,THIS_MONTH
,THIS_YEAR
,LAST_WEEK
,LAST_MONTH
,LAST_YEAR
,LAST_HOUR
,LAST_8_HOURS
,LAST_24_HOURS
,LAST_7_DAYS
,LAST_14_DAYS
,LAST_30_DAYS
,LAST_60_DAYS
,LAST_90_DAYS
,LAST_12_MONTHS
. - precision String
- Date-time precision to format the value into when the query is run. Possible values are
DAY_PRECISION
,MINUTE_PRECISION
,SECOND_PRECISION
. Defaults toDAY_PRECISION
(YYYY-MM-DD
). - start
Day NumberOf Week - Specify what day that starts the week.
QueryParameterDateRangeValueDateRangeValue, QueryParameterDateRangeValueDateRangeValueArgs
QueryParameterDateValue, QueryParameterDateValueArgs
- Date
Value string - Manually specified date-time value
- Dynamic
Date stringValue - Dynamic date-time value based on current date-time. Possible values are
NOW
,YESTERDAY
. - Precision string
- Date-time precision to format the value into when the query is run. Possible values are
DAY_PRECISION
,MINUTE_PRECISION
,SECOND_PRECISION
. Defaults toDAY_PRECISION
(YYYY-MM-DD
).
- Date
Value string - Manually specified date-time value
- Dynamic
Date stringValue - Dynamic date-time value based on current date-time. Possible values are
NOW
,YESTERDAY
. - Precision string
- Date-time precision to format the value into when the query is run. Possible values are
DAY_PRECISION
,MINUTE_PRECISION
,SECOND_PRECISION
. Defaults toDAY_PRECISION
(YYYY-MM-DD
).
- date
Value String - Manually specified date-time value
- dynamic
Date StringValue - Dynamic date-time value based on current date-time. Possible values are
NOW
,YESTERDAY
. - precision String
- Date-time precision to format the value into when the query is run. Possible values are
DAY_PRECISION
,MINUTE_PRECISION
,SECOND_PRECISION
. Defaults toDAY_PRECISION
(YYYY-MM-DD
).
- date
Value string - Manually specified date-time value
- dynamic
Date stringValue - Dynamic date-time value based on current date-time. Possible values are
NOW
,YESTERDAY
. - precision string
- Date-time precision to format the value into when the query is run. Possible values are
DAY_PRECISION
,MINUTE_PRECISION
,SECOND_PRECISION
. Defaults toDAY_PRECISION
(YYYY-MM-DD
).
- date_
value str - Manually specified date-time value
- dynamic_
date_ strvalue - Dynamic date-time value based on current date-time. Possible values are
NOW
,YESTERDAY
. - precision str
- Date-time precision to format the value into when the query is run. Possible values are
DAY_PRECISION
,MINUTE_PRECISION
,SECOND_PRECISION
. Defaults toDAY_PRECISION
(YYYY-MM-DD
).
- date
Value String - Manually specified date-time value
- dynamic
Date StringValue - Dynamic date-time value based on current date-time. Possible values are
NOW
,YESTERDAY
. - precision String
- Date-time precision to format the value into when the query is run. Possible values are
DAY_PRECISION
,MINUTE_PRECISION
,SECOND_PRECISION
. Defaults toDAY_PRECISION
(YYYY-MM-DD
).
QueryParameterEnumValue, QueryParameterEnumValueArgs
- Enum
Options string - List of valid query parameter values, newline delimited.
- Multi
Values QueryOptions Parameter Enum Value Multi Values Options - If specified, allows multiple values to be selected for this parameter. Consists of following attributes:
- Values List<string>
- List of selected query parameter values.
- Enum
Options string - List of valid query parameter values, newline delimited.
- Multi
Values QueryOptions Parameter Enum Value Multi Values Options - If specified, allows multiple values to be selected for this parameter. Consists of following attributes:
- Values []string
- List of selected query parameter values.
- enum
Options String - List of valid query parameter values, newline delimited.
- multi
Values QueryOptions Parameter Enum Value Multi Values Options - If specified, allows multiple values to be selected for this parameter. Consists of following attributes:
- values List<String>
- List of selected query parameter values.
- enum
Options string - List of valid query parameter values, newline delimited.
- multi
Values QueryOptions Parameter Enum Value Multi Values Options - If specified, allows multiple values to be selected for this parameter. Consists of following attributes:
- values string[]
- List of selected query parameter values.
- enum_
options str - List of valid query parameter values, newline delimited.
- multi_
values_ Queryoptions Parameter Enum Value Multi Values Options - If specified, allows multiple values to be selected for this parameter. Consists of following attributes:
- values Sequence[str]
- List of selected query parameter values.
- enum
Options String - List of valid query parameter values, newline delimited.
- multi
Values Property MapOptions - If specified, allows multiple values to be selected for this parameter. Consists of following attributes:
- values List<String>
- List of selected query parameter values.
QueryParameterEnumValueMultiValuesOptions, QueryParameterEnumValueMultiValuesOptionsArgs
QueryParameterNumericValue, QueryParameterNumericValueArgs
- Value double
- actual numeric value.
- Value float64
- actual numeric value.
- value Double
- actual numeric value.
- value number
- actual numeric value.
- value float
- actual numeric value.
- value Number
- actual numeric value.
QueryParameterQueryBackedValue, QueryParameterQueryBackedValueArgs
- Query
Id string - ID of the query that provides the parameter values.
- Multi
Values QueryOptions Parameter Query Backed Value Multi Values Options - If specified, allows multiple values to be selected for this parameter. Consists of following attributes:
- Values List<string>
- List of selected query parameter values.
- Query
Id string - ID of the query that provides the parameter values.
- Multi
Values QueryOptions Parameter Query Backed Value Multi Values Options - If specified, allows multiple values to be selected for this parameter. Consists of following attributes:
- Values []string
- List of selected query parameter values.
- query
Id String - ID of the query that provides the parameter values.
- multi
Values QueryOptions Parameter Query Backed Value Multi Values Options - If specified, allows multiple values to be selected for this parameter. Consists of following attributes:
- values List<String>
- List of selected query parameter values.
- query
Id string - ID of the query that provides the parameter values.
- multi
Values QueryOptions Parameter Query Backed Value Multi Values Options - If specified, allows multiple values to be selected for this parameter. Consists of following attributes:
- values string[]
- List of selected query parameter values.
- query_
id str - ID of the query that provides the parameter values.
- multi_
values_ Queryoptions Parameter Query Backed Value Multi Values Options - If specified, allows multiple values to be selected for this parameter. Consists of following attributes:
- values Sequence[str]
- List of selected query parameter values.
- query
Id String - ID of the query that provides the parameter values.
- multi
Values Property MapOptions - If specified, allows multiple values to be selected for this parameter. Consists of following attributes:
- values List<String>
- List of selected query parameter values.
QueryParameterQueryBackedValueMultiValuesOptions, QueryParameterQueryBackedValueMultiValuesOptionsArgs
QueryParameterTextValue, QueryParameterTextValueArgs
- Value string
- actual text value.
- Value string
- actual text value.
- value String
- actual text value.
- value string
- actual text value.
- value str
- actual text value.
- value String
- actual text value.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.