Titan Core
  • Overview
  • Getting Started
  • Working With Resources
  • Blueprint
  • GitHub Action
  • Resources
    • APIAuthenticationSecurityIntegration
    • APIIntegration
    • AccountParameter
    • AggregationPolicy
    • Alert
    • AuthenticationPolicy
    • AzureStorageIntegration
    • ComputePool
    • Database
    • DatabaseRole
    • DynamicTable
    • EmailNotificationIntegration
    • EventTable
    • ExternalAccessIntegration
    • ExternalStage
    • FailoverGroup
    • FutureGrant
    • GCSStorageIntegration
    • GenericSecret
    • GlueCatalogIntegration
    • Grant
    • GrantOnAll
    • HybridTable
    • ImageRepository
    • InternalStage
    • JSONFileFormat
    • JavascriptUDF
    • MaterializedView
    • NetworkPolicy
    • NetworkRule
    • OAuthSecret
    • ObjectStoreCatalogIntegration
    • PackagesPolicy
    • ParquetFileFormat
    • PasswordPolicy
    • PasswordSecret
    • Pipe
    • PythonStoredProcedure
    • PythonUDF
    • ReplicationGroup
    • ResourceMonitor
    • Role
    • RoleGrant
    • S3StorageIntegration
    • Schema
    • Sequence
    • Service
    • SessionPolicy
    • Share
    • SnowflakePartnerOAuthSecurityIntegration
    • SnowservicesOAuthSecurityIntegration
    • StageStream
    • Table
    • TableStream
    • Tag
    • Task
    • User
    • View
    • ViewStream
    • Warehouse
Powered by GitBook
On this page
  • Examples
  • Python
  • YAML
  • Fields
  1. Resources

DynamicTable

PreviousDatabaseRoleNextEmailNotificationIntegration

Last updated 10 months ago

Represents a dynamic table in Snowflake, which can be configured to refresh automatically, fully, or incrementally, and initialized on creation or on a schedule.

Examples

Python

dynamic_table = DynamicTable(
    name="some_dynamic_table",
    columns=[{"name": "id"}, {"name": "data"}],
    target_lag="1 HOUR",
    warehouse="some_warehouse",
    refresh_mode="AUTO",
    initialize="ON_CREATE",
    as_="SELECT id, data FROM source_table",
    comment="This is a sample dynamic table",
    owner="SYSADMIN"
)

YAML

dynamic_table:
  name: some_dynamic_table
  columns:
    - name: id
    - name: data
  target_lag: "1 HOUR"
  warehouse: some_warehouse
  refresh_mode: AUTO
  initialize: ON_CREATE
  as_: "SELECT id, data FROM source_table"
  comment: "This is a sample dynamic table"
  owner: SYSADMIN

Fields

  • name (string, required) - The name of the dynamic table.

  • columns (list, required) - A list of dicts defining the structure of the table.

  • target_lag (string) - The acceptable lag (delay) for data in the table. Defaults to "DOWNSTREAM".

  • as_ (string, required) - The query used to populate the table.

  • comment (string) - An optional comment for the table.

warehouse (string or , required) - The warehouse where the table is stored.

refresh_mode (string or ) - The mode of refreshing the table (AUTO, FULL, INCREMENTAL).

initialize (string or ) - The behavior when the table is initialized (ON_CREATE, ON_SCHEDULE).

owner (string or ) - The owner of the table. Defaults to "SYSADMIN".

Snowflake Documentation
Warehouse
RefreshMode
InitializeBehavior
Role