1. Packages
  2. Snowflake Provider
  3. API Docs
  4. MaterializedView
Snowflake v0.61.1 published on Thursday, Nov 14, 2024 by Pulumi

snowflake.MaterializedView

Explore with Pulumi AI

snowflake logo
Snowflake v0.61.1 published on Thursday, Nov 14, 2024 by Pulumi

    Import

    format is database name | schema name | view name

    $ pulumi import snowflake:index/materializedView:MaterializedView example 'dbName|schemaName|viewName'
    

    Create MaterializedView Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MaterializedView(name: string, args: MaterializedViewArgs, opts?: CustomResourceOptions);
    @overload
    def MaterializedView(resource_name: str,
                         args: MaterializedViewArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def MaterializedView(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         database: Optional[str] = None,
                         schema: Optional[str] = None,
                         statement: Optional[str] = None,
                         warehouse: Optional[str] = None,
                         comment: Optional[str] = None,
                         is_secure: Optional[bool] = None,
                         name: Optional[str] = None,
                         or_replace: Optional[bool] = None,
                         tags: Optional[Sequence[MaterializedViewTagArgs]] = None)
    func NewMaterializedView(ctx *Context, name string, args MaterializedViewArgs, opts ...ResourceOption) (*MaterializedView, error)
    public MaterializedView(string name, MaterializedViewArgs args, CustomResourceOptions? opts = null)
    public MaterializedView(String name, MaterializedViewArgs args)
    public MaterializedView(String name, MaterializedViewArgs args, CustomResourceOptions options)
    
    type: snowflake:MaterializedView
    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 MaterializedViewArgs
    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 MaterializedViewArgs
    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 MaterializedViewArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MaterializedViewArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MaterializedViewArgs
    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 materializedViewResource = new Snowflake.MaterializedView("materializedViewResource", new()
    {
        Database = "string",
        Schema = "string",
        Statement = "string",
        Warehouse = "string",
        Comment = "string",
        IsSecure = false,
        Name = "string",
        OrReplace = false,
    });
    
    example, err := snowflake.NewMaterializedView(ctx, "materializedViewResource", &snowflake.MaterializedViewArgs{
    	Database:  pulumi.String("string"),
    	Schema:    pulumi.String("string"),
    	Statement: pulumi.String("string"),
    	Warehouse: pulumi.String("string"),
    	Comment:   pulumi.String("string"),
    	IsSecure:  pulumi.Bool(false),
    	Name:      pulumi.String("string"),
    	OrReplace: pulumi.Bool(false),
    })
    
    var materializedViewResource = new MaterializedView("materializedViewResource", MaterializedViewArgs.builder()
        .database("string")
        .schema("string")
        .statement("string")
        .warehouse("string")
        .comment("string")
        .isSecure(false)
        .name("string")
        .orReplace(false)
        .build());
    
    materialized_view_resource = snowflake.MaterializedView("materializedViewResource",
        database="string",
        schema="string",
        statement="string",
        warehouse="string",
        comment="string",
        is_secure=False,
        name="string",
        or_replace=False)
    
    const materializedViewResource = new snowflake.MaterializedView("materializedViewResource", {
        database: "string",
        schema: "string",
        statement: "string",
        warehouse: "string",
        comment: "string",
        isSecure: false,
        name: "string",
        orReplace: false,
    });
    
    type: snowflake:MaterializedView
    properties:
        comment: string
        database: string
        isSecure: false
        name: string
        orReplace: false
        schema: string
        statement: string
        warehouse: string
    

    MaterializedView 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 MaterializedView resource accepts the following input properties:

    Database string
    The database in which to create the view. Don't use the | character.
    Schema string
    The schema in which to create the view. Don't use the | character.
    Statement string
    Specifies the query used to create the view.
    Warehouse string
    The warehouse name.
    Comment string
    Specifies a comment for the view.
    IsSecure bool
    Specifies that the view is secure.
    Name string
    Specifies the identifier for the view; must be unique for the schema in which the view is created.
    OrReplace bool
    Overwrites the View if it exists.
    Tags List<MaterializedViewTag>
    Definitions of a tag to associate with the resource.

    Deprecated: Use the 'snowflake_tag_association' resource instead.

    Database string
    The database in which to create the view. Don't use the | character.
    Schema string
    The schema in which to create the view. Don't use the | character.
    Statement string
    Specifies the query used to create the view.
    Warehouse string
    The warehouse name.
    Comment string
    Specifies a comment for the view.
    IsSecure bool
    Specifies that the view is secure.
    Name string
    Specifies the identifier for the view; must be unique for the schema in which the view is created.
    OrReplace bool
    Overwrites the View if it exists.
    Tags []MaterializedViewTagArgs
    Definitions of a tag to associate with the resource.

    Deprecated: Use the 'snowflake_tag_association' resource instead.

    database String
    The database in which to create the view. Don't use the | character.
    schema String
    The schema in which to create the view. Don't use the | character.
    statement String
    Specifies the query used to create the view.
    warehouse String
    The warehouse name.
    comment String
    Specifies a comment for the view.
    isSecure Boolean
    Specifies that the view is secure.
    name String
    Specifies the identifier for the view; must be unique for the schema in which the view is created.
    orReplace Boolean
    Overwrites the View if it exists.
    tags List<MaterializedViewTag>
    Definitions of a tag to associate with the resource.

    Deprecated: Use the 'snowflake_tag_association' resource instead.

    database string
    The database in which to create the view. Don't use the | character.
    schema string
    The schema in which to create the view. Don't use the | character.
    statement string
    Specifies the query used to create the view.
    warehouse string
    The warehouse name.
    comment string
    Specifies a comment for the view.
    isSecure boolean
    Specifies that the view is secure.
    name string
    Specifies the identifier for the view; must be unique for the schema in which the view is created.
    orReplace boolean
    Overwrites the View if it exists.
    tags MaterializedViewTag[]
    Definitions of a tag to associate with the resource.

    Deprecated: Use the 'snowflake_tag_association' resource instead.

    database str
    The database in which to create the view. Don't use the | character.
    schema str
    The schema in which to create the view. Don't use the | character.
    statement str
    Specifies the query used to create the view.
    warehouse str
    The warehouse name.
    comment str
    Specifies a comment for the view.
    is_secure bool
    Specifies that the view is secure.
    name str
    Specifies the identifier for the view; must be unique for the schema in which the view is created.
    or_replace bool
    Overwrites the View if it exists.
    tags Sequence[MaterializedViewTagArgs]
    Definitions of a tag to associate with the resource.

    Deprecated: Use the 'snowflake_tag_association' resource instead.

    database String
    The database in which to create the view. Don't use the | character.
    schema String
    The schema in which to create the view. Don't use the | character.
    statement String
    Specifies the query used to create the view.
    warehouse String
    The warehouse name.
    comment String
    Specifies a comment for the view.
    isSecure Boolean
    Specifies that the view is secure.
    name String
    Specifies the identifier for the view; must be unique for the schema in which the view is created.
    orReplace Boolean
    Overwrites the View if it exists.
    tags List<Property Map>
    Definitions of a tag to associate with the resource.

    Deprecated: Use the 'snowflake_tag_association' resource instead.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MaterializedView resource produces the following output properties:

    FullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    Id string
    The provider-assigned unique ID for this managed resource.
    FullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    Id string
    The provider-assigned unique ID for this managed resource.
    fullyQualifiedName String
    Fully qualified name of the resource. For more information, see object name resolution.
    id String
    The provider-assigned unique ID for this managed resource.
    fullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    id string
    The provider-assigned unique ID for this managed resource.
    fully_qualified_name str
    Fully qualified name of the resource. For more information, see object name resolution.
    id str
    The provider-assigned unique ID for this managed resource.
    fullyQualifiedName String
    Fully qualified name of the resource. For more information, see object name resolution.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing MaterializedView Resource

    Get an existing MaterializedView 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?: MaterializedViewState, opts?: CustomResourceOptions): MaterializedView
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comment: Optional[str] = None,
            database: Optional[str] = None,
            fully_qualified_name: Optional[str] = None,
            is_secure: Optional[bool] = None,
            name: Optional[str] = None,
            or_replace: Optional[bool] = None,
            schema: Optional[str] = None,
            statement: Optional[str] = None,
            tags: Optional[Sequence[MaterializedViewTagArgs]] = None,
            warehouse: Optional[str] = None) -> MaterializedView
    func GetMaterializedView(ctx *Context, name string, id IDInput, state *MaterializedViewState, opts ...ResourceOption) (*MaterializedView, error)
    public static MaterializedView Get(string name, Input<string> id, MaterializedViewState? state, CustomResourceOptions? opts = null)
    public static MaterializedView get(String name, Output<String> id, MaterializedViewState 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.
    The following state arguments are supported:
    Comment string
    Specifies a comment for the view.
    Database string
    The database in which to create the view. Don't use the | character.
    FullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    IsSecure bool
    Specifies that the view is secure.
    Name string
    Specifies the identifier for the view; must be unique for the schema in which the view is created.
    OrReplace bool
    Overwrites the View if it exists.
    Schema string
    The schema in which to create the view. Don't use the | character.
    Statement string
    Specifies the query used to create the view.
    Tags List<MaterializedViewTag>
    Definitions of a tag to associate with the resource.

    Deprecated: Use the 'snowflake_tag_association' resource instead.

    Warehouse string
    The warehouse name.
    Comment string
    Specifies a comment for the view.
    Database string
    The database in which to create the view. Don't use the | character.
    FullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    IsSecure bool
    Specifies that the view is secure.
    Name string
    Specifies the identifier for the view; must be unique for the schema in which the view is created.
    OrReplace bool
    Overwrites the View if it exists.
    Schema string
    The schema in which to create the view. Don't use the | character.
    Statement string
    Specifies the query used to create the view.
    Tags []MaterializedViewTagArgs
    Definitions of a tag to associate with the resource.

    Deprecated: Use the 'snowflake_tag_association' resource instead.

    Warehouse string
    The warehouse name.
    comment String
    Specifies a comment for the view.
    database String
    The database in which to create the view. Don't use the | character.
    fullyQualifiedName String
    Fully qualified name of the resource. For more information, see object name resolution.
    isSecure Boolean
    Specifies that the view is secure.
    name String
    Specifies the identifier for the view; must be unique for the schema in which the view is created.
    orReplace Boolean
    Overwrites the View if it exists.
    schema String
    The schema in which to create the view. Don't use the | character.
    statement String
    Specifies the query used to create the view.
    tags List<MaterializedViewTag>
    Definitions of a tag to associate with the resource.

    Deprecated: Use the 'snowflake_tag_association' resource instead.

    warehouse String
    The warehouse name.
    comment string
    Specifies a comment for the view.
    database string
    The database in which to create the view. Don't use the | character.
    fullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    isSecure boolean
    Specifies that the view is secure.
    name string
    Specifies the identifier for the view; must be unique for the schema in which the view is created.
    orReplace boolean
    Overwrites the View if it exists.
    schema string
    The schema in which to create the view. Don't use the | character.
    statement string
    Specifies the query used to create the view.
    tags MaterializedViewTag[]
    Definitions of a tag to associate with the resource.

    Deprecated: Use the 'snowflake_tag_association' resource instead.

    warehouse string
    The warehouse name.
    comment str
    Specifies a comment for the view.
    database str
    The database in which to create the view. Don't use the | character.
    fully_qualified_name str
    Fully qualified name of the resource. For more information, see object name resolution.
    is_secure bool
    Specifies that the view is secure.
    name str
    Specifies the identifier for the view; must be unique for the schema in which the view is created.
    or_replace bool
    Overwrites the View if it exists.
    schema str
    The schema in which to create the view. Don't use the | character.
    statement str
    Specifies the query used to create the view.
    tags Sequence[MaterializedViewTagArgs]
    Definitions of a tag to associate with the resource.

    Deprecated: Use the 'snowflake_tag_association' resource instead.

    warehouse str
    The warehouse name.
    comment String
    Specifies a comment for the view.
    database String
    The database in which to create the view. Don't use the | character.
    fullyQualifiedName String
    Fully qualified name of the resource. For more information, see object name resolution.
    isSecure Boolean
    Specifies that the view is secure.
    name String
    Specifies the identifier for the view; must be unique for the schema in which the view is created.
    orReplace Boolean
    Overwrites the View if it exists.
    schema String
    The schema in which to create the view. Don't use the | character.
    statement String
    Specifies the query used to create the view.
    tags List<Property Map>
    Definitions of a tag to associate with the resource.

    Deprecated: Use the 'snowflake_tag_association' resource instead.

    warehouse String
    The warehouse name.

    Supporting Types

    MaterializedViewTag, MaterializedViewTagArgs

    Name string
    Tag name, e.g. department.
    Value string
    Tag value, e.g. marketing_info.
    Database string
    Name of the database that the tag was created in.
    Schema string
    Name of the schema that the tag was created in.
    Name string
    Tag name, e.g. department.
    Value string
    Tag value, e.g. marketing_info.
    Database string
    Name of the database that the tag was created in.
    Schema string
    Name of the schema that the tag was created in.
    name String
    Tag name, e.g. department.
    value String
    Tag value, e.g. marketing_info.
    database String
    Name of the database that the tag was created in.
    schema String
    Name of the schema that the tag was created in.
    name string
    Tag name, e.g. department.
    value string
    Tag value, e.g. marketing_info.
    database string
    Name of the database that the tag was created in.
    schema string
    Name of the schema that the tag was created in.
    name str
    Tag name, e.g. department.
    value str
    Tag value, e.g. marketing_info.
    database str
    Name of the database that the tag was created in.
    schema str
    Name of the schema that the tag was created in.
    name String
    Tag name, e.g. department.
    value String
    Tag value, e.g. marketing_info.
    database String
    Name of the database that the tag was created in.
    schema String
    Name of the schema that the tag was created in.

    Package Details

    Repository
    Snowflake pulumi/pulumi-snowflake
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the snowflake Terraform Provider.
    snowflake logo
    Snowflake v0.61.1 published on Thursday, Nov 14, 2024 by Pulumi