snowflake.getTables
Explore with Pulumi AI
!> Caution: Preview Feature This feature is considered a preview feature in the provider, regardless of the state of the resource in Snowflake. We do not guarantee its stability. It will be reworked and marked as a stable feature in future releases. Breaking changes are expected, even without bumping the major version. To use this feature, add the relevant feature name to preview_features_enabled
field in the provider configuration. Please always refer to the Getting Help section in our Github repo to best determine how to get help for your questions.
Datasource used to get details of filtered tables. Filtering is aligned with the current possibilities for SHOW TABLES query. The results of SHOW and DESCRIBE (COLUMNS) are encapsulated in one output collection tables
.
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
variables:
current:
fn::invoke:
function: snowflake:getTables
arguments:
database: MYDB
schema: MYSCHEMA
Note If a field has a default value, it is shown next to the type in the schema.
Using getTables
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getTables(args: GetTablesArgs, opts?: InvokeOptions): Promise<GetTablesResult>
function getTablesOutput(args: GetTablesOutputArgs, opts?: InvokeOptions): Output<GetTablesResult>
def get_tables(in_: Optional[GetTablesIn] = None,
like: Optional[str] = None,
limit: Optional[GetTablesLimit] = None,
starts_with: Optional[str] = None,
with_describe: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetTablesResult
def get_tables_output(in_: Optional[pulumi.Input[GetTablesInArgs]] = None,
like: Optional[pulumi.Input[str]] = None,
limit: Optional[pulumi.Input[GetTablesLimitArgs]] = None,
starts_with: Optional[pulumi.Input[str]] = None,
with_describe: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTablesResult]
func GetTables(ctx *Context, args *GetTablesArgs, opts ...InvokeOption) (*GetTablesResult, error)
func GetTablesOutput(ctx *Context, args *GetTablesOutputArgs, opts ...InvokeOption) GetTablesResultOutput
> Note: This function is named GetTables
in the Go SDK.
public static class GetTables
{
public static Task<GetTablesResult> InvokeAsync(GetTablesArgs args, InvokeOptions? opts = null)
public static Output<GetTablesResult> Invoke(GetTablesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTablesResult> getTables(GetTablesArgs args, InvokeOptions options)
public static Output<GetTablesResult> getTables(GetTablesArgs args, InvokeOptions options)
fn::invoke:
function: snowflake:index/getTables:getTables
arguments:
# arguments dictionary
The following arguments are supported:
- In
Get
Tables In - IN clause to filter the list of objects
- Like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
). - Limit
Get
Tables Limit - Limits the number of rows returned. If the
limit.from
is set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstarts_with
orlike
. - Starts
With string - Filters the output with case-sensitive characters indicating the beginning of the object name.
- With
Describe bool - (Default:
true
) Runs DESC TABLE for each table returned by SHOW TABLES. The output of describe is saved to the description field. By default this value is set to true.
- In
Get
Tables In - IN clause to filter the list of objects
- Like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
). - Limit
Get
Tables Limit - Limits the number of rows returned. If the
limit.from
is set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstarts_with
orlike
. - Starts
With string - Filters the output with case-sensitive characters indicating the beginning of the object name.
- With
Describe bool - (Default:
true
) Runs DESC TABLE for each table returned by SHOW TABLES. The output of describe is saved to the description field. By default this value is set to true.
- in
Get
Tables In - IN clause to filter the list of objects
- like String
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
). - limit
Get
Tables Limit - Limits the number of rows returned. If the
limit.from
is set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstarts_with
orlike
. - starts
With String - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with
Describe Boolean - (Default:
true
) Runs DESC TABLE for each table returned by SHOW TABLES. The output of describe is saved to the description field. By default this value is set to true.
- in
Get
Tables In - IN clause to filter the list of objects
- like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
). - limit
Get
Tables Limit - Limits the number of rows returned. If the
limit.from
is set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstarts_with
orlike
. - starts
With string - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with
Describe boolean - (Default:
true
) Runs DESC TABLE for each table returned by SHOW TABLES. The output of describe is saved to the description field. By default this value is set to true.
- in_
Get
Tables In - IN clause to filter the list of objects
- like str
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
). - limit
Get
Tables Limit - Limits the number of rows returned. If the
limit.from
is set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstarts_with
orlike
. - starts_
with str - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with_
describe bool - (Default:
true
) Runs DESC TABLE for each table returned by SHOW TABLES. The output of describe is saved to the description field. By default this value is set to true.
- in Property Map
- IN clause to filter the list of objects
- like String
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
). - limit Property Map
- Limits the number of rows returned. If the
limit.from
is set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstarts_with
orlike
. - starts
With String - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with
Describe Boolean - (Default:
true
) Runs DESC TABLE for each table returned by SHOW TABLES. The output of describe is saved to the description field. By default this value is set to true.
getTables Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Tables
List<Get
Tables Table> - Holds the aggregated output of all tables details queries.
- In
Get
Tables In - IN clause to filter the list of objects
- Like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
). - Limit
Get
Tables Limit - Limits the number of rows returned. If the
limit.from
is set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstarts_with
orlike
. - Starts
With string - Filters the output with case-sensitive characters indicating the beginning of the object name.
- With
Describe bool - (Default:
true
) Runs DESC TABLE for each table returned by SHOW TABLES. The output of describe is saved to the description field. By default this value is set to true.
- Id string
- The provider-assigned unique ID for this managed resource.
- Tables
[]Get
Tables Table - Holds the aggregated output of all tables details queries.
- In
Get
Tables In - IN clause to filter the list of objects
- Like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
). - Limit
Get
Tables Limit - Limits the number of rows returned. If the
limit.from
is set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstarts_with
orlike
. - Starts
With string - Filters the output with case-sensitive characters indicating the beginning of the object name.
- With
Describe bool - (Default:
true
) Runs DESC TABLE for each table returned by SHOW TABLES. The output of describe is saved to the description field. By default this value is set to true.
- id String
- The provider-assigned unique ID for this managed resource.
- tables
List<Get
Tables Table> - Holds the aggregated output of all tables details queries.
- in
Get
Tables In - IN clause to filter the list of objects
- like String
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
). - limit
Get
Tables Limit - Limits the number of rows returned. If the
limit.from
is set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstarts_with
orlike
. - starts
With String - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with
Describe Boolean - (Default:
true
) Runs DESC TABLE for each table returned by SHOW TABLES. The output of describe is saved to the description field. By default this value is set to true.
- id string
- The provider-assigned unique ID for this managed resource.
- tables
Get
Tables Table[] - Holds the aggregated output of all tables details queries.
- in
Get
Tables In - IN clause to filter the list of objects
- like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
). - limit
Get
Tables Limit - Limits the number of rows returned. If the
limit.from
is set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstarts_with
orlike
. - starts
With string - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with
Describe boolean - (Default:
true
) Runs DESC TABLE for each table returned by SHOW TABLES. The output of describe is saved to the description field. By default this value is set to true.
- id str
- The provider-assigned unique ID for this managed resource.
- tables
Sequence[Get
Tables Table] - Holds the aggregated output of all tables details queries.
- in_
Get
Tables In - IN clause to filter the list of objects
- like str
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
). - limit
Get
Tables Limit - Limits the number of rows returned. If the
limit.from
is set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstarts_with
orlike
. - starts_
with str - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with_
describe bool - (Default:
true
) Runs DESC TABLE for each table returned by SHOW TABLES. The output of describe is saved to the description field. By default this value is set to true.
- id String
- The provider-assigned unique ID for this managed resource.
- tables List<Property Map>
- Holds the aggregated output of all tables details queries.
- in Property Map
- IN clause to filter the list of objects
- like String
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
). - limit Property Map
- Limits the number of rows returned. If the
limit.from
is set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstarts_with
orlike
. - starts
With String - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with
Describe Boolean - (Default:
true
) Runs DESC TABLE for each table returned by SHOW TABLES. The output of describe is saved to the description field. By default this value is set to true.
Supporting Types
GetTablesIn
- Account bool
- Returns records for the entire account.
- Application string
- Returns records for the specified application.
- Application
Package string - Returns records for the specified application package.
- Database string
- Returns records for the current database in use or for a specified database.
- Schema string
- Returns records for the current schema in use or a specified schema. Use fully qualified name.
- Account bool
- Returns records for the entire account.
- Application string
- Returns records for the specified application.
- Application
Package string - Returns records for the specified application package.
- Database string
- Returns records for the current database in use or for a specified database.
- Schema string
- Returns records for the current schema in use or a specified schema. Use fully qualified name.
- account Boolean
- Returns records for the entire account.
- application String
- Returns records for the specified application.
- application
Package String - Returns records for the specified application package.
- database String
- Returns records for the current database in use or for a specified database.
- schema String
- Returns records for the current schema in use or a specified schema. Use fully qualified name.
- account boolean
- Returns records for the entire account.
- application string
- Returns records for the specified application.
- application
Package string - Returns records for the specified application package.
- database string
- Returns records for the current database in use or for a specified database.
- schema string
- Returns records for the current schema in use or a specified schema. Use fully qualified name.
- account bool
- Returns records for the entire account.
- application str
- Returns records for the specified application.
- application_
package str - Returns records for the specified application package.
- database str
- Returns records for the current database in use or for a specified database.
- schema str
- Returns records for the current schema in use or a specified schema. Use fully qualified name.
- account Boolean
- Returns records for the entire account.
- application String
- Returns records for the specified application.
- application
Package String - Returns records for the specified application package.
- database String
- Returns records for the current database in use or for a specified database.
- schema String
- Returns records for the current schema in use or a specified schema. Use fully qualified name.
GetTablesLimit
GetTablesTable
- Describe
Outputs List<GetTables Table Describe Output> - Holds the output of DESCRIBE TABLES.
- Show
Outputs List<GetTables Table Show Output> - Holds the output of SHOW TABLES.
- Describe
Outputs []GetTables Table Describe Output - Holds the output of DESCRIBE TABLES.
- Show
Outputs []GetTables Table Show Output - Holds the output of SHOW TABLES.
- describe
Outputs List<GetTables Table Describe Output> - Holds the output of DESCRIBE TABLES.
- show
Outputs List<GetTables Table Show Output> - Holds the output of SHOW TABLES.
- describe
Outputs GetTables Table Describe Output[] - Holds the output of DESCRIBE TABLES.
- show
Outputs GetTables Table Show Output[] - Holds the output of SHOW TABLES.
- describe_
outputs Sequence[GetTables Table Describe Output] - Holds the output of DESCRIBE TABLES.
- show_
outputs Sequence[GetTables Table Show Output] - Holds the output of SHOW TABLES.
- describe
Outputs List<Property Map> - Holds the output of DESCRIBE TABLES.
- show
Outputs List<Property Map> - Holds the output of SHOW TABLES.
GetTablesTableDescribeOutput
- Check string
- Collation string
- Comment string
- Default string
- Expression string
- Is
Nullable bool - Is
Primary bool - Is
Unique bool - Kind string
- Name string
- Policy
Name string - Schema
Evolution stringRecord - Type string
- Check string
- Collation string
- Comment string
- Default string
- Expression string
- Is
Nullable bool - Is
Primary bool - Is
Unique bool - Kind string
- Name string
- Policy
Name string - Schema
Evolution stringRecord - Type string
- check String
- collation String
- comment String
- default_ String
- expression String
- is
Nullable Boolean - is
Primary Boolean - is
Unique Boolean - kind String
- name String
- policy
Name String - schema
Evolution StringRecord - type String
- check string
- collation string
- comment string
- default string
- expression string
- is
Nullable boolean - is
Primary boolean - is
Unique boolean - kind string
- name string
- policy
Name string - schema
Evolution stringRecord - type string
- check str
- collation str
- comment str
- default str
- expression str
- is_
nullable bool - is_
primary bool - is_
unique bool - kind str
- name str
- policy_
name str - schema_
evolution_ strrecord - type str
- check String
- collation String
- comment String
- default String
- expression String
- is
Nullable Boolean - is
Primary Boolean - is
Unique Boolean - kind String
- name String
- policy
Name String - schema
Evolution StringRecord - type String
GetTablesTableShowOutput
- Automatic
Clustering bool - Budget string
- Bytes int
- Change
Tracking bool - Cluster
By string - Comment string
- Created
On string - Database
Name string - Dropped
On string - Enable
Schema boolEvolution - Is
Event bool - Is
External bool - Kind string
- Name string
- Owner string
- Owner
Role stringType - Retention
Time int - Rows int
- Schema
Name string - Search
Optimization bool - Search
Optimization intBytes - Search
Optimization stringProgress
- Automatic
Clustering bool - Budget string
- Bytes int
- Change
Tracking bool - Cluster
By string - Comment string
- Created
On string - Database
Name string - Dropped
On string - Enable
Schema boolEvolution - Is
Event bool - Is
External bool - Kind string
- Name string
- Owner string
- Owner
Role stringType - Retention
Time int - Rows int
- Schema
Name string - Search
Optimization bool - Search
Optimization intBytes - Search
Optimization stringProgress
- automatic
Clustering Boolean - budget String
- bytes Integer
- change
Tracking Boolean - cluster
By String - comment String
- created
On String - database
Name String - dropped
On String - enable
Schema BooleanEvolution - is
Event Boolean - is
External Boolean - kind String
- name String
- owner String
- owner
Role StringType - retention
Time Integer - rows Integer
- schema
Name String - search
Optimization Boolean - search
Optimization IntegerBytes - search
Optimization StringProgress
- automatic
Clustering boolean - budget string
- bytes number
- change
Tracking boolean - cluster
By string - comment string
- created
On string - database
Name string - dropped
On string - enable
Schema booleanEvolution - is
Event boolean - is
External boolean - kind string
- name string
- owner string
- owner
Role stringType - retention
Time number - rows number
- schema
Name string - search
Optimization boolean - search
Optimization numberBytes - search
Optimization stringProgress
- automatic_
clustering bool - budget str
- bytes int
- change_
tracking bool - cluster_
by str - comment str
- created_
on str - database_
name str - dropped_
on str - enable_
schema_ boolevolution - is_
event bool - is_
external bool - kind str
- name str
- owner str
- owner_
role_ strtype - retention_
time int - rows int
- schema_
name str - search_
optimization bool - search_
optimization_ intbytes - search_
optimization_ strprogress
- automatic
Clustering Boolean - budget String
- bytes Number
- change
Tracking Boolean - cluster
By String - comment String
- created
On String - database
Name String - dropped
On String - enable
Schema BooleanEvolution - is
Event Boolean - is
External Boolean - kind String
- name String
- owner String
- owner
Role StringType - retention
Time Number - rows Number
- schema
Name String - search
Optimization Boolean - search
Optimization NumberBytes - search
Optimization StringProgress
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
snowflake
Terraform Provider.