id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/system_reference_5_0.txt
Returns ¶ A serialized string representation of the reference that can be used as an identifier.
snowflake_docs/system_block_internal_stages_public_access_3_0.txt
Syntax ¶ > > SYSTEM$BLOCK_INTERNAL_STAGES_PUBLIC_ACCESS() > > > Copy
snowflake_docs/drop-procedure_1_0.txt
DROP PROCEDURE ¶ Removes the specified stored procedure from the current/specified schema. See also:
snowflake_docs/alter-masking-policy_6_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/collation_3_0.txt
Understanding Collation ¶ Text strings in Snowflake are stored using the UTF-8 character set and, by default, strings are compared according to the Unicode codes that represent the characters in the string. However, comparing strings based on their UTF-8 character representations might not provide the desired/expect...
snowflake_docs/split_to_table_4_0.txt
Returns ¶ The returned value is a table. The returned rows consist of a fixed set of columns: > > +-----+-------+-------+ > | SEQ | INDEX | VALUE | > |-----+-------+-------| > > > Copy SEQ : A unique sequence number associated with the input record; the sequence is not guaranteed to be gap-free or ord...
snowflake_docs/h3_cell_to_parent_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) H3_CELL_TO_PARENT Categories:
snowflake_docs/create-materialized-view_1_0.txt
CREATE MATERIALIZED VIEW ¶ Materialized views require Enterprise Edition. To inquire about upgrading, please contact [ Snowflake Support Snowflake-Lodge) . Creates a new materialized view in the current/specified schema, based on a query of an existing table, and populates the view with data. guide/views-materialize...
snowflake_docs/where_4_1.txt
re ` t3 ` is the > inner table). > > > select t1.c1 > from t1, t2, t3 > where t1.c1 = t2.c2 (+) > and t2.c2 = t3.c3 (+); > > > Copy > > The ` (+) ` may be immediately adjacent to the table and column name, or it may be separated by whitespace. Both of the following are valid: > >...
snowflake_docs/drop-password-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/try_to_geography_1_0.txt
TRY_TO_GEOGRAPHY ¶ geospatial) . returns NULL when TO_GEOGRAPHY would return an error. See also:
snowflake_docs/build_stage_file_url_4_0.txt
Returns ¶ The function returns a file URL in the following format: https://<account_identifier>/api/files/<db_name>/<schema_name>/<stage_name>/<relative_path> Copy Where: ` account_identifier ` Hostname of the Snowflake account for your stage. The hostname starts with an account locator (provided by Snowflake) ...
snowflake_docs/system_get_aws_sns_iam_policy_4_0.txt
Usage notes ¶ * All arguments are strings (i.e. they must be enclosed in single quotes).
snowflake_docs/grant-role_0_0.txt
/ 1. User Management 7. Database Role Management 16. Account-level Role Management 25. Privilege Management GRANT ROLE
snowflake_docs/date-time-input-output_19_0.txt
Context Dependency ¶ Not all restrictions are enforced equally in all contexts. For example, some expressions might roll over February 31, while others might not.
snowflake_docs/zipf_0_0.txt
/ 1. Random 5. Controlled Distribution reference/functions-data-generation) ZIPF Categories:
snowflake_docs/desc-service_12_0.txt
Examples ¶ The following example describes the service named ` echo_service ` : DESCRIBE SERVICE echo_service; Copy +--------------------+---------------+-------------+----------+-----------------------+-----------------------------------------------------------------------+---------------+---------------+-...
snowflake_docs/storage_usage_0_0.txt
/ Schemas: views)
snowflake_docs/array_sort_1_0.txt
ARRAY_SORT ¶ that contains the elements of the input ARRAY sorted in ascending or descending order. You can specify whether or not NULL elements are sorted before or after non-NULL elements.
snowflake_docs/system_get_privatelink_config_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$GET_PRIVATELINK_CONFIG Categories:
snowflake_docs/previous_day_5_0.txt
Examples ¶ Return the date of the previous Friday that occurred before the current date: > > SELECT CURRENT_DATE() AS "Today's Date", > PREVIOUS_DAY("Today's Date", 'Friday ') AS "Previous Friday"; > > +--------------+-----------------+ > | Today's Date | Previous Friday | > |-----------...
snowflake_docs/bitnot_5_0.txt
Usage Notes ¶ * If the data type of the argument is numeric but not ` INTEGER ` (e.g. FLOAT, DECIMAL, etc.), then the argument is cast to ` INTEGER ` . * If the data type of the argument is a string (e.g. ` VARCHAR ` ), then the argument is cast to ` INTEGER ` if possible. For example, the string ‘12.3’ is ...
snowflake_docs/drop-application-role_4_0.txt
Usage notes ¶ * This command can only be run within the context of an application created using the Native App Framework. * Dropped application roles cannot be recovered; they must be recreated within the application. * Application roles are not versioned. When dropping an application role from a setup scrip...
snowflake_docs/cbrt_4_0.txt
Examples ¶ SELECT x, cbrt(x) FROM tab; --------+-------------+ x | cbrt(x) | --------+-------------+ 0 | 0 | 2 | 1.25992105 | -10 | -2.15443469 | [NULL] | [NULL] | --------+-------------+ Copy Was this page helpful? Yes No Inc. All Righ...
snowflake_docs/data-types-structured_49_0.txt
Using Structured Types with Set Operators and CASE Expressions ¶ You can use structured ARRAYs, structured OBJECTs, and MAPs in: For set operators, if different types are used in the different expressions (e.g. if one type is ARRAY(NUMBER) and the other is ARRAY(DOUBLE)), one type will be coerced to the other.
snowflake_docs/contains_3_0.txt
Arguments ¶ ` _ expr1 _ ` The string to search in. ` _ expr2 _ ` The string to search for.
snowflake_docs/show-masking-policies_2_0.txt
Syntax ¶ SHOW MASKING POLICIES [ LIKE '<pattern>' ] [ IN { ACCOUNT | DATABASE | DATABASE <database_name> | ...
snowflake_docs/h3_cell_to_point_2_0.txt
Syntax ¶ H3_CELL_TO_POINT( <cell_id> ) Copy
snowflake_docs/ifnull_3_0.txt
Arguments ¶ ` _ expr1 _ ` A general expression. ` _ expr2 _ ` A general expression.
snowflake_docs/h3_cell_to_children_3_0.txt
Syntax ¶ H3_CELL_TO_CHILDREN( <cell_id> , <target_resolution> ) Copy
snowflake_docs/parameters_14_0.txt
label-browser-based-sso-connection-caching) . Values : ` TRUE ` : Stores a connection token in the client-side operating system keystore to enable the client application to perform browser-based SSO without prompting users to authenticate whenever a new connection is established. ` FALSE ` : Does not store a connect...
snowflake_docs/references_4_0.txt
Privileges verified at execution time ¶ The privileges granted to the role that created the reference are verified at the time the reference is used. For example, a role ` my_role ` creates a reference to a table ` t1 ` with the SELECT privilege. If ` my_role ` is dropped or the SELECT privilege on table ` t1 ` ...
snowflake_docs/alter-table_21_1.txt
gn-key constraint in a hybrid table, the corresponding index will also > be created or dropped. For more information on indexes in a hybrid table, > > * Foreign-key constraints are supported only across hybrid tables that > are storaged in the same database. The ability to move a hybrid table from > one database to...
snowflake_docs/try_hex_decode_string_5_0.txt
Examples ¶ This shows how to use the function: > Create a table and data: > >> >> CREATE TABLE hex (v VARCHAR, hex_string VARCHAR, garbage VARCHAR); >> INSERT INTO hex (v, hex_string, garbage) >> SELECT 'AaBb', HEX_ENCODE('AaBb'), '127'; >> >> >> Copy > > Now run the query: > >> >> SELECT v, hex_...
snowflake_docs/show-warehouses_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/system_typeof_6_0.txt
Examples ¶ SELECT SYSTEM$TYPEOF(null) FROM (values(1)) v; ---------------------+ SYSTEM$TYPEOF(NULL) | ---------------------+ NULL[LOB] | ---------------------+ Copy SELECT SYSTEM$TYPEOF(1) FROM (values(1)) v; ------------------+ SYSTEM$TYPEOF(1) | ---------------...
snowflake_docs/call_4_0.txt
Optional Parameters ¶ ` INTO : _ snowflake_scripting_variable _ ` guide/snowflake-scripting/variables) to the return value of the stored procedure.
snowflake_docs/zeroifnull_0_0.txt
/ reference/expressions-conditional) ZEROIFNULL Categories:
snowflake_docs/drop-stream_1_0.txt
DROP STREAM ¶ Removes a stream from the current/specified schema. See also:
snowflake_docs/show-versions_2_0.txt
Syntax ¶ SHOW VERSIONS [ LIKE <pattern> ] IN APPLICATION PACKAGE <name>; Copy
snowflake_docs/h3_string_to_int_3_0.txt
Arguments ¶ ` _ cell_id _ ` library/h3Indexing) ) in hexadecimal format.
snowflake_docs/rtrimmed_length_3_0.txt
Usage Notes ¶ * Equivalent to ` {fn LENGTH(str)} ` in ODBC.
snowflake_docs/regexp_7_0.txt
Examples ¶ The example below shows how to use REGEXP with a simple wildcard expression: > Create the table and load data: > > > CREATE OR REPLACE TABLE strings (v VARCHAR(50)); > INSERT INTO strings (v) VALUES > ('San Francisco'), > ('San Jose'), > ('Santa Clara'), > ('Sac...
snowflake_docs/create-custom-classifier_1_0.txt
CREATE CUSTOM_CLASSIFIER ¶ _Fully qualified name:_ SNOWFLAKE.DATA_PRIVACY.CUSTOM_CLASSIFIER Available to all Snowflake accounts that are [ Enterprise Edition Custom Classification requires Enterprise Edition (or higher). To inquire about upgrading, please contact [ Snowflake Support Snowflake-Lodge) . See also: cust...
snowflake_docs/approx_top_k_estimate_1_0.txt
APPROX_TOP_K_ESTIMATE ¶ Returns the approximate most frequent values and their estimated frequency for the given Space-Saving state. (For more information about the Space-Saving approximate-frequent-values) .) A Space-Saving state produced by [ APPROX_TOP_K_ACCUMULATE can be used to compute a cardinality estimate us...
snowflake_docs/show-endpoints_1_0.txt
SHOW ENDPOINTS ¶ > services/overview) is available to all Snowflake accounts in AWS commercial > regions except for trial accounts. Lists the endpoints in a [ Snowpark Container Services service See also:
snowflake_docs/first_value_1_0.txt
FIRST_VALUE ¶ Returns the first value within an ordered group of values. See also:
snowflake_docs/commands-class_1_0.txt
Class and Instance Commands ¶ Class and instance related commands enable you to view classes and drop an instance of a class. All classes support CREATE, DROP, and SHOW commands. For more information classes) . class.
snowflake_docs/select_1_0.txt
SELECT ¶ SELECT can be used as either a statement or as a clause within other statements: * As a statement, the SELECT statement is the most commonly executed SQL statement; it queries the database and retrieves a set of rows. * As a clause, SELECT defines the set of columns returned by a query. See also:
snowflake_docs/array_to_string_6_0.txt
Examples ¶ > > SELECT column1, > ARRAY_TO_STRING(PARSE_JSON(column1), '') AS no_separation, > ARRAY_TO_STRING(PARSE_JSON(column1), ', ') AS comma_separated > FROM VALUES > (NULL), > ('[]'), > ('[1]'), > ('[1, 2]'), > ('[true, 1, -1.2e-3, "Abc", ["x","...
snowflake_docs/date_trunc_2_0.txt
Syntax ¶ DATE_TRUNC( <date_or_time_part>, <date_or_time_expr> ) Copy
snowflake_docs/data-types-geospatial_32_0.txt
Converting Between GEOGRAPHY and GEOMETRY ¶ Snowflake supports converting from a GEOGRAPHY object to a GEOMETRY object (and vice versa). Snowflake also supports transformations of objects that use different spatial reference systems (SRS). The following example converts a GEOGRAPHY object that represents a point to ...
snowflake_docs/create-share_3_0.txt
Required Parameters ¶ ` _ name _ ` Specifies the identifier for the share; must be unique for the account in which the share is created. In addition, the identifier must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quote...
snowflake_docs/map_keys_1_0.txt
MAP_KEYS ¶ available to all accounts.
snowflake_docs/commands-user-role_0_0.txt
/ 1. User Management 7. Database Role Management 16. Account-level Role Management 25. Privilege Management commands) Users, Roles, & Privileges
snowflake_docs/h3_polygon_to_cells_8_0.txt
Examples ¶ The following example returns an ARRAY of the IDs of H3 cells that have centroids contained in the specified Polygon. SELECT H3_POLYGON_TO_CELLS( TO_GEOGRAPHY( 'POLYGON((-122.481889 37.826683,-122.479487 37.808548,-122.474150 37.808904,-122.476510 37.826935,-122.481889 37.826683))' ...
snowflake_docs/date_part_1_0.txt
DATE_PART ¶ Extracts the specified date or time part from a date, time, or timestamp. Alternatives:
snowflake_docs/create-budget_5_0.txt
Access Control Requirements ¶ overview.html
snowflake_docs/join_3_0.txt
Usage Notes ¶ * The following restrictions apply to table functions other than SQL UDTFs: * You cannot specify the ON, USING, or NATURAL JOIN clause in a lateral table function (other than a SQL UDTF). For example, the following syntax is not allowed: SELECT ... FROM my_table JOIN T...
snowflake_docs/randstr_2_0.txt
Syntax ¶ RANDSTR( <length> , <gen> ) Copy
snowflake_docs/st_geohash_2_0.txt
Syntax ¶ ST_GEOHASH( <geography_expression> [, <precision> ] ) ST_GEOHASH( <geometry_expression> [, <precision> ] ) Copy
snowflake_docs/create-storage-integration_4_0.txt
Optional parameters ¶ ` STORAGE_BLOCKED_LOCATIONS = (' _ cloud_specific_url _ ') ` Explicitly prohibits external stages that use the integration from referencing one or more storage locations (i.e. S3 buckets or GCS buckets). Supports a comma-separated list of URLs for existing storage locations and, optionally...
snowflake_docs/alter-security-integration-oauth-snowflake_0_0.txt
/ 1. General 7. API 10. Catalog 15. External access 18. Notification 21. Security 25. Storage Snowflake OAuth
snowflake_docs/create-event-table_1_0.txt
CREATE EVENT TABLE ¶ setting-up) that captures events, including logged messages from functions and procedures. See also:
snowflake_docs/functions-regexp_0_0.txt
/
snowflake_docs/parameters_20_0.txt
CLIENT_ENCRYPTION_KEY_SIZE ¶ Type : Account — Can be set only for Account Data Type : Integer Clients : Any Description : Specifies the AES encryption key size, in bits, used by Snowflake to encrypt/decrypt files stored on internal stages (for loading/unloading data) when you use the ` SNOWFLAKE_FULL ` encrypti...
snowflake_docs/binary-examples_4_0.txt
Getting the MD5 Digest in Base64 ¶ Convert the binary MD5 digest to a base64 string using [ TO_CHAR , TO_VARCHAR SELECT to_char(md5_binary(c1), 'base64') FROM variants; +----------+-----------------------------------+ | C1 | TO_CHAR(MD5_BINARY(C1), 'BASE64') | |----------+----------------------...
snowflake_docs/show-external-volumes_7_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/data-types-geospatial_18_0.txt
label-sql-java-data-type-mappings) and [ Passing a GEOGRAPHY cookbook.html
snowflake_docs/metadata_1_0.txt
Metadata Fields in Snowflake ¶ The data contained in metadata fields may be processed outside of your Snowflake Region. It is a customer responsibility to ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered into any metadata field wh...
snowflake_docs/alter-model_7_0.txt
label-access-control-securable-objects) , see [ Overview of Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Parameters 3. Access Control Requirements Language : **English**
snowflake_docs/system_get_service_status_5_0.txt
Returns ¶ Returns status information in a JSON array with one JSON object for each container in each service instance. The JSON fields are: * ` status ` . Service container status. Currently supported status values include: PENDING, READY, FAILED and UNKNOWN. * ` message ` . Provides details about the specifi...
snowflake_docs/alter-file-format_11_0.txt
Usage Notes ¶ * ALTER FILE FORMAT does not support the following actions: * Changing the type (CSV, JSON, etc.) for the file format. * Unsetting any format options (i.e. resetting the options to the defaults for the type). * Unsetting (i.e. removing) a comment. To make any of these changes, you mus...
snowflake_docs/rollback_1_0.txt
ROLLBACK ¶ Rolls back an open transaction in the current session. See also:
snowflake_docs/get_ddl_9_0.txt
Collation Details ¶ * Collation information is included in the input.
snowflake_docs/dynamic_table_graph_history_2_0.txt
Syntax ¶ DYNAMIC_TABLE_GRAPH_HISTORY( [ AS_OF => <constant_expr> ] [ , HISTORY_START => <constant_expr> [ , HISTORY_END => <constant_expr> ] ] ) Copy
snowflake_docs/current_session_0_0.txt
/ 1. General 14. Session 29. Session Object 41. Alert context) CURRENT_SESSION Categories:
snowflake_docs/system_get_login_failure_details_11_0.txt
label-key-pair-troubleshooting- common-errors) . 394301 | JWT_TOKEN_MISSING_ISSUE_OR_EXPIRATION_TIME | The JWT token does not contain an issue time or an expiration time. 394302 | JWT_TOKEN_INVALID_ISSUE_TIME | The JWT token was received by Snowflake more than 60 seconds after the issue guide/key-pair-auth-troubles...
snowflake_docs/parameters_17_0.txt
BINARY_INPUT_FORMAT ¶ Type : Session — Can be set for Account » User » Session Data Type : String (Constant) Description : The format of VARCHAR values passed as input to VARCHAR-to-BINARY conversion input-output) . Values : ` HEX ` , ` BASE64 ` , or ` UTF8 ` / ` UTF-8 ` Default : ` HEX `
snowflake_docs/sha2_6_0.txt
Examples ¶ SELECT sha2('Snowflake', 224); ----------------------------------------------------------+ SHA2('SNOWFLAKE', 224) | ----------------------------------------------------------+ 6267d3d7a59929e6864dd4b737d98e3ef8569d9f88a7466647838532 | -----------...
snowflake_docs/parameters_21_0.txt
CLIENT_MEMORY_LIMIT ¶ Type : Session — Can be set for Account » User » Session Data Type : Integer Clients : JDBC, ODBC Description : Parameter that specifies the maximum amount of memory the JDBC driver or ODBC driver should use for the result set from queries (in MB). For the JDBC driver: * To simplify JVM m...
snowflake_docs/system_whitelist_privatelink_4_0.txt
Returns ¶ The data type of the returned value is ` VARIANT ` . The value is an array of JSON structures. Each JSON structure contains three key/value pairs: ` type ` Snowflake supports the following types: ` SNOWFLAKE_DEPLOYMENT ` Hostname and port number information for your Snowflake account. ` SNOWFLAKE_DEPLOY...
snowflake_docs/upper_2_0.txt
Syntax ¶ UPPER( <expr> ) Copy
snowflake_docs/md5_number_lower64_6_0.txt
Examples ¶ select md5_number_lower64('Snowflake'); +---------------------------------+ | MD5_NUMBER_LOWER64('SNOWFLAKE') | |---------------------------------| | 9203306159527282910 | +---------------------------------+ Copy Was this page helpful? Yes No Inc. All Rights Reserved ...
snowflake_docs/grant-privilege-application-role_7_0.txt
Access control requirements ¶ * This command can only be executed from within the application. SHOW OBJECTS OWNED BY APPLICATION myapp; Copy * Regarding managed access schemas: * In managed access schemas (i.e. schemas created using the CREATE SCHEMA … WITH MANAGED ACCESS syntax), object owners los...
snowflake_docs/ascii_5_0.txt
Usage Notes ¶ The value 0 is returned for either of the following cases: * The first character of the string contains the ASCII character corresponding to 0. * The string is empty. To distinguish between these two cases, use the LENGTH function to determine whether the string is empty.
snowflake_docs/is-distinct-from_0_0.txt
/ reference/expressions-conditional) IS [NOT] DISTINCT FROM Categories:
snowflake_docs/create-streamlit_0_0.txt
/
snowflake_docs/drop-streamlit_4_0.txt
Usage Notes ¶ Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Required Parameters 3. Usage Notes Related content Language : **English**
snowflake_docs/complete_task_graphs_10_0.txt
Examples ¶ Retrieve records for the 10 most recent task graph runs completed in your account: select root_task_name, state from snowflake.account_usage.complete_task_graphs limit 10; Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Columns 2. Usage Notes 3. Examples ...
snowflake_docs/drop-packages-policy_6_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/object_keys_7_0.txt
Basic Example ¶ types-semistructured.html
snowflake_docs/encrypt_3_0.txt
Arguments ¶ **Required:** ` _ value_to_encrypt _ ` The VARCHAR or BINARY value to encrypt. ` _ passphrase _ ` The passphrase to use to encrypt/decrypt the data. The passphrase is always a VARCHAR, regardless of whether the ` _ value_to_encrypt _ ` is VARCHAR or BINARY. **Optional:** ` _ additional_authenticated_d...
snowflake_docs/to_xml_3_0.txt
Arguments ¶ ` _ expression _ ` type-conversion) to a VARIANT.
snowflake_docs/create-external-volume_5_1.txt
d encryption keys > > * ` NONE ` : No encryption. > > > ` KMS_KEY_ID = ' _ string _ ' ` (applies to ` GCS_SSE_KMS ` encryption > only) > > > Specifies the ID for the Cloud KMS-managed key used to encrypt files > written to the bucket. > > Note that this value is ignored when reading data. The read operation...
snowflake_docs/log_1_0.txt
LOG ¶ Returns the logarithm of a numeric expression. See also:
snowflake_docs/create-notification-integration_14_0.txt
Usage Notes ¶ * Creating a single notification integration for multiple Microsoft Azure Storage queues or Google Cloud Pub/Sub subscriptions is not supported. * When you create a new pipe using a notification integration with the same queue URL as another notification integration, the pipe creation fails with...
snowflake_docs/create-account_2_0.txt
Syntax ¶ CREATE ACCOUNT <name> ADMIN_NAME = <string> { ADMIN_PASSWORD = '<string_literal>' | ADMIN_RSA_PUBLIC_KEY = <string> } [ FIRST_NAME = <string> ] [ LAST_NAME = <string> ] EMAIL = '<string>' [ MUST_CHANGE_PASSWORD = { TRUE | FALSE } ] EDITION = ...
snowflake_docs/kurtosis_0_0.txt
/ 1. General 26. Bitwise 30. Boolean 34. Hash 36. Semi-Structured 39. Linear Regression 49. Statistics and Probability 52. Count Distinct Values 60. Cardinality Estimation 68. Similarity Estimation 73...
snowflake_docs/forecast_5_0.txt
Constructor Arguments ¶ **Required:** ` INPUT_DATA => _ input_data _ ` calling-references) to the input data. Using a reference allows the training process, which runs with limited privileges, to use your privileges to access the data. You can use a reference to a table or a view if your data is already guide/stor...