SnowDDL
Search…
STAGE
Config path: /<database>/<schema>/stage/<name>.yaml
Example for internal stage:
file_format: test_csv_format
copy_options:
on_error: ABORT_STATEMENT
enforce_length: true
Example of external stage:
url: "gcs://test-bucket"
storage_integration: test_storage_integration
file_format: test_avro_format

Schema

  • url (str) - bucket URL for external stage
  • storage_integration (ident) - name of storage integration for external stage
  • encryption (dict)
    • {key} (ident) - name of encryption parameter
    • {value} (bool, float, int, str) - value of encryption parameter
  • directory (dict)
    • {key} (ident) - name of directory parameter
    • {value} (bool, float, int, str) - value of directory parameter
  • file_format (ident) - file format for files in stage
  • copy_options (dict)
    • {key} (ident) - COPY option name
    • {value} (bool, float, int, list, str) - COPY option value
  • comment (str)

Usage notes

  1. 1.
    Stages with url and storage_integration are EXTERNAL. Stages without these parameters are INTERNAL.
  2. 2.
    When INTERNAL stage is being dropped, all files will be lost. When EXTERNAL stage is being dropped, nothing happens. EXTERNAL stage is just a metadata pointing to location in bucket.
  3. 3.
    Business users should only access buckets through stages. Business users should never use STORAGE INTEGRATION objects directly for security reasons.
  4. 4.
    SnowDDL is able to maintain not only stages in general, but also specific files in stages.
  5. 5.
    file_format can only be specified by name referencing to FILE_FORMAT object.

Links

Copy link
On this page
Schema
Usage notes
Links