id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/array_position_0_0.txt
/ 1. JSON and XML Parsing 9. Array/Object Creation and Manipulation 43. Map Creation and Manipulation 51. Extraction 58. Conversion/Casting 82. Type Predicates Categories: semistructured) (Array/Object)
snowflake_docs/md5_binary_0_0.txt
/ 1. General Manipulation 34. Case Conversion 38. Regular Expression Matching 48. Other Matching/Comparison 66. Compression/Decompression 70. Encoding/Decoding 81. Cryptographic/Checksum 93. Hash (Non-cryptographic) 96. Co...
snowflake_docs/alter-application-package-version_5_0.txt
Examples ¶ ALTER APPLICATION PACKAGE hello_snowflake_package ADD VERSION v1_1 USING '@hello_snowflake_code.core.hello_snowflake_stage'; Copy +---------------------------------------------------------------------------------------+---------+-------+ | status ...
snowflake_docs/system_database_refresh_progress_1_0.txt
SYSTEM$DATABASE_REFRESH_PROGRESS , SYSTEM$DATABASE_REFRESH_PROGRESS_BY_JOB — _Deprecated_ ¶ These functions have been deprecated. Use [ DATABASE_REFRESH_PROGRESS , The SYSTEM$DATABASE_REFRESH_PROGRESS family of functions can be used to query the status of a database refresh along various dimensions: * SYSTEM$DATABA...
snowflake_docs/show-references_4_0.txt
Output ¶ This command displays the following information about the references defined for the application: Column | Description ---|--- name | The name of the reference. label | The label of the reference as specified in the manifest file. description | A description of the reference and what it does. priv...
snowflake_docs/desc-stage_2_0.txt
Syntax ¶ DESC[RIBE] STAGE <name> Copy
snowflake_docs/revoke-privilege-application-role_2_0.txt
Syntax ¶ Account roles: REVOKE [ GRANT OPTION FOR ] { | { schemaPrivileges | ALL [ PRIVILEGES ] } ON { SCHEMA <schema_name> | ALL SCHEMAS IN DATABASE <db_name> } | { schemaPrivileges | ALL [ PRIVILEGES ] } ON { FUTURE SCHEMAS IN DATABASE <db_name> } | { schemaObjec...
snowflake_docs/system_stream_backlog_1_0.txt
SYSTEM$STREAM_BACKLOG ¶ guide/streams-intro.html
snowflake_docs/arrays_to_object_1_0.txt
ARRAYS_TO_OBJECT ¶ types-semistructured.html
snowflake_docs/create-function_18_0.txt
label-udf-python-read-files) . If you plan to copy a file to a stage, then Snowflake recommends using a named internal stage because the PUT command supports copying files to named internal stages, and the PUT command is usually the easiest way to move a file to a stage. External stages are allowed, but are not support...
snowflake_docs/case_4_0.txt
Examples ¶ This example demonstrates a simple ` CASE ` statement: > > CREATE PROCEDURE case_demo_01(v VARCHAR) > RETURNS VARCHAR > LANGUAGE SQL > AS > BEGIN > CASE (v) > WHEN 'first choice' THEN > RETURN 'one'; > WHEN 'second choice' THEN > R...
snowflake_docs/drop-connection_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the connection to drop.
snowflake_docs/create-security-integration-saml2_16_0.txt
Example ¶ The following example creates a Microsoft Active Directory Federation Services (AD FS) security integration with the two optional settings: CREATE SECURITY INTEGRATION my_idp TYPE = saml2 ENABLED = true SAML2_ISSUER = 'https://example.com' SAML2_SSO_URL = 'http://myssopr...
snowflake_docs/alter-application-package_4_0.txt
Usage Notes ¶ * If you do not specify the values for the optional properties, the command uses the values specified in the application manifest file. If you specify values for the properties in the command and in the application manifest file, the values specified in the command take precedence. * If two versio...
snowflake_docs/constraints-overview_5_0.txt
Inline and Out-of-Line Constraints ¶ Constraints are defined either inline or out-of-line during table creation or modification: * Inline constraints are created as part of the column definition and can only be used for single-column constraints. * Out-of-line constraints are defined using a separate clause tha...
snowflake_docs/show-warehouses_6_0.txt
Examples ¶ Show warehouses with names that start with ` test ` that you have privileges to view: > > SHOW WAREHOUSES LIKE 'test%'; > > > Copy > > > > +---------------+-----------+--------------------+---------+-------------------+-------------------+------------------+---------+--------+------------+-----...
snowflake_docs/execute-immediate_7_0.txt
Usage Notes ¶ * A ` _ session_variable _ ` must be preceded by a dollar sign ( ` $ ` ). * A local ` _ variable _ ` must not be preceded by a dollar sign ( ` $ ` ).
snowflake_docs/drop-sequence_4_0.txt
Usage Notes ¶ * To drop a sequence, you must be using a role that has ownership privilege on the sequence. * After dropping a sequence, creating a sequence with the same name creates a new version of the sequence. The new sequence does not resume generating numbers where the old sequence left off. * Before d...
snowflake_docs/is_role_in_session_0_0.txt
/ 1. General 14. Session 29. Session Object 41. Alert context) IS_ROLE_IN_SESSION Categories:
snowflake_docs/arrays_overlap_3_0.txt
Usage Notes ¶ * When you compare objects, the objects must be identical to return TRUE. For details, see Examples (in this topic).
snowflake_docs/desc-projection-policy_7_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/parameters_13_0.txt
ALLOW_ID_TOKEN ¶ Type : Account — Can be set only for Account Data Type : Boolean Description : Specifies whether a connection token can be saved in the client-side operating system keystore to promote continuous, secure connectivity without users needing to enter login credentials at the start of each connection...
snowflake_docs/anomaly_detection_22_0.txt
<name>!SHOW_TRAINING_LOGS ¶ Returns logs from model training. Output is non-NULL only when ` 'ON_ERROR' = 'SKIP' ` is set in the training ` CONFIG_OBJECT ` .
snowflake_docs/data-type-conversion_9_1.txt
-------+--------------------------------+ | SYSTEM$TYPEOF(IFNULL(12.3, 0)) | SYSTEM$TYPEOF(IFNULL(NULL, 0)) | +--------------------------------+--------------------------------+ | NUMBER(3,1)[SB1] | NUMBER(1,0)[SB1] | +--------------------------------+------------------------...
snowflake_docs/row_access_policies_0_0.txt
/ Schema:
snowflake_docs/data_classification_latest_2_0.txt
Columns ¶ Column Name | Data Type | Description ---|---|--- TABLE_ID | Number | Internal/system-generated identifier for the table that was classified. TABLE_NAME | VARCHAR | Name of the table. SCHEMA_ID | Number | Internal/system-generated identifier for the schema that contains the table. SCHEMA_NAME | V...
snowflake_docs/current_region_0_0.txt
/ 1. General 14. Session 29. Session Object 41. Alert context) CURRENT_REGION Categories:
snowflake_docs/contract_items_legacy_3_0.txt
Usage Notes ¶ * Latency for the view may be up to 24 hours. * This view shows only the active contract for the organization. * Customers who signed a contract through a Snowflake reseller cannot access data in this view. * Data is retained indefinitely. Was this page helpful? Yes No Inc. All Rights Res...
snowflake_docs/current_timestamp_5_0.txt
Usage Notes ¶ * Do not use the returned value for precise time ordering between concurrent queries (processed by the same virtual warehouse) because the queries might be serviced by different compute resources (in the warehouse). * To comply with ANSI standards, this function can be called without parentheses. ...
snowflake_docs/create-account_7_0.txt
Usage Notes ¶ * An account can be associated with your organization in one of the following ways: * Create a new account using the SQL command described in the current topic. * By default, the maximum number of accounts in an organization cannot exceed 25. To have this limit raised, contact Snowflake Suppo...
snowflake_docs/drop-view_1_0.txt
DROP VIEW ¶ Removes the specified view from the current/specified schema. See also:
snowflake_docs/regexp_count_4_0.txt
Usage Notes ¶
snowflake_docs/try_decrypt_1_0.txt
TRY_DECRYPT ¶ error occurs during decryption. See also:
snowflake_docs/show-transactions_4_0.txt
Usage Notes ¶ * Columns that start with the prefix ` is_ ` return either ` Y ` (yes) or ` N ` (no). * The command does not require a running warehouse to execute. * The command returns a maximum of 10K records for the specified object type, as dictated by the access privileges for the role used to execu...
snowflake_docs/commands-stream_2_0.txt
Stream ¶
snowflake_docs/desc-stage_0_0.txt
/ 1. Stage 7. File Format 13. External Volume 20. Pipe 26. Snowpipe Streaming 28. Loading and Unloading loading) DESCRIBE STAGE
snowflake_docs/rpad_1_0.txt
RPAD ¶ Right-pads a string with characters from another string, or right-pads a binary value with bytes from another binary value. The argument ( ` _ base _ ` ) is padded to length ` _ length_expr _ ` with characters/bytes from the ` _ pad _ ` argument.
snowflake_docs/try_base64_decode_string_5_0.txt
Usage Notes ¶ output.html
snowflake_docs/st_asgeojson_3_0.txt
Arguments ¶ ` _ geography_or_geometry_expression _ ` The argument must be an expression of type GEOGRAPHY or GEOMETRY.
snowflake_docs/system_authorize_stage_privatelink_access_3_0.txt
Arguments ¶ ` ' _ privateEndpointResourceID _ ' ` The unique identifier for the Private Endpoint in Azure. Snowflake uses this endpoint value to access the internal stage through the Azure internal network to avoid the public Internet. For instructions on how to obtain this value, see [ Configuring private intern...
snowflake_docs/show-shares-in-failover-group_4_0.txt
Usage Notes ¶ * Executing this command requires a role with either the OWNERSHIP or MONITOR privilege on the failover group. The command returns results only for a role with the MONITOR privilege on a share.
snowflake_docs/commands-privacy_3_0.txt
Projection Policy ¶ Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Aggregation Policy 2. Projection Policy Language : **English**
snowflake_docs/to_geometry_0_0.txt
/ 1. Conversion, Input, Parsing 14. Conversion, Output, Formatting 23. Constructor 32. Accessor 44. Relationship and Measurement 61. Transformation 75. Utility 77. H3 geospatial) TO_GEOMETRY Categories:
snowflake_docs/jarowinkler_similarity_4_0.txt
Usage Notes ¶ * When the function compares short strings, the execution time is proportional to the product of the lengths of the input strings. * When the function compares long strings, the execution time is proportional to the length of the longer string.
snowflake_docs/undrop-account_2_0.txt
label-viewing-dropped-deleted-accounts) . See also:
snowflake_docs/transactions_8_0.txt
AUTOCOMMIT ¶ parameter. The default setting for AUTOCOMMIT is on. While AUTOCOMMIT is enabled: * Each statement outside an explicit transaction is treated as though it is inside its own implicit single-statement transaction. In other words, that statement is automatically committed if it succeeds, and automaticall...
snowflake_docs/st_asgeojson_5_0.txt
Usage Notes ¶ For GEOMETRY objects: * The returned GEOMETRY object uses the same coordinate system as the input GEOMETRY object. Note that the GeoJSON specification requires that geometry be in the WGS84 coordinate system (SRID = 4326). However, the ST_ASGEOJSON function does not enforce this. * The function do...
snowflake_docs/as_decimal-number_4_0.txt
Usage Notes ¶ * Default for ` _ precision _ ` is ` 38 ` and ` _ scale _ ` is ` 0 ` . * When reducing scale, this function rounds, which can cause out-of-range errors.
snowflake_docs/copy-into-location_14_0.txt
Unloading data from a query to files in a named internal stage ¶ Unload the result of a query into a named internal stage ( ` my_stage ` ) using a folder/filename prefix ( ` result/data_ ` ), a named file format ( ` myformat ` ), and gzip compression: > > COPY INTO @my_stage/result/data_ FROM (SELECT * FROM o...
snowflake_docs/try_to_date_7_0.txt
Examples ¶ This demonstrates usage of ` TRY_TO_DATE ` : > > SELECT TRY_TO_DATE('2018-09-15'), TRY_TO_DATE('Invalid'); > +---------------------------+------------------------+ > | TRY_TO_DATE('2018-09-15') | TRY_TO_DATE('INVALID') | > |---------------------------+------------------------| > | 201...
snowflake_docs/create-role_1_0.txt
CREATE ROLE ¶ Create a new role or replace an existing role in the system. After creating roles, you can grant object privileges to the role and then grant the role to other roles or individual users to enable access control security for objects in the system. See also:
snowflake_docs/decrypt_7_0.txt
label-hexadecimal-format-for-binary-data) format. The value of the encrypted data might vary due to the randomness of the initialization vector > > ALTER SESSION SET BINARY_OUTPUT_FORMAT='hex'; > > > Copy > > > CREATE TABLE binary_table ( > binary_column BINARY, > encrypted_binary_column B...
snowflake_docs/current_time_3_0.txt
Arguments ¶ ` _ fract_sec_precision _ ` This optional argument indicates the precision with which to report the time. For example, a value of 3 says to use 3 digits after the decimal point (i.e. to specify the time with a precision of milliseconds). The default precision is 9 (nanoseconds). Valid values range from ...
snowflake_docs/show-catalog-integrations_2_0.txt
label-tables-iceberg-catalog-integration-def) in your account. The output returns integration metadata and properties. See also:
snowflake_docs/system_reference_8_0.txt
Examples ¶ procedures-calling-references.html
snowflake_docs/bitor_agg_5_0.txt
Usage Notes ¶ * Numeric values are aggregated to the nearest integer data type. Decimal and floating point values are rounded to the nearest integer before aggregation. * Aggregating a character/text column (data type VARCHAR, CHAR, STRING, etc.) implicitly casts the input values to FLOAT, then rounds the value...
snowflake_docs/indexes_0_0.txt
/ Schema:
snowflake_docs/show-catalog-integrations_9_0.txt
Usage notes ¶ * The command doesn’t require a running warehouse to execute.
snowflake_docs/create-managed-account_5_0.txt
Optional Parameters ¶ ` COMMENT = ' _ string_literal _ ' ` Specifies a comment for the managed account.
snowflake_docs/drop-external-table_1_0.txt
DROP EXTERNAL TABLE ¶ Removes an external table from the current/specified schema. Note that this is a metadata-only operation. None of the files that the external table refers to are dropped. See also:
snowflake_docs/system_set_return_value_4_0.txt
Examples ¶ Create a task that sets a return value. Create a second, child task that runs after the predecessor task has completed. The child task retrieves the return value set by the predecessor task (by calling [ and inserts it into a table row: > > -- create a table to store the return values. > create or...
snowflake_docs/stage_storage_usage_history_3_0.txt
Usage notes ¶ * Latency for the view may be up to 120 minutes (2 hours). Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Columns 2. Usage notes Language : **English**
snowflake_docs/desc-row-access-policy_1_0.txt
DESCRIBE ROW ACCESS POLICY ¶ This feature requires Enterprise Edition (or higher). To inquire about upgrading, please contact [ Snowflake Support Snowflake-Lodge) . Describes a row access policy, including the creation date, name, data type, and SQL expression. DESCRIBE can be abbreviated to DESC. See also: security...
snowflake_docs/system_explain_plan_json_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$EXPLAIN_PLAN_JSON Categories:
snowflake_docs/copy-into-table_23_0.txt
Loading JSON data into a VARIANT column ¶ The following example loads JSON data into a table with a single column of type VARIANT. The staged JSON array comprises three objects separated by new lines: > > >> [{ >> "location": { >> "city": "Lexington", >> "zip": "40503", >> }...
snowflake_docs/create-external-table_13_0.txt
TYPE = AVRO ¶ ` COMPRESSION = AUTO | GZIP | BZ2 | BROTLI | ZSTD | DEFLATE | RAW_DEFLATE | NONE ` String (constant) that specifies the current compression algorithm for the data files to be queried. Snowflake uses this option to detect how already- compressed data files were compressed so that the c...
snowflake_docs/pi_1_0.txt
PI ¶ Returns the value of pi as a floating-point value.
snowflake_docs/class_instance_functions_2_0.txt
Columns ¶ Column Name | Data Type | Description ---|---|--- FUNCTION_NAME | TEXT | Name of the function. FUNCTION_INSTANCE_NAME | TEXT | Name of the class instance to which the function belongs. FUNCTION_INSTANCE_SCHEMA | TEXT | Name of the schema to which the class instance belongs. FUNCTION_INSTANCE_DATA...
snowflake_docs/collation_32_0.txt
Collation Not Supported for Strings in VARIANT, ARRAY, or OBJECT ¶ Strings stored inside a VARIANT, OBJECT, or ARRAY do not include a collation specification. Therefore: * Comparison of these values always uses the “utf8” collation. * When a VARCHAR value with a collation specification is used to construct an A...
snowflake_docs/create-security-integration-scim_10_0.txt
Examples ¶
snowflake_docs/date-time-input-output_13_0.txt
Time Formats ¶ For descriptions of the elements used in the formats below, see About the Elements Used in Input and Output Formats . Format | Example | Notes ---|---|--- **ISO Time Formats** | | ` HH24:MI:SS.FFTZH:TZM ` | ` 20:57:01.123456789+07:00 ` | ` HH24:MI:SS.FF ` | ` 20:57:01.123456789 ` | ` ...
snowflake_docs/create-sequence_1_0.txt
CREATE SEQUENCE ¶ Creates a new sequence, which can be used for generating sequential, unique numbers. Important Snowflake does not guarantee generating sequence numbers without gaps. The generated numbers are not necessarily contiguous. sequences) . See also:
snowflake_docs/functions-table_5_0.txt
Built-in Table Functions vs User-Defined Table Functions ¶ Snowflake provides hundreds of built-in functions, many of which are table functions. Built-in table functions are listed in System-Defined Table Functions . Users can also write their own functions, called user-defined functions or “UDFs”. Some UDFs are s...
snowflake_docs/alter-iceberg-table_11_0.txt
Manually refresh table metadata for tables that use a catalog integration ¶ **Iceberg files in object storage** This example manually refreshes the table metadata based on changes in a new metadata file. In this example, the full path to the metadata file is ` <external-volume-storage-base-url>/path/to/metadata/v2.me...
snowflake_docs/snowflake-db-classes_9_0.txt
Grant the Privilege to Create Class Instances ¶ In order to create an instance of a class, a role must be granted the CREATE _ <class_name> _ privilege. For example, to enable the ` ml_admin ` role to create SNOWFLAKE.ML.ANOMALY_DETECTION instances in the ` mydb.myschema ` schema, execute the following statement: ...
snowflake_docs/st_buffer_4_0.txt
Returns ¶ Returns a GEOMETRY object.
snowflake_docs/array_sort_2_0.txt
Syntax ¶ ARRAY_SORT( <array> [ , <sort_ascending> [ , <nulls_first> ] ] ) Copy
snowflake_docs/show-catalog-integrations_3_0.txt
Syntax ¶ SHOW CATALOG INTEGRATIONS [ LIKE '<pattern>' ] Copy
snowflake_docs/drop-budget_0_0.txt
/ 1. Commands 4. Methods
snowflake_docs/regexp_instr_8_0.txt
Basic Examples ¶ The next few examples use this data: > > CREATE TABLE demo1 (id INT, string1 VARCHAR); > INSERT INTO demo1 (id, string1) VALUES > (1, 'nevermore1, nevermore2, nevermore3.') > ; > > > Copy Search for a matching string. In this case, the string is “nevermore” followed by a si...
snowflake_docs/drop-secret_1_0.txt
DROP SECRET ¶ Removes a secret from the system. See also:
snowflake_docs/system_finish_oauth_flow_4_0.txt
Usage Notes ¶ Use this function to set the refresh token of an OAuth2 secret you’re using to authenticate with a service provider. This function finishes an OAuth flow that must begin with your call to [ SYSTEM$START_OAUTH_FLOW You must execute this function immediately after – and in the same session as – SYSTEM$ST...
snowflake_docs/dense_rank_0_0.txt
/ 1. General 27. Rank-Related 39. Bitwise Aggregation 43. Boolean Aggregation 47. Hash Aggregation 49. Semi-structured Aggregation 52. Counting Distinct Values 55. Linear Regression 65. Statistics and Probability ...
snowflake_docs/get_query_operator_stats_3_0.txt
label-common-query-problems-identified-by-query-profile) .
snowflake_docs/split_part_4_0.txt
Usage Notes ¶ * If the ` _ partNumber _ ` is out of range, the returned value is an empty string. * If the string starts or is terminated with the delimiter, the system considers empty space before or after the delimiter, respectively, as a valid part of the split result. For an example, see the Examples sec...
snowflake_docs/system_get_privatelink_config_4_1.txt
stages. > > The visibility of this key and the corresponding value in the query result > depends on the [ ENABLE_INTERNAL_STAGES_PRIVATELINK > setting. The default setting for this parameter is ` FALSE ` . You must set > this parameter to ` TRUE ` prior to executing this system function to > obtain the internal stag...
snowflake_docs/approx_percentile_4_0.txt
Returns ¶ The output is returned as a DOUBLE value.
snowflake_docs/degrees_3_0.txt
Arguments ¶ ` _ real_expr _ ` An expression representing the number of radians.
snowflake_docs/create-image-repository_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier (that is, the name) for the image repository; it must be unique for the schema in which the repository is created. Quoted names for special characters or case-sensitive names are not supported. The same constraint also applies to database and schema names where you...
snowflake_docs/parameters_51_0.txt
INITIAL_REPLICATION_SIZE_LIMIT_IN_TB ¶ Type : Account — Can be set only for Account Data Type : Number. Description : Sets the maximum estimated size limit for the initial replication of a primary database to a secondary database (in TB). Set this parameter on any account that stores a secondary database. This si...
snowflake_docs/get_spending_history_6_0.txt
label-budgets-application-roles) for the account budget.
snowflake_docs/is_integer_0_0.txt
/ 1. JSON and XML Parsing 9. Array/Object Creation and Manipulation 43. Map Creation and Manipulation 51. Extraction 58. Conversion/Casting 82. Type Predicates Categories: semistructured) (Type Predicates)
snowflake_docs/operators-arithmetic_0_0.txt
/
snowflake_docs/remove_5_0.txt
Usage notes ¶ * Removing files from an external stage requires granting the following role or permission to Snowflake in your cloud storage account: Cloud Storage Service | Role or Permission | Instructions ---|---|--- Amazon S3 | ` s3:DeleteObject ` | load-s3-config) Google Cloud Storage | ` storage.objec...
snowflake_docs/databases_2_0.txt
Columns ¶ Column Name | Data Type | Description ---|---|--- DATABASE_ID | NUMBER | Internal/system-generated identifier for the database. DATABASE_NAME | TEXT | Name of the database. DATABASE_OWNER | TEXT | Name of the role that owns the database. IS_TRANSIENT | TEXT | Whether the database is transient. ...
snowflake_docs/bitor_0_0.txt
/ reference/expressions-byte-bit) BITOR Categories:
snowflake_docs/arrays_to_object_3_0.txt
Syntax ¶ ARRAYS_TO_OBJECT( <key_array> , <value_array> ) Copy
snowflake_docs/alter-materialized-view_9_0.txt
Examples ¶ Rename a materialized view: > > ALTER MATERIALIZED VIEW table1_MV RENAME TO my_mv; > > > Copy Cluster a materialized view: > > ALTER MATERIALIZED VIEW my_mv CLUSTER BY(i); > > > Copy Suspend clustering of a materialized view, but not use of the view: > > ALTER MATERIALIZED VIEW my_mv SUSPE...
snowflake_docs/infer_schema_3_0.txt
Arguments ¶ ` LOCATION => '...' ` Name of the internal or external stage where the files are stored. Optionally include a path to one or more files in the cloud storage location; otherwise, the INFER_SCHEMA function scans files in all subdirectories in the stage: ` @[ _ namespace _ .] _ int_stage_name _ [/ _ ...
snowflake_docs/drop-function_2_0.txt
Syntax ¶ DROP FUNCTION [ IF EXISTS ] <name> ( [ <arg_data_type> , ... ] ) Copy