1. Packages
  2. Snowflake Provider
  3. API Docs
  4. getTables
Snowflake v1.2.0 published on Monday, Apr 14, 2025 by Pulumi

snowflake.getTables

Explore with Pulumi AI

Snowflake v1.2.0 published on Monday, Apr 14, 2025 by Pulumi

!> 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.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as snowflake from "@pulumi/snowflake";

const current = snowflake.getTables({
    database: "MYDB",
    schema: "MYSCHEMA",
});
Copy
import pulumi
import pulumi_snowflake as snowflake

current = snowflake.get_tables(database="MYDB",
    schema="MYSCHEMA")
Copy
package main

import (
	"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := snowflake.GetTables(ctx, &snowflake.GetTablesArgs{
			Database: "MYDB",
			Schema:   "MYSCHEMA",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Snowflake = Pulumi.Snowflake;

return await Deployment.RunAsync(() => 
{
    var current = Snowflake.GetTables.Invoke(new()
    {
        Database = "MYDB",
        Schema = "MYSCHEMA",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.snowflake.SnowflakeFunctions;
import com.pulumi.snowflake.inputs.GetTablesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var current = SnowflakeFunctions.getTables(GetTablesArgs.builder()
            .database("MYDB")
            .schema("MYSCHEMA")
            .build());

    }
}
Copy
variables:
  current:
    fn::invoke:
      function: snowflake:getTables
      arguments:
        database: MYDB
        schema: MYSCHEMA
Copy

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>
Copy
def get_tables(database: Optional[str] = None,
               schema: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetTablesResult
def get_tables_output(database: Optional[pulumi.Input[str]] = None,
               schema: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetTablesResult]
Copy
func GetTables(ctx *Context, args *GetTablesArgs, opts ...InvokeOption) (*GetTablesResult, error)
func GetTablesOutput(ctx *Context, args *GetTablesOutputArgs, opts ...InvokeOption) GetTablesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetTablesResult> getTables(GetTablesArgs args, InvokeOptions options)
public static Output<GetTablesResult> getTables(GetTablesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: snowflake:index/getTables:getTables
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Database This property is required. string
The database from which to return the schemas from.
Schema This property is required. string
The schema from which to return the tables from.
Database This property is required. string
The database from which to return the schemas from.
Schema This property is required. string
The schema from which to return the tables from.
database This property is required. String
The database from which to return the schemas from.
schema This property is required. String
The schema from which to return the tables from.
database This property is required. string
The database from which to return the schemas from.
schema This property is required. string
The schema from which to return the tables from.
database This property is required. str
The database from which to return the schemas from.
schema This property is required. str
The schema from which to return the tables from.
database This property is required. String
The database from which to return the schemas from.
schema This property is required. String
The schema from which to return the tables from.

getTables Result

The following output properties are available:

Database string
The database from which to return the schemas from.
Id string
The provider-assigned unique ID for this managed resource.
Schema string
The schema from which to return the tables from.
Tables List<GetTablesTable>
The tables in the schema
Database string
The database from which to return the schemas from.
Id string
The provider-assigned unique ID for this managed resource.
Schema string
The schema from which to return the tables from.
Tables []GetTablesTable
The tables in the schema
database String
The database from which to return the schemas from.
id String
The provider-assigned unique ID for this managed resource.
schema String
The schema from which to return the tables from.
tables List<GetTablesTable>
The tables in the schema
database string
The database from which to return the schemas from.
id string
The provider-assigned unique ID for this managed resource.
schema string
The schema from which to return the tables from.
tables GetTablesTable[]
The tables in the schema
database str
The database from which to return the schemas from.
id str
The provider-assigned unique ID for this managed resource.
schema str
The schema from which to return the tables from.
tables Sequence[GetTablesTable]
The tables in the schema
database String
The database from which to return the schemas from.
id String
The provider-assigned unique ID for this managed resource.
schema String
The schema from which to return the tables from.
tables List<Property Map>
The tables in the schema

Supporting Types

GetTablesTable

Comment This property is required. string
Database This property is required. string
Name This property is required. string
Schema This property is required. string
Comment This property is required. string
Database This property is required. string
Name This property is required. string
Schema This property is required. string
comment This property is required. String
database This property is required. String
name This property is required. String
schema This property is required. String
comment This property is required. string
database This property is required. string
name This property is required. string
schema This property is required. string
comment This property is required. str
database This property is required. str
name This property is required. str
schema This property is required. str
comment This property is required. String
database This property is required. String
name This property is required. String
schema This property is required. String

Package Details

Repository
Snowflake pulumi/pulumi-snowflake
License
Apache-2.0
Notes
This Pulumi package is based on the snowflake Terraform Provider.
Snowflake v1.2.0 published on Monday, Apr 14, 2025 by Pulumi