id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/explain_json_0_0.txt
/ 1. Control 29. Information 90. Query Information EXPLAIN_JSON Categories:
snowflake_docs/desc-catalog-integration_3_0.txt
Syntax ¶ DESC[RIBE] CATALOG INTEGRATION <name> Copy
snowflake_docs/st_geometryfromwkb_7_0.txt
label-data-types-geometry) .
snowflake_docs/drop-row-access-policy_7_0.txt
label-access-control-securable-objects) , see [ Overview of For additional details on masking policy DDL and privileges, see [ Manage row row-mgmt-approach) .
snowflake_docs/system_send_email_8_0.txt
Examples ¶ . Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Arguments 3. Returns 4. Examples Related content Language : **English**
snowflake_docs/desc-application_1_0.txt
DESCRIBE APPLICATION ¶ Available This feature is not supported on Google Cloud Platform. Displays information about an application object created using the Snowflake Native App Framework. DESCRIBE can be abbreviated to DESC. See also: application-packages) ,
snowflake_docs/desc-password-policy_5_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have at control-overview.html
snowflake_docs/max_by_5_0.txt
Usage Notes ¶ * The function ignores NULL values in ` _ col_containing_maximum _ ` . * If all values in ` _ col_containing_maximum _ ` are NULL, the function returns NULL (regardless of whether the optional ` _ maximum_number_of_values_to_return _ ` argument is specified).
snowflake_docs/drop-stage_4_0.txt
Usage notes ¶ * Dropped stages cannot be recovered; they must be recreated. * This command cannot be used to drop the stage associated with a table or user; only named stages (internal or external) can be dropped.
snowflake_docs/parameters_50_0.txt
GEOMETRY_OUTPUT_FORMAT ¶ Type : Session — Can be set for Account » User » Session Data Type : String (Constant) Description : types-geometry) . Values : ` GeoJSON ` , ` WKT ` , ` WKB ` , ` EWKT ` , or ` EWKB ` Default : ` GeoJSON `
snowflake_docs/undrop-table_5_0.txt
Examples ¶ Restore the most recent version of a dropped table (this example builds on the > > UNDROP TABLE t2; > > +---------------------------------+ > | status | > |---------------------------------| > | Table T2 successfully restored. | > +-----------------------...
snowflake_docs/bitxor_0_0.txt
/ reference/expressions-byte-bit) BITXOR Categories:
snowflake_docs/system_get_cmk_kms_key_policy_2_0.txt
Syntax ¶ > > SYSTEM$GET_CMK_KMS_KEY_POLICY() > > > Copy
snowflake_docs/st_geographyfromwkb_8_0.txt
Usage Notes ¶ * Issues an error if the input cannot be parsed as WKB or EWKB.
snowflake_docs/revoke-database-role-share_1_0.txt
REVOKE DATABASE ROLE … FROM SHARE ¶ Revokes a database role from a share. Revoking a database role effectively removes privileges on objects granted to the database role from the share, disabling access to the objects in all consumer accounts that have created a database from the share. sharing-provider) . See also:...
snowflake_docs/bitxor_agg_2_0.txt
Syntax ¶ **Aggregate function** BITXOR_AGG( [ DISTINCT ] <expr1> ) Copy **Window function** BITXOR_AGG( [ DISTINCT ] <expr1> ) OVER ( [ PARTITION BY <expr2> ] ) Copy
snowflake_docs/check_xml_1_0.txt
CHECK_XML ¶ Enabled for all accounts. Checks the validity of an XML document. If the input string is NULL or a valid XML document, the output is NULL. In case of an XML parsing error, the output string contains the error message. See also:
snowflake_docs/commands-integration_4_0.txt
Catalog ¶
snowflake_docs/create-security-integration-saml2_1_0.txt
CREATE SECURITY INTEGRATION (SAML2) ¶ Creates a new SAML2 security integration in the account or replaces an existing integration. A SAML2 security integration provides single sign-on (SSO) workflows by creating an interface between Snowflake and a third-party Identity Provider (IdP). For information about creating ...
snowflake_docs/explain_json_5_0.txt
Usage Notes ¶ * The input must be a constant expression. You cannot call this function on a column, for example. * If a string literal is passed as input, the delimiter around the string can be either a single quote ` ' ` or a double dollar sign ` $$ ` . If the string literal contains single quotes (and does ...
snowflake_docs/remove_2_0.txt
Syntax ¶ REMOVE { internalStage | externalStage } [ PATTERN = '<regex_pattern>' ] Copy Where: > > internalStage ::= > @[<namespace>.]<int_stage_name>[/<path>] > | @[<namespace>.]%<table_name>[/<path>] > | @~[/<path>] > > > Copy > > > externalStage ::= > @[<namespace>.]<e...
snowflake_docs/alter-table-column_4_0.txt
Syntax ¶ ALTER TABLE <name> { ALTER | MODIFY } [ ( ] [ COLUMN ] <col1_name> DROP DEFAULT , [ COLUMN ] <col1_name> SET DEFAULT <seq_name>.NEXTVAL , [ COLUMN ] <col1_nam...
snowflake_docs/desc-network-policy_4_0.txt
Usage notes ¶ * Only the network policy owner (i.e. role with the OWNERSHIP privilege on the network policy) or higher can execute this command.
snowflake_docs/chr_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/copy-files_10_0.txt
Usage notes ¶ * This command does not support the following: * Copying files from or to user or table stages. * Copying data in archival cloud storage classes that requires restoration before it can be retrieved. Archival storage classes include Amazon S3 Glacier Flexible Retrieval, Glacier Deep Archive,...
snowflake_docs/array_size_1_0.txt
ARRAY_SIZE ¶ Returns the size of the input array. A variation of ARRAY_SIZE takes a VARIANT value as input. If the VARIANT value contains an array, the size of the array is returned; otherwise, NULL is returned if the value is not an array.
snowflake_docs/hybrid_table_usage_history_1_0.txt
HYBRID_TABLE_USAGE_HISTORY View ¶ Available to all accounts. This Account Usage view displays consumption of Hybrid Table Requests (serverless compute) resources for hybrid tables, in terms of credits billed for your entire Snowflake account, within the last 365 days (1 year).
snowflake_docs/regr_slope_5_0.txt
Usage Notes ¶ * DISTINCT is not supported for this function. * When used as a window function: > * This function does not support: > >> * ORDER BY sub-clause in the OVER() clause. >> >> * Window frames.
snowflake_docs/object_insert_1_0.txt
OBJECT_INSERT ¶ Returns an object consisting of the input object with a new key-value pair inserted (or an existing key updated with a new value).
snowflake_docs/materialized_view_refresh_history_3_0.txt
Usage Notes ¶ * Latency for the view may be up to 24 hours (1 day). * The data is retained for 365 days (1 year). Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Columns 2. Usage Notes Language : **English**
snowflake_docs/functions-table_0_0.txt
/ 1. Data Loading 4. Data Generation 6. Data Conversion 9. ML-Powered Analysis 11. Object Modeling 13. Semi-Structured Queries 15. Query Results 17. Query Profile 19. User Login 22. Queries 26. Wareho...
snowflake_docs/system_send_email_7_0.txt
Returns ¶ Returns TRUE if the stored procedure executes successfully.
snowflake_docs/copy-into-location_5_1.txt
nested data in VARIANT columns cannot be unloaded successfully in Parquet format. ` copyOptions ` Specifies one or more copy options for the unloaded data. For more details, see Copy Options (in this topic). ` VALIDATION_MODE = RETURN_ROWS ` String (constant) that instructs the COPY command to return the result...
snowflake_docs/translate-snowflake-cortex_5_0.txt
Returns ¶ A string containing a translation of the original text into the target language.
snowflake_docs/seq1_3_0.txt
Usage Notes ¶ * If the optional sign argument is 0, the sequence continues at 0 after wrap-around. If the optional sign argument is 1, the sequence continues at the smallest representable number based on the given integer width. * The default sign argument is 0.
snowflake_docs/alter-security-integration-scim_4_0.txt
Usage notes ¶ Regarding metadata: > Attention > > Customers should ensure that no personal data (other than for a User > object), sensitive data, export-controlled data, or other regulated data is > entered as metadata when using the Snowflake service. For more information,
snowflake_docs/query_history_1_0.txt
QUERY_HISTORY , QUERY_HISTORY_BY_* ¶ The QUERY_HISTORY family of table functions can be used to query Snowflake query history along various dimensions: * QUERY_HISTORY returns queries within a specified time range. * QUERY_HISTORY_BY_SESSION returns queries within a specified session and time range. * QUERY_...
snowflake_docs/for_2_0.txt
Syntax ¶ scripting/cursors) , use: > > FOR <row_variable> IN <cursor_name> DO > statement; > [ statement; ... ] > END FOR [ <label> ] ; > > > Copy To loop a specified number of times, use: > > FOR <counter_variable> IN [ REVERSE ] <start> TO <end> { DO | LOOP } > statement; > ...
snowflake_docs/create-security-integration-oauth-external_1_0.txt
CREATE SECURITY INTEGRATION (External OAuth) ¶ Creates a new External OAuth security integration in the account or replaces an existing integration. An External OAuth security integration allows a client to use a third-party authorization server to obtain the access tokens needed to interact with Snowflake. For info...
snowflake_docs/system_task_runtime_info_4_0.txt
Returns ¶ Returns a STRING or TEXT with requested information.
snowflake_docs/split_5_0.txt
Collation Details ¶ This function does not support the following collation specifications: * ` pi ` (punctuation-insensitive). * ` cs-ai ` (case-sensitive, accent-insensitive). The values in the output array do not include a collation specification and therefore do not support further collation operations. N...
snowflake_docs/open_1_0.txt
OPEN (Snowflake Scripting) ¶ Opens a cursor. For more information on cursors, see [ Working with Cursors Note construct is valid only within a [ Snowflake Scripting block See also :
snowflake_docs/array_agg_20_0.txt
000000521", > | > | | "Clerk
snowflake_docs/desc-masking-policy_7_0.txt
label-access-control-securable-objects) , see [ Overview of For additional details on masking policy DDL and privileges, see [ Managing security-column-manage) .
snowflake_docs/add_regex_12_0.txt
Usage notes ¶ * Calling this method multiple times gives an additive result for the number of regular expressions associated with the instance. * Call each method in a separate SQL statement (no method chaining). SELECT <col_to_classify> FROM <table_with_col_to_classify> WHERE <col_to_classify>...
snowflake_docs/st_endpoint_8_0.txt
GEOMETRY Examples ¶ The following query returns the last Point in a LineString: ALTER SESSION SET GEOMETRY_OUTPUT_FORMAT='WKT'; SELECT ST_ENDPOINT(TO_GEOMETRY('LINESTRING(1 1, 2 2, 3 3, 4 4)')); +------------------------------------------------------------+ | ST_ENDPOINT(TO_GEOMETRY('LINESTRING(1 1, ...
snowflake_docs/create-notification-integration_10_0.txt
Access Control Requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/show_python_packages_dependencies_3_0.txt
Arguments ¶ ` _ Python_runtime_version _ ` String specifying the version of the Python runtime. ` _ packages_list _ ` ARRAY of strings that specify the list of packages to check. array-constant) to specify this list.
snowflake_docs/data-types-structured_24_0.txt
Constructing a MAP ¶ To construct a MAP, construct a semi-structured object, and cast the OBJECT to a MAP. For example, the following statements both produce the MAP ` {'city'->'San Mateo','state'->'CA'} ` : SELECT OBJECT_CONSTRUCT( 'city', 'San Mateo', 'state', 'CA' )::MAP( VARCHAR, ...
snowflake_docs/desc-materialized-view_4_0.txt
Usage Notes ¶
snowflake_docs/alter-iceberg-table_10_0.txt
Examples ¶
snowflake_docs/decompress_string_2_0.txt
Syntax ¶ DECOMPRESS_STRING(<input>, <method>) Copy
snowflake_docs/listing_auto_fulfillment_usage_history_2_0.txt
how-cross- cloud-auto-fulfillment-works) . When a data product is fulfilled to a region, Snowflake uses a managed account associated with your provider account, called a _secure share area_ , to store the data product in each region with consumer demand. Your provider account incurs costs associated with the secure sha...
snowflake_docs/alter-external-table_2_0.txt
Syntax ¶ ALTER EXTERNAL TABLE [ IF EXISTS ] <name> REFRESH [ '<relative-path>' ] ALTER EXTERNAL TABLE [ IF EXISTS ] <name> ADD FILES ( '<path>/[<filename>]' [ , '<path>/[<filename>'] ] ) ALTER EXTERNAL TABLE [ IF EXISTS ] <name> REMOVE FILES ( '<path>/[<filename>]' [ , '<path>/[<filename>]' ] ) ALTER...
snowflake_docs/st_length_7_0.txt
Usage Notes ¶ * If ` _ geography_or_geometry_expression _ ` is not a LineString, MultiLineString, or GeometryCollection containing linestrings, ST_LENGTH returns 0. * If ` _ geography_or_geometry_expression _ ` is a GeometryCollection, ST_LENGTH returns the sum of the lengths of the linestrings in the collect...
snowflake_docs/alter-function_13_0.txt
Usage Notes ¶ * Regarding metadata: Attention Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see [
snowflake_docs/show_1_0.txt
SHOW _ <objects> _ ¶ Lists the existing objects for the specified object type. The output includes metadata for the objects, including: * Common properties (name, creation timestamp, owning role, comment, etc.) * Object-specific properties See also:
snowflake_docs/show-columns_6_0.txt
Examples ¶ create or replace table dt_test (n1 number default 5, n2_int integer default n1+5, n3_bigint bigint autoincrement, n4_dec decimal identity (1,10), f1 float, f2_double double, f3_real real, s1 string, s2_var varchar, s3_char char...
snowflake_docs/bitand_agg_6_0.txt
Examples ¶ Create the table and load the data: > > CREATE OR REPLACE TABLE bitwise_example > (k int, d decimal(10,5), s1 varchar(10), s2 varchar(10)); > > INSERT INTO bitwise_example VALUES > (15, 1.1, '12','one'), > (26, 2.9, '10','two'), > (12, 7.1, '7.9','...
snowflake_docs/alter-replication-group_3_0.txt
Syntax ¶ **Source Account** ALTER REPLICATION GROUP [ IF EXISTS ] <name> RENAME TO <new_name> ALTER REPLICATION GROUP [ IF EXISTS ] <name> SET [ OBJECT_TYPES = <object_type> [ , <object_type> , ... ] ] [ ALLOWED_DATABASES = <db_name> [ , <db_name> , ... ] ] [ ALLOWED_SHARES = <share_name> [...
snowflake_docs/show-sequences_3_0.txt
Parameters ¶ ` LIKE ' _ pattern _ ' ` Optionally filters the command output by object name. The filter uses case- insensitive pattern matching, with support for SQL wildcard characters ( ` % ` and ` _ ` ). For example, the following patterns return the same results: ` ... LIKE '%testing%' ... ` ` ... L...
snowflake_docs/create-procedure_31_0.txt
label-creating-using-external-access-integration-using- udf) . Note that operating on any object in a schema also requires the USAGE privilege on the parent database and schema. For instructions on creating a custom role with a specified set of privileges, configure.html
snowflake_docs/copy-into-location_25_0.txt
000000925 > | 0 | quickly. bold deposits sleep slyly. packages use slyly > | > > ----+--------+----+-----------+------------+----------+-----------------+----+---------------------------------------------------------------------------+ > > > Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this pa...
snowflake_docs/create-network-rule_10_0.txt
Examples ¶ Create a network rule that is used to allow or block traffic from an AWS S3 endpoint to the internal stage: CREATE NETWORK RULE corporate_network TYPE = AWSVPCEID VALUE_LIST = ('vpce-123abc3420c1931') MODE = INTERNAL_STAGE COMMENT = 'corporate privatelink endpoint'; Copy Create...
snowflake_docs/array_insert_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/alter-aggregation-policy_6_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- OWNERSHIP | Aggregation policy | OWNERSHIP is a special privilege on an object that is automatically granted to the role that created the object, but can also be transferred using the [ role (or any role with the MANAGE G...
snowflake_docs/show-replication-accounts_0_0.txt
/ 4. Replication 11. Failover/Failback 18. Client Redirect SHOW REPLICATION ACCOUNTS
snowflake_docs/grant-privilege_10_0.txt
Considerations ¶ * When future grants are defined on the same object type for a database and a schema in the same database, the schema-level grants take precedence over the database level grants, and the database level grants are ignored. This behavior applies to privileges on future objects granted to one role ...
snowflake_docs/array_agg_16_0.txt
000000411", > | > | | "Clerk
snowflake_docs/create-service_8_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/data-types-structured_44_0.txt
Selecting Key-Value Pairs From an Existing OBJECT ¶ To return a new object that contains selected key-value pairs from an existing When calling this function, note the following: * For the arguments that are keys, you must specify constants. * You cannot pass in an ARRAY of keys as the second argument. You must...
snowflake_docs/summarize-snowflake-cortex_1_0.txt
SUMMARIZE (SNOWFLAKE.CORTEX) ¶ cortex/llm-functions.html
snowflake_docs/resource_monitors_0_0.txt
/ Schema: views)
snowflake_docs/regexp_2_0.txt
Syntax ¶ <subject> [ NOT ] REGEXP <pattern> Copy
snowflake_docs/st_dimension_1_0.txt
ST_DIMENSION ¶ types-geometry) , return the “dimension” of the value. The dimension of a GEOGRAPHY or GEOMETRY value is: Geospatial Object Type | Dimension ---|--- Point / MultiPoint | 0 LineString / MultiLineString | 1 Polygon / MultiPolygon | 2 GeometryCollection | The dimension of the collection is equa...
snowflake_docs/listing-access-history_7_0.txt
view_id
snowflake_docs/to_binary_0_0.txt
/ 1. Any Data Type 4. Text, Character, Binary Data Types 9. Numeric Data Types 18. Boolean Data Types 21. Date and Time Data Types 36. Semi-Structured Data Types 40. Geospatial Data Types conversion) TO_BINARY Categories:
snowflake_docs/drop-network-policy_1_0.txt
DROP NETWORK POLICY ¶ Removes the specified network policy from the system. Note Only security administrators (i.e. users with the SECURITYADMIN role) can drop network policies. See also:
snowflake_docs/create-stream_5_0.txt
Optional Parameters ¶ ` COPY GRANTS ` Specifies to retain the access permissions from the original stream when a new stream is created using any of the following CREATE STREAM variants: > * CREATE OR REPLACE STREAM > > * CREATE STREAM … CLONE > > The parameter copies all permissions, except OWNERSHIP, from t...
snowflake_docs/array_remove_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/drop-session-policy_3_0.txt
Syntax ¶ DROP SESSION POLICY [ IF EXISTS ] <name> Copy
snowflake_docs/st_intersection_agg_4_0.txt
Returns ¶ The function returns a value of type GEOGRAPHY.
snowflake_docs/call-with_20_0.txt
Language-Specific ¶
snowflake_docs/ltrim_1_0.txt
LTRIM ¶ Removes leading characters, including whitespace, from a string. See also :
snowflake_docs/to_array_3_0.txt
Syntax ¶ TO_ARRAY( <expr> ) Copy
snowflake_docs/truncate-materialized-view_4_0.txt
Usage Notes ¶ * Snowflake no longer supports truncation of materialized views. * If you truncate a materialized view, the background maintenance service automatically updates the materialized view. If any queries are executed on the view while it is in the process of being updated, Snowflake ensures consistent ...
snowflake_docs/drop-compute-pool_2_0.txt
Syntax ¶ DROP COMPUTE POOL [ IF EXISTS ] <name> Copy
snowflake_docs/bitmap_construct_agg_4_0.txt
Returns ¶ The function returns a BINARY value that is a bitmap with bits set for each distinct value in a group.
snowflake_docs/h3_cell_to_children_string_3_0.txt
Arguments ¶ ` _ cell_id _ ` A VARCHAR that represents the H3 cell ID ( [ index ` _ target_resolution _ ` An INTEGER between 0 and 15 (inclusive) specifying the H3 [ resolution returned H3 cells. Specifying any other INTEGER value results in an error.
snowflake_docs/to_xml_5_0.txt
Usage Notes ¶ * Common uses for this function include: * Generating a string that contains an XML-formatted value that matches an originally inserted XML-formatted value. * Converting a semi-structured value (which does not necessarily need to have been formatted as XML originally) into an XML-formatted ...
snowflake_docs/create-external-table_25_0.txt
Materialized view on an external table ¶ Create a materialized view based on a subquery of the columns in the external table created in the Partitions Added Automatically From Partition Column Expressions example: CREATE MATERIALIZED VIEW et1_mv AS SELECT col2 FROM et1; Copy For general syntax, usa...
snowflake_docs/create-iceberg-table_15_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/create-iceberg-table_0_0.txt
/ 2. Table 13. Dynamic Table 19. Event Table 24. External Table 30. Hybrid Table 36. Iceberg Table 43. View 49. Materialized View 56. Sequence CREATE ICEBERG TABLE
snowflake_docs/current_secondary_roles_2_0.txt
label-access-control-role-enforcement) in use for the current session. To activate a different set of secondary roles for the session, execute the [
snowflake_docs/insert-multi-table_9_0.txt
Multi-table Inserts with Aliases and References ¶ Insert values using a positional alias ( ` $1 ` ), an explicit alias ( ` an_alias ` ), and a default alias ( ` "10 + 20" ` ); this example inserts a single row with values ` (1, 50, 30) ` into table ` t1 ` : > > INSERT ALL > INTO t1 VALUES ($1, an_...
snowflake_docs/data-types-text_14_0.txt
Escape Sequences in Single-Quoted String Constants ¶ To include a single quote or other special characters (e.g. newlines) in a single-quoted string constant, you must escape these characters by using _backslash escape sequences_ . A backslash escape sequence is a sequence of characters that begins with a backslash ...
snowflake_docs/intro-summary-data-types_1_0.txt
Summary of Data Types ¶ Snowflake supports most SQL data types: Category | Type | Notes ---|---|--- | NUMBER | Default precision and scale are (38,0). DECIMAL, NUMERIC | Synonymous with NUMBER. INT, INTEGER, BIGINT, SMALLINT, TINYINT, BYTEINT | Synonymous with NUMBER except precision and scale cannot be spec...
snowflake_docs/listing-telemetry-daily_4_0.txt
Examples ¶ To review the click-through rates for each listing, run the following: SELECT listing_name, listing_display_name, event_date, SUM(IFF(event_type = 'LISTING CLICK', consumer_accounts_daily, 0)) AS listing_clicks, SUM(IFF(event_type IN ('GET', 'REQUEST') and action = 'START...
snowflake_docs/rtrimmed_length_2_0.txt
Syntax ¶ RTRIMMED_LENGTH( <string_expr> ) Copy
snowflake_docs/create-external-access-integration_8_0.txt
label-access-control-securable-objects) , see [ Overview of