id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/h3_coverage_strings_4_0.txt
Returns ¶ Returns an ARRAY of VARCHAR values for the hexadecimal IDs of the minimal set of H3 cells that have completely cover the specified input shape.
snowflake_docs/extract_answer-snowflake-cortex_7_0.txt
label-cortex-llm-privileges) for more information on granting this privilege.
snowflake_docs/try_hex_decode_string_4_0.txt
Returns ¶ The returned value is a string (VARCHAR).
snowflake_docs/drop-network-rule_9_0.txt
Examples ¶ Drop a network rule named ` myrule ` : > > DROP NETWORK RULE myrule; > > > Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Parameters 3. Access control requirements 4. Usage notes 5. Examples Language : **English**
snowflake_docs/create-iceberg-table_13_0.txt
Snowflake catalog parameters ¶ ` CATALOG = 'SNOWFLAKE' ` Specifies Snowflake as the Iceberg catalog. Snowflake handles all life-cycle maintenance, such as compaction, for the table. ` BASE_LOCATION = ' _ relative_path_from_external_volume _ ' ` Specifies a relative path from the table’s ` EXTERNAL_VOLUME ` ...
snowflake_docs/cbrt_0_0.txt
/ 1. Arithmetic 4. Rounding and Truncation 13. Exponent and Root 21. Logarithmic 24. Trigonometric 42. Other numeric) CBRT Categories:
snowflake_docs/parameters_112_0.txt
WEEK_START ¶ Type : Session — Can be set for Account » User » Session Data Type : Number Description : Specifies the first day of the week (used by week-related date functions). Values : ` 0 ` : Legacy Snowflake behavior is used (i.e. ISO-like semantics). ` 1 ` (Monday) to ` 7 ` (Sunday): All the week-related...
snowflake_docs/references_0_0.txt
/ References
snowflake_docs/commands-table_11_0.txt
Sequence ¶ Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. General Database Objects 2. Table 3. Dynamic Table 4. Event Table 5. External Table 6. Hybrid Table 7. Iceberg Table 8. View 9. Materialized View 10. Sequence Language : **English**
snowflake_docs/concat_ws_6_0.txt
Collation Details ¶
snowflake_docs/system_convert_pipes_sqs_to_sns_6_0.txt
Examples ¶ Convert all notifications from bucket ` my_s3_bucket ` : SELECT SYSTEM$CONVERT_PIPES_SQS_TO_SNS( 'my_s3_bucket', 'arn:aws:sns:us-east-2:111122223333:sns_topic'); Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Arguments 3. Access Control Requi...
snowflake_docs/alter-file-format_10_0.txt
TYPE = XML ¶ Available to all accounts. ` COMPRESSION = AUTO | GZIP | BZ2 | BROTLI | ZSTD | DEFLATE | RAW_DEFLATE | NONE ` Use : Data loading only Definition : * When loading data, specifies the current compression algorithm for the data file. Snowflake uses this option to detect how an already-...
snowflake_docs/create-authentication-policy_10_0.txt
Example ¶ Create an authentication policy named ` restrict_client_types_policy ` that only allows access through Snowsight or the Classic Console: CREATE AUTHENTICATION POLICY restrict_client_types_policy CLIENT_TYPES = ('SNOWFLAKE_UI') COMMENT = 'Auth policy that only allows access through the web ...
snowflake_docs/functions-semistructured_1_0.txt
Semi-structured and Structured Data Functions ¶ These functions are used with: The functions are grouped by type of operation performed: * Parsing JSON and XML data. * Extracting values from semi-structured and structured data (e.g. from an ARRAY, OBJECT, or MAP). * Converting/casting semi-structured data ty...
snowflake_docs/boolor_agg_3_0.txt
Arguments ¶ ` _ expr _ ` The input expression must be an expression that can be evaluated to a boolean or converted to a boolean. ` _ partition_expr _ ` This column or expression specifies how to separate the input into partitions (sub-windows).
snowflake_docs/system_whitelist_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$WHITELIST Categories:
snowflake_docs/create-projection-policy_10_0.txt
Examples ¶ Do not allow projecting a column: > > CREATE OR REPLACE PROJECTION POLICY do_not_project AS () > RETURNS PROJECTION_CONSTRAINT -> > PROJECTION_CONSTRAINT(ALLOW => false); > > > Copy Project a column for the ` analyst ` custom role, otherwise do not project the column: > > CREATE OR ...
snowflake_docs/as_timestamp_1_0.txt
AS_TIMESTAMP_* ¶ Casts a VARIANT value to the respective TIMESTAMP value: * AS_TIMESTAMP_LTZ (value with local time zone) * AS_TIMESTAMP_NTZ (value with no time zone) * AS_TIMESTAMP_TZ (value with time zone) See also:
snowflake_docs/alter-aggregation-policy_2_0.txt
label-aggregation-policy-ddl)
snowflake_docs/system_cancel_query_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$CANCEL_QUERY Categories:
snowflake_docs/create-integration_2_0.txt
Syntax ¶ CREATE [ OR REPLACE ] <integration_type> INTEGRATION [ IF NOT EXISTS ] <object_name> [ <integration_type_params> ] [ COMMENT = '<string_literal>' ] Copy Where ` _ integration_type_params _ ` are specific to the integration type. For specific syntax, usage notes, and examples, see:
snowflake_docs/create-dynamic-table_11_0.txt
Usage Notes ¶ * When you execute the CREATE DYNAMIC TABLE command, the current role in use becomes the owner of the dynamic table. This role is used to perform refreshes of the dynamic table in the background. * You cannot make changes to the schema after you create a dynamic table.
snowflake_docs/alter-table_31_0.txt
label-security-row-policy-refs) . > > alter table t1 drop row access policy rap_v1; > > > Copy The following example shows how to combine adding and dropping row access policies in a single SQL statement for a table. Verify the results by checking security-row-policy-refs) . > > alter table t1 > drop ro...
snowflake_docs/get_query_operator_stats_18_2.txt
| | "partitions_total": 1 | | | | | | | | | } ...
snowflake_docs/show-application-roles_4_0.txt
Optional 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%' ... `...
snowflake_docs/alter-stage_14_0.txt
Copy options ( ` copyOptions ` ) ¶ You can specify one or more of the following copy options (separated by blank spaces, commas, or new lines): ` ON_ERROR = CONTINUE | SKIP_FILE | SKIP_FILE_ _ num _ | 'SKIP_FILE_ _ num _ %' | ABORT_STATEMENT ` Use : Data loading only Definition : String (constant) th...
snowflake_docs/alter-secret_7_0.txt
Common parameters: all syntaxes ¶ ` SET ... ` > Specifies one (or more) parameters to set for the session (separated by > blank spaces, commas, or new lines). ` COMMENT = ' _ string_literal _ ' ` String (literal) that specifies a comment for the secret. Default: No value ` UNSET ... ` Specifies one (or more...
snowflake_docs/show-versions-in-model_1_0.txt
SHOW VERSIONS IN MODEL ¶ Available to all Snowflake accounts. Lists the versions in a machine learning model. Models may have multiple versions, one of which may be designated as the default (see [ ALTER MODEL The output returns table metadata and properties, ordered lexicographically by database, schema, and model ...
snowflake_docs/cume_dist_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/bitmap_count_1_0.txt
BITMAP_COUNT ¶ Given a bitmap that represents the set of distinct values for a column, returns the number of distinct value. See also: [ Using Bitmaps to Compute Distinct Values for Hierarchical Aggregations
snowflake_docs/alter-replication-group_11_0.txt
| | ______ day of month (1-31, or L)
snowflake_docs/create-security-integration-api-auth_1_0.txt
CREATE SECURITY INTEGRATION (External API Authentication) ¶ Creates a new security integration for external API Authentication in the account or replaces an existing integration. For information about creating other types of security integrations (e.g. integration) . See also:
snowflake_docs/create-password-policy_6_0.txt
label-custom-password-policies) . ` PASSWORD_MAX_RETRIES = _ integer _ ` Specifies the maximum number of attempts to enter a password before being locked out. Supported range: 1 to 10, inclusive. Default: 5 Important This parameter is stateful. For details, see the note in [ Custom password management.html
snowflake_docs/getbit_2_0.txt
Syntax ¶ GETBIT( <integer_expr>, <bit_position> ) Copy
snowflake_docs/st_length_3_0.txt
label-data-types-geometry) object.
snowflake_docs/data-types-numeric_13_0.txt
DOUBLE , DOUBLE PRECISION , REAL ¶ Synonymous with FLOAT.
snowflake_docs/select_2_0.txt
Syntax ¶ The following sections describe the syntax for this command: * Selecting All Columns * Selecting Specific Columns
snowflake_docs/roles_3_0.txt
Usage notes ¶ * Latency for the view may be up to 120 minutes (2 hours).
snowflake_docs/complete-snowflake-cortex_10_0.txt
label-cortex-llm-privileges) for more information on granting this privilege.
snowflake_docs/collation_30_0.txt
Collation is Supported only for Strings up to 8MB ¶ Although the Snowflake VARCHAR data type supports strings up to 16MB, Snowflake supports collation only when the resulting string is 8MB or less. (Some collation operations can lengthen a string.)
snowflake_docs/st_difference_1_0.txt
ST_DIFFERENCE ¶ Given two input GEOGRAPHY objects, returns a GEOGRAPHY object that represents the points in the first object that are not in the second object (i.e. the difference between the two objects). See also:
snowflake_docs/account-usage_4_0.txt
Dropped Object Records ¶ Account usage views include records for all objects that have been dropped. Many of the views for object types contain an additional ` DELETED ` column that displays the timestamp when the object was dropped. In addition, because objects can be dropped and recreated with the same name, to d...
snowflake_docs/extract_semantic_categories_2_0.txt
label-classification-system-tags)
snowflake_docs/metadata_2_0.txt
label-notification-integration-features) . guide/scim-intro) . | Job | guide/snowpark-container-services/working-with-jobs) | Organization | | Pipe | | Policies | policies) | Procedure | procedures-overview) | Replication group | [ Introduction to replication and failover across multiple accounts | Resource monitor...
snowflake_docs/create-procedure_3_0.txt
Java Handler ¶ You can create a stored procedure that either includes its handler code in- line, or refers to its handler code in a JAR file. For more information, see [ staged) . guide/stored-procedure/stored-procedures-java.html
snowflake_docs/date-time-input-output_5_0.txt
Output Formats ¶ The following parameters define the formats for date and time output from Snowflake: In addition, the following parameter maps the TIMESTAMP data type alias to one of the three TIMESTAMP_* variations:
snowflake_docs/system_client_version_info_3_0.txt
Arguments ¶ None
snowflake_docs/array_compact_1_0.txt
ARRAY_COMPACT ¶ Returns a compacted array with missing and null values removed, effectively converting sparse arrays into dense arrays.
snowflake_docs/create-managed-account_1_0.txt
CREATE MANAGED ACCOUNT ¶ enabled for all accounts Provider sharing is enabled by default for most, but not all accounts. If you encounter errors when attempting to share data with consumers, the feature may not be enabled for your account. To inquire about enabling it, please contact [ Snowflake Support Snowflake-Lo...
snowflake_docs/drop-index_4_0.txt
Parameters ¶ ` _ table_name _ ` Specifies the identifier for the table. ` _ index_name _ ` Specifies the identifier for the index.
snowflake_docs/upper_3_0.txt
Collation Details ¶ Arguments with collation specifications are currently not supported.
snowflake_docs/remaining_balance_daily_legacy_0_0.txt
/ 24. Legacy Views (Legacy)
snowflake_docs/show-streams_1_0.txt
SHOW STREAMS ¶ Lists the streams for which you have access privileges. The command can be used to list streams for the current/specified database or schema, or across your entire account. The output returns stream metadata and properties, ordered lexicographically by database, schema, and stream name (see Output i...
snowflake_docs/hll_2_0.txt
Syntax ¶ **Aggregate function** HLL( [ DISTINCT ] <expr1> [ , ... ] ) HLL(*) Copy **Window function** HLL( [ DISTINCT ] <expr1> [ , ... ] ) OVER ( [ PARTITION BY <expr2> ] ) HLL(*) OVER ( [ PARTITION BY <expr2> ] ) Copy
snowflake_docs/system_generate_saml_csr_5_0.txt
Example ¶ To generate a CSR with the subject set to the subject of the current certificate stored in the SAML2 integration, execute the function with the ` _ name _ ` parameter only. For example: > > select system$generate_saml_csr('my_idp'); > > > -------------------------------------------------------------...
snowflake_docs/functions-metadata_0_0.txt
/
snowflake_docs/hex_encode_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/system_get_tag_on_current_table_5_0.txt
Examples ¶ For a contextual example on how to use this function, see [ Example 3: Protect masking-policies.html
snowflake_docs/in_5_0.txt
_ ` is an individual element of a row constructor. ` _ subquery _ ` A subquery that returns a list of values to which ` _ value _ ` can be compared.
snowflake_docs/create-row-access-policy_8_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/sysdate_2_0.txt
Syntax ¶ SYSDATE() Copy
snowflake_docs/alter-replication-group_1_0.txt
ALTER REPLICATION GROUP ¶ * Database and share replication are available to all accounts. guide/account-replication-intro.html
snowflake_docs/functions-date-time_7_0.txt
First/Last Weeks of the Year ¶ functions behave. The parameter can have two values: * ` 1 ` : January 1 always starts the first week of the year and December 31 is always in the last week of the year. This means that the first week and last week in the year may have fewer than 7 days. Note that this behavior is ...
snowflake_docs/add_resource_5_0.txt
Access Control Requirements ¶ The following privileges and roles are required to call this method for a custom budget: * A role granted the USAGE privilege on the database and schema that contains the budget instance. * A role with the APPLYBUDGET privilege on the object being added.
snowflake_docs/show-global-accounts_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/show-applications_2_0.txt
Syntax ¶ SHOW APPLICATIONS [ LIKE '<pattern>' ] [ STARTS WITH '<name_string>' ] [ LIMIT <rows> [ FROM '<name_string>' ] ]; Copy
snowflake_docs/as_time_3_0.txt
Arguments ¶ ` _ variant_expr _ ` An expression that evaluates to a value of type VARIANT.
snowflake_docs/st_transform_1_0.txt
ST_TRANSFORM ¶ geometry) object from one [ spatial reference system (SRS) Use this function to [ change the SRID and the coordinates of the object to geospatial.html
snowflake_docs/account-usage_21_0.txt
Examples: Warehouse Credit Usage ¶ Credits used by each warehouse in your account (month-to-date): > > select warehouse_name, > sum(credits_used) as total_credits_used > from warehouse_metering_history > where start_time >= date_trunc(month, current_date) > group by 1 > order by 2 desc...
snowflake_docs/rtrim_3_0.txt
Arguments ¶ ` _ expr _ ` The string expression to be trimmed. ` _ characters _ ` One or more characters to remove from the right side of ` _ expr _ ` : The default value is ` ' ' ` (a single blank space character), i.e. if no characters are specified, only blank spaces are removed.
snowflake_docs/show-streamlits_4_0.txt
Usage Notes ¶ * You can use this command to list Streamlit objects for the current/specified database or schema, or across your entire account. * The command does not list Streamlit objects that have been dropped. * The command does not require a running warehouse to run.
snowflake_docs/system_get_tag_5_0.txt
label-object-tags-ddl-privilege-summary) .
snowflake_docs/array_position_2_0.txt
Syntax ¶ ARRAY_POSITION( <variant_expr> , <array> ) Copy
snowflake_docs/data-types-semistructured_23_0.txt
Examples ¶ This first example shows the output of a DESC TABLE command on a table with VARIANT, ARRAY, and OBJECT data. CREATE OR REPLACE TABLE test_semi_structured(var VARIANT, arr ARRAY, obj OBJECT ...
snowflake_docs/show-databases-in-failover-group_1_0.txt
SHOW DATABASES IN FAILOVER GROUP ¶ Requires Business Critical Edition (or higher). To inquire about upgrading, please contact [ Snowflake Support Snowflake-Lodge) . Lists databases in a failover group. See also:
snowflake_docs/date_trunc_5_0.txt
Examples ¶ Truncate a date (from a timestamp) down to the year, month, and day: > > SELECT TO_DATE('2015-05-08T23:39:20.123-07:00') AS "DATE1", > DATE_TRUNC('YEAR', "DATE1") AS "TRUNCATED TO YEAR", > DATE_TRUNC('MONTH', "DATE1") AS "TRUNCATED TO MONTH", > DATE_TRUNC('DAY', "DATE1...
snowflake_docs/lock_wait_history_3_0.txt
Usage Notes ¶ * The first blocker query ID that is returned in the ` blocker_queries ` array is the ID of the query that was being executed in the transaction that holds the lock when the transaction waiting for the lock started waiting. Note that it is possible that queries prior to that query in the blocker tra...
snowflake_docs/st_within_3_0.txt
Arguments ¶ ` _ geography_expression_1 _ ` A GEOGRAPHY object that is not a GeometryCollection or FeatureCollection. ` _ geography_expression_2 _ ` A GEOGRAPHY object that is not a GeometryCollection or FeatureCollection. ` _ geometry_expression_1 _ ` A GEOMETRY object that is not a GeometryCollection or FeatureC...
snowflake_docs/transactions_15_0.txt
Using a Transaction in a Stored Procedure ¶ You can execute zero, one, or more transactions inside a stored procedure. The following pseudo-code shows an example of two transactions in one stored procedure: CREATE PROCEDURE p1() ... $$ begin transaction; statement C; statement D; ...
snowflake_docs/ilike_1_0.txt
[ NOT ] ILIKE ¶ Performs a case-insensitive comparison to determine whether a string matches or does not match a specified pattern. For case-sensitive matching, use LIKE instead. LIKE, ILIKE, and RLIKE all perform similar operations. However, RLIKE uses POSIX ERE (Extended Regular Expression) syntax instead of the S...
snowflake_docs/desc-password-policy_8_0.txt
label-access-control-securable-objects) , see [ Overview of For additional details on password policy DDL and privileges, see [ Managing password-policy-mgmt) .
snowflake_docs/endswith_7_0.txt
Examples ¶ SELECT * FROM strings; ---------+ S | ---------+ coffee | ice tea | latte | tea | [NULL] | ---------+ SELECT * FROM strings WHERE ENDSWITH(s, 'te'); -------+ S | -------+ latte | -------+ Copy The following example u...
snowflake_docs/contract_items_legacy_0_0.txt
/ 24. Legacy Views
snowflake_docs/concat_ws_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/xmlget_4_0.txt
label-data-type-object) (or a VARIANT containing an OBJECT). The OBJECT must contain valid XML in the internal format that Snowflake supports. Typically, that means that the OBJECT was produced by one of the following: The XMLGET function does not operate directly on a VARCHAR expression even if that VARCHAR contains v...
snowflake_docs/min_by_4_0.txt
Returns ¶ * If ` _ maximum_number_of_values_to_return _ ` is not specified, the function returns a value of the same type as ` _ col_to_return _ ` . * If ` _ maximum_number_of_values_to_return _ ` is specified, the function returns an ARRAY containing values of the same type as ` _ col_to_return _ ` . The v...
snowflake_docs/data-type-conversion_5_0.txt
Implicit Casting (“Coercion”) ¶ Coercion occurs when a function (or operator) requires a data type that is different from, but compatible with, the arguments (or operands). * Examples for functions or stored procedures: * The following code coerces the INTEGER value in column ` my_integer_column ` to FLOAT s...
snowflake_docs/create-user_5_1.txt
that their MFA device is not available. ` RSA_PUBLIC_KEY = _ string _ ` Specifies the user’s RSA public key; used for [ key pair authentication ` RSA_PUBLIC_KEY_FP = _ string _ ` Specifies the fingerprint of the user’s RSA public key; used for [ key pair ` RSA_PUBLIC_KEY_2 = _ string _ ` Specifies the user’s ...
snowflake_docs/like_any_6_0.txt
Usage Notes ¶ * SQL wildcards are supported in ` _ pattern _ ` : * An underscore ( ` _ ` ) matches any single character. * A percent sign ( ` % ` ) matches any sequence of zero or more characters. * Wildcards in ` _ pattern _ ` include newline characters ( ` n ` ) in ` _ subject _ ` as matches. ...
snowflake_docs/create-session-policy_0_0.txt
/ 1. Authentication Policy 7. Network Policy 13. Network Rule 19. Packages Policy 25. Password Policy 31. Session Policy 37. Secret POLICY
snowflake_docs/system_get_login_failure_details_5_0.txt
Usage notes ¶ Only administrators that have a MONITOR privilege assigned to their role can use this function.
snowflake_docs/st_geographyfromwkt_6_0.txt
Usage Notes ¶ * Issues an error if the input cannot be parsed as WKT or EWKT. * For the coordinates in WKT, EWKT, and GeoJSON, longitude appears before latitude (e.g. ` POINT( _ lon _ _ lat _ ) ` ).
snowflake_docs/set_notification_mute_flag_2_0.txt
Syntax ¶ <budget_name>!SET_NOTIFICATION_MUTE_FLAG( { TRUE | FALSE } ); Copy
snowflake_docs/top_insights_1_0.txt
TOP_INSIGHTS (SNOWFLAKE.ML) ¶ Available to all accounts. Finds the most important dimensions in a dataset, builds segments from those dimensions, and then detects which of those segments influenced the metric. TOP_INSIGHTS is well-suited to extracting root causes from datasets that have a large number of dimensions....
snowflake_docs/commands-table_1_0.txt
Table, View, and Sequence Commands ¶ Table, view, and sequence commands enable you to manage your tables, views, and sequences.
snowflake_docs/alter-user_7_0.txt
Usage Notes ¶ * Only the role with the OWNERSHIP privilege on the user, or a higher role, can execute this command to modify most user properties. Tip When changing a user’s password using ` SET PASSWORD = ' _ string _ ' ` , we recommend also specifying ` MUST_CHANGE_PASSWORD = TRUE ` to force the user t...
snowflake_docs/alter-function_2_0.txt
Syntax ¶
snowflake_docs/connect-by_7_0.txt
112 bolt', 16, 112, 12) -- Can use same type of bolt in multiple places >> ; >> >> >> Copy > > Here are the query and output: > >> >> SELECT >> description, >> quantity, >> component_id, >> parent_component_ID, >> SYS_CONNECT_BY_PATH(component_ID, ' -> ') AS path >> F...
snowflake_docs/validate_pipe_load_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/decompress_binary_6_0.txt
Returns ¶ A ` BINARY ` value with decompressed data.