id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/map_pick_1_0.txt
MAP_PICK ¶ available to all accounts. value pairs from an existing MAP. To identify the key-value pairs to include in the new map, pass in the keys as arguments, or pass in an array containing the keys. If a specified key is not present in the input map, the key is ignored.
snowflake_docs/get_path_3_0.txt
Arguments ¶ ` _ column_identifier _ ` semistructured.html
snowflake_docs/continue_3_0.txt
Syntax ¶ { CONTINUE | ITERATE } [ <label> ] ; Copy Where: > ` _ label _ ` > > > An optional label. If the label is specified, the ` CONTINUE ` will start > at the first statement in the loop with the label. > > You can use this to continue more than one level higher in a nested loop or > a nested branch.
snowflake_docs/create-view_3_0.txt
Required Parameters ¶ ` _ name _ ` Specifies the identifier for the view; must be unique for the schema in which the view 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 quotes (...
snowflake_docs/last_successful_scheduled_time_8_0.txt
label-alerts-specify-timestamps) . Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Arguments 3. Returns 4. Usage Notes 5. Examples Language : **English**
snowflake_docs/md5_binary_2_0.txt
Syntax ¶ MD5_BINARY(<msg>) Copy
snowflake_docs/translate-snowflake-cortex_9_0.txt
Example ¶ The following example translates each row of a table from English to German (in this example, ` review_content ` is a column from the ` reviews ` table): SELECT SNOWFLAKE.CORTEX.TRANSLATE(review_content, 'en', 'de') FROM reviews LIMIT 10; Copy
snowflake_docs/copy-into-table_6_0.txt
Optional parameters ¶ ` FILES = ( ' _ file_name _ ' [ , ' _ file_name _ ' ... ] ) ` Specifies a list of one or more files names (separated by commas) to be loaded. The files must already have been staged in either the Snowflake internal location or external location specified in the command. If any of ...
snowflake_docs/forecast_22_0.txt
Output ¶ The SERIES column is present only for multi-series forecasts. Single-series forecasts do not have this column. Column | Type | Description ---|---|--- SERIES | | Series value (if model was trained with multiple time series). RANK | | The importance rank of a feature for a particular series. FEATURE_...
snowflake_docs/drop-image-repository_6_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/create-index_5_0.txt
Usage Notes ¶ * The CREATE INDEX command cannot be used to add a foreign, primary, or unique key constraint. * In order to create an index, you must be using a role that has the OWNERSHIP privilege on the hybrid table. * You must choose a unique name for each new index for a given hybrid table. * When pic...
snowflake_docs/drop-table_1_0.txt
DROP TABLE ¶ Removes a table from the current/specified schema, but retains a version of For details, see Usage Notes (in this topic). See also:
snowflake_docs/create-clone_2_0.txt
label-cloning-tables) of databases, schemas, and tables; however, it can also be used to quickly/easily create clones of other schema objects , such as external stages, file formats, and sequences, and database roles. commands with the addition of the ` CLONE ` keyword.
snowflake_docs/check_xml_6_0.txt
Examples ¶
snowflake_docs/table_storage_metrics_2_0.txt
Columns ¶ Column Name | Data Type | Description ---|---|--- ID | NUMBER | Internal/system-generated identifier for the table. TABLE_NAME | TEXT | Name of the table. TABLE_SCHEMA_ID | NUMBER | Internal/system-generated identifier for the schema of the table. TABLE_SCHEMA | TEXT | Schema that the table belon...
snowflake_docs/desc-catalog-integration_9_0.txt
Usage notes ¶
snowflake_docs/like_all_1_0.txt
LIKE ALL ¶ Performs a case-sensitive comparison to match a string against all of one or more specified patterns. Use this function in a WHERE clause to filter for matches. Tip You can use the search optimization service to improve the performance of queries that call this function. For details, see [ Search Optimiza...
snowflake_docs/show-row-access-policies_2_0.txt
Syntax ¶ SHOW ROW ACCESS POLICIES [ LIKE '<pattern>' ] [ IN { ACCOUNT | DATABASE | DATABASE <database_name> |...
snowflake_docs/contains_2_0.txt
Syntax ¶ CONTAINS( <expr1> , <expr2> ) Copy
snowflake_docs/lpad_5_0.txt
Usage Notes ¶ * If the ` _ base _ ` argument is longer than ` _ length_expr _ ` , then the ` _ base _ ` is truncated to length ` _ length_expr _ ` . * The ` _ pad _ ` argument can be multiple characters/bytes long. The ` _ pad _ ` argument is repeated in the result until the desired length ` _ length_expr...
snowflake_docs/max_by_6_0.txt
Examples ¶ The following examples demonstrate how to use the MAX_BY function. To run these examples, execute the following statements to set up the table and data for the examples: CREATE OR REPLACE TABLE employees(employee_id NUMBER, department_id NUMBER, salary NUMBER); INSERT INTO employees VALUES (...
snowflake_docs/set_notification_mute_flag_3_0.txt
Arguments ¶ ` { TRUE | FALSE } ` : * TRUE to disable email notifications. * FALSE to enable email notifications. Default: FALSE
snowflake_docs/show-compute-pools_5_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- MONITOR | Compute pool | For instructions on creating a custom role with a specified set of privileges, configure.html
snowflake_docs/booland_0_0.txt
/ reference/expressions-conditional) BOOLAND Categories:
snowflake_docs/ln_4_0.txt
Examples ¶ SELECT x, ln(x) FROM tab; --------+-------------+ X | LN(X) | --------+-------------+ 1 | 0 | 10 | 2.302585093 | 100 | 4.605170186 | [NULL] | [NULL] | --------+-------------+ Copy Was this page helpful? Yes No Inc. All Rights...
snowflake_docs/desc-user_2_0.txt
Syntax ¶ DESC[RIBE] USER <name> Copy
snowflake_docs/drop-catalog-integration_7_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/grant-ownership_5_0.txt
Usage notes ¶ * You cannot transfer the OWNERSHIP privilege for the following objects: * ` APPLICATION ROLE ` * ` CONNECTION ` Only the ACCOUNTADMIN role can have the OWNERSHIP privilege on a connection object. * ` SERVICE ` * ` SHARE ` * A role that has the MANAGE GRANTS privilege can tran...
snowflake_docs/create-model_5_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- CREATE MODEL | Schema | Implied by USAGE on schema OWNERSHIP | Model | A role must be granted or inherit the OWNERSHIP privilege on the object to create a temporary object that has the same name as the object that alrea...
snowflake_docs/variance_pop_1_0.txt
VARIANCE_POP ¶ Returns the population variance of non-NULL records in a group. If all records inside a group are NULL, a NULL is returned. Aliases:
snowflake_docs/grant-privilege_9_0.txt
label-managed-access-schemas) .
snowflake_docs/show-hybrid-tables_6_0.txt
Output ¶ Note The following output schema is for the SHOW HYBRID TABLES command. For information about the output of SHOW TABLES, see Identifying hybrid tables with SHOW TABLES (in this topic). The command output provides table properties and metadata in the following columns: Column | Description ---|--- ` cr...
snowflake_docs/decompress_binary_1_0.txt
DECOMPRESS_BINARY ¶ Decompresses the compressed ` BINARY ` input parameter. See also:
snowflake_docs/boolxor_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/replication_group_refresh_progress_6_0.txt
Examples ¶ Retrieve the current progress of the replication group refresh for the ` rg1 ` replication group: > > select * > from > table(information_schema.replication_group_refresh_progress('rg1')); > > > Copy Retrieve the current progress of a replication group refresh by query ID: > > select * > ...
snowflake_docs/drop-streamlit_3_0.txt
Required Parameters ¶ ` _ name _ ` Specifies the identifier for the Streamlit object to drop. If the identifier contains spaces, special characters, or mixed-case characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive (e.g. ` "My Object" ` )....
snowflake_docs/data-types-structured_28_0.txt
Accessing Values and Elements from Structured Types ¶ You can use the following methods to access values and elements from structured ARRAYs, structured OBJECTs, and MAPs: The returned values and elements have the type specified for the object, rather than VARIANT. The following example passes the first element of a...
snowflake_docs/sha2_binary_2_0.txt
Syntax ¶ SHA2_BINARY(<msg> [, <digest_size>]) Copy
snowflake_docs/alter-application-package-version_1_0.txt
ALTER APPLICATION PACKAGE … VERSION ¶ Available This feature is not supported on Google Cloud Platform. Modifies the versioning of an existing application package in the Native Apps Framework. See also: directive)
snowflake_docs/replace_3_0.txt
Arguments ¶ ` _ subject _ ` The subject is the string in which to do the replacements. Typically, this is a column, but it can be a literal. ` _ pattern _ ` This is the substring that you want to replace. Typically, this is a literal, but it can be a column or expression. Note that this is not a “regular expressio...
snowflake_docs/show-transactions_2_0.txt
Syntax ¶ SHOW TRANSACTIONS [ IN ACCOUNT ] Copy
snowflake_docs/desc-password-policy_10_1.txt
| 24 | Number of most recent passwords that may not be repeated by the user | +-----------------------------------+----------------------------------------+-------------+------------------------------------------------------------...
snowflake_docs/create-packages-policy_2_0.txt
Syntax ¶ CREATE [ OR REPLACE ] PACKAGES POLICY [ IF NOT EXISTS ] <name> LANGUAGE PYTHON [ ALLOWLIST = ( [ '<packageSpec>' ] [ , '<packageSpec>' ... ] ) ] [ BLOCKLIST = ( [ '<packageSpec>' ] [ , '<packageSpec>' ... ] ) ] [ ADDITIONAL_CREATION_BLOCKLIST = ( [ '<packageSpec>' ] [ , '<package...
snowflake_docs/system_verify_ext_oauth_token_5_0.txt
Examples ¶ The following example returns a valid External OAuth token result: SELECT SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKEN('<access_token>'); +-----------------------------------------------------------------------------------------------+ | Token Validation finished.{"Validation Result":"Passed","Issuer":"...
snowflake_docs/references_3_0.txt
Objects identified by name ¶ A reference identifies an object _by name_ . This means if an object is renamed after a reference is created, the reference is invalid. However, if a new object with the same name is created, the reference _might_ be valid. For example, a role ` my_role ` creates a reference ` my_ref1 ...
snowflake_docs/execute-service_10_0.txt
Usage notes ¶ * The query ID that the EXECUTE SERVICE command returns is a unique identifier for the Snowpark Container Services job. You can use this ID to retrieve job status ( [ SYSTEM$GET_JOB_STATUS progress. function immediately after running the EXECUTE SERVICE command to capture the ID of the query job for...
snowflake_docs/show-replication-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/date_part_0_0.txt
/ 1. Construction 5. Extraction 29. Addition & Subtraction 38. Truncation 42. Conversion 57. Time Zone 59. Alerts date-time) DATE_PART Categories:
snowflake_docs/create-database-role_11_0.txt
Examples ¶ Create database role ` dr1 ` in database ` d1 ` : > > CREATE DATABASE ROLE d1.dr1; > > > Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Required parameters 3. Optional parameters 4. Access control requirements 5. Usage notes 6. Examples ...
snowflake_docs/show-database-roles_3_0.txt
Required parameters ¶ ` _ name _ ` Specifies the name of the database. The command returns an error if you do not specify the name identifier.
snowflake_docs/create-external-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 EXTERNAL TABLE
snowflake_docs/show-dynamic-tables_1_0.txt
SHOW DYNAMIC TABLES ¶ Available to accounts. you have access privileges. The command can be used to list dynamic tables for the current/specified database or schema, or across your entire account. See also:
snowflake_docs/percentile_cont_4_0.txt
Returns ¶ Returns the value that is at the specified percentile. If no input row lies exactly at the desired percentile, the result is calculated using linear interpolation of the two nearest input values. Note If a group contains only one value, then that value will be returned for any specified percentile (e.g. b...
snowflake_docs/desc-iceberg-table_1_0.txt
DESCRIBE ICEBERG TABLE ¶ Available to all accounts. iceberg) or the current values, as well as the default values, for the properties of an Iceberg table. DESCRIBE can be abbreviated to DESC. Note that this topic refers to Iceberg tables as simply “tables” except where specifying _Iceberg tables_ avoids confusion. S...
snowflake_docs/base64_decode_binary_3_0.txt
Arguments ¶ **Required:** ` _ input _ ` A Base64-encoded string expression. **Optional:** ` _ alphabet _ ` A string consisting of up to three ASCII characters: * The first two characters in the string specify the last two characters (indexes 62 and 63) in the alphabet used to encode the input: * ` A ` to `...
snowflake_docs/binary-input-output_3_0.txt
hex (Default) ¶ The “hex” format refers to the hexadecimal, or base 16, system. In this format, each byte is represented by two characters (digits from 0 to 9 and letters from ` A ` to ` F ` ). When using hex to perform conversion: From: | To: | Notes ---|---|--- Binary | String | hex uses uppercase letters. ...
snowflake_docs/map_delete_3_0.txt
Arguments ¶ ` _ map _ ` The map that contains the key to remove. ` _ keyN _ ` The key to be omitted from the returned map.
snowflake_docs/show-parameters_0_0.txt
/ 1. Parameters 4. Context 10. Variables 14. Queries
snowflake_docs/system_get_login_failure_details_6_0.txt
Error Descriptions ¶ This section provides descriptions for errors returned by the SYSTEM$GET_LOGIN_FAILURE_DETAILS function.
snowflake_docs/system_show_oauth_client_secrets_2_0.txt
Syntax ¶ SYSTEM$SHOW_OAUTH_CLIENT_SECRETS( '<integration_name>' ) Copy
snowflake_docs/drop-managed-account_0_0.txt
/ 1. Organization 7. Managed Accounts 11. Account Parameters & Functions ACCOUNT
snowflake_docs/intro-summary-operators-functions_3_0.txt
Aggregate Functions ¶ Snowflake supports aggregate functions to operate on values across rows to perform mathematical calculations such as sum, average, counting, minimum/maximum values, standard deviation, and estimation, as well as some non-mathematical operations.
snowflake_docs/binary-examples_5_0.txt
Convert to Binary with Variable Format ¶ Convert strings to binary values using a binary format extracted from the SELECT c1, try_to_binary(split_part(c1, ':', 2), split_part(c1, ':', 1)) AS binary_value FROM strings; +-------------------------+----------------------+ | C1 | BINARY_V...
snowflake_docs/map_insert_5_0.txt
Usage Notes ¶ * The type of the key expression must match the type of the map’s key. If the type is VARCHAR, then the types can be different lengths. * The function supports JSON NULL values, but not SQL NULL values or keys: * If ` _ key _ ` is any string other than NULL and ` _ value _ ` is a JSON NULL ...
snowflake_docs/system_disable_behavior_change_bundle_4_0.txt
Arguments ¶ ` _ bundle_name _ ` Name of the behavior change bundle, specified as a string. To obtain the name changes) .
snowflake_docs/set_spending_limit_7_0.txt
label-budgets-application-roles) for the account budget.
snowflake_docs/alter-security-integration-oauth-snowflake_6_0.txt
Snowflake OAuth custom client parameters ¶ Use these parameters when ` OAUTH_CLIENT = CUSTOM ` in the security integration. ` _ name _ ` Identifier for the integration to alter. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in d...
snowflake_docs/commands-security_5_0.txt
Packages policy ¶
snowflake_docs/show-warehouses_5_0.txt
Output ¶ The columns in the output provide the following information. For accounts that service) feature enabled, the output provides additional information. Column | Description ---|--- ` name ` | Name of the warehouse ` state ` | Whether the warehouse is active/running ( ` STARTED ` ), inactive ( ` SUSPEN...
snowflake_docs/commands-table_7_0.txt
Hybrid Table ¶
snowflake_docs/create-masking-policy_3_0.txt
Syntax ¶ CREATE [ OR REPLACE ] MASKING POLICY [ IF NOT EXISTS ] <name> AS ( <arg_name_to_mask> <arg_type_to_mask> [ , <arg_1> <arg_type_1> ... ] ) RETURNS <arg_type_to_mask> -> <body> [ COMMENT = '<string_literal>' ] [ EXEMPT_OTHER_POLICIES = { TRUE | FALSE } ] Copy
snowflake_docs/commands-replication_0_0.txt
/ 4. Replication 11. Failover/Failback 18. Client Redirect commands) Replication & Failover
snowflake_docs/listing-events-daily_4_0.txt
Examples ¶ Shows daily count of gets and requests by listing: SELECT listing_name, listing_display_name, event_date, event_type, SUM(1) AS count_gets_requests FROM snowflake.data_sharing_usage.listing_events_daily GROUP BY 1,2,3,4 Copy Was this page helpful? Yes No Inc. Al...
snowflake_docs/budget_2_0.txt
Budget Commands ¶
snowflake_docs/create-masking-policy_5_0.txt
Optional parameters ¶ ` COMMENT = ' _ string_literal _ ' ` Adds a comment or overwrites an existing comment for the masking policy. ` EXEMPT_OTHER_POLICIES = _ TRUE | FALSE _ ` One of the following depending on the usage: * Specifies whether a row access policy or conditional masking policy can reference...
snowflake_docs/create-replication-group_7_0.txt
label-account-replication-integrations) . ` ALLOWED_ACCOUNTS = _ org_name _ . _ target_account_name1 _ [ , _ org_name _ . _ target_account_name2 _ , ... ] ` Specifies the target account or list of target accounts to which replication of specified objects from the source account is enabled. ` _ org_name _ ...
snowflake_docs/sign_1_0.txt
SIGN ¶ Returns the sign of its argument: * -1 if the argument is negative. * 1 if it is positive. * 0 if it is 0.
snowflake_docs/get_measurement_table_1_0.txt
<budget_name>!GET_MEASUREMENT_TABLE ¶ guide/intro-editions) . This feature is currently not available for [ Trial Accounts guide/budgets) maintenance task. For more information, see [ Understanding cost-for-budgets) .
snowflake_docs/listing-access-history_17_0.txt
Table Joins ¶ A view of which combination of tables are being joined together. with accesses as ( select lah.query_token, array_agg(distinct los.value:"objectName"::string) as object_names from SNOWFLAKE.DATA_SHARING_USAGE.LISTING_ACCESS_HISTORY as lah join lateral flatten(i...
snowflake_docs/declare_3_0.txt
Variable Declaration Syntax ¶ guide/snowflake-scripting/variables) . <variable_declaration> ::= <variable_name> [<type>] [ { DEFAULT | := } <expression>] Copy Where: > ` _ variable_name _ ` > > > The name of the variable. The name must follow the naming rules for [ Object > > ` _ type _ ` > > > > ` D...
snowflake_docs/show-parameters_5_2.txt
| | isolation level was specified > | > | TWO_DIGIT_CENTURY_START | 1970 > | 1970 | | For 2-digit dates, defines a > century-start year. > | > | | > | | ...
snowflake_docs/scheduled_time_1_0.txt
SCHEDULED_TIME ¶ Returns the timestamp representing the scheduled time of the current alert. guide/alerts.html
snowflake_docs/create-procedure_30_0.txt
label-creating-using-external-access-integration- secret) and [ Using the external access integration in a function or procedure network-access.html
snowflake_docs/alter-stage_14_2.txt
loaded into separate columns in relational tables. Note * If the length of the target string column is set to the maximum (e.g. ` VARCHAR (16777216) ` ), an incoming string cannot exceed this length; otherwise, the COPY command produces an error. * This parameter is functionally equivalent to ` ENFORCE_LENGTH ...
snowflake_docs/create-catalog-integration_9_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/show-custom-classifiers_10_0.txt
Output ¶ Provides custom classifier instance properties and metadata in the following columns: Column | Description ---|--- created_on | Date and time when the custom classification instance was created. name | Name of the custom classification instance. database_name | Database that stores the custom classi...
snowflake_docs/collate_3_0.txt
Arguments ¶ ` _ string_expression _ ` The string to make a copy of. ` _ collation_specification _ ` This specifies the collation to store with the copy of the string. For more information about collation specifiers, see [ Collation Specifications
snowflake_docs/is_2_0.txt
General Usage Notes ¶ * All the functions are unary, taking a VARIANT expression as the only argument. * All the functions return FALSE if the input is SQL NULL or the VARIANT expression contains null.
snowflake_docs/null_0_0.txt
/ snowflake-scripting) NULL
snowflake_docs/snowflake-db-roles_11_0.txt
ML schema ¶ The ML_USER SNOWFLAKE database role is granted to the PUBLIC role in all Snowflake accounts that contain a shared SNOWFLAKE database and allows powered-functions) .
snowflake_docs/task_versions_5_0.txt
Examples ¶ Retrieve the tasks from a specific task graph based on the ROOT_TASK_ID and GRAPH_VERSION: > > SELECT * > FROM snowflake.account_usage.task_versions > WHERE ROOT_TASK_ID = 'afb36ccc-. . .-b746f3bf555d' AND GRAPH_VERSION = > 3; > > > Copy Retrieve the task runs for a particular task graph and...
snowflake_docs/alter-table_10_0.txt
label-projection-policy-replace) .
snowflake_docs/system_explain_plan_json_2_0.txt
Syntax ¶ SYSTEM$EXPLAIN_PLAN_JSON( { <sql_statement_expression> | <sql_query_id_expression> } ) Copy
snowflake_docs/array_agg_19_0.txt
000000136", > | > | | "Clerk
snowflake_docs/get_presigned_url_7_0.txt
Examples ¶
snowflake_docs/data-types-structured_4_0.txt
Specifying a Structured OBJECT ¶ To specify a structured OBJECT, use the following syntax: OBJECT( [ <key> <value_type> [ NOT NULL ] [ , <key> <value_type> [ NOT NULL ] ] [ , ... ] ] ) Copy Where: * ` _ key _ ` specifies a key for the OBJECT. * Each ` _ key _ ` in...
snowflake_docs/rank_1_0.txt
RANK ¶ Returns the rank of a value within an ordered group of values. The rank value starts at 1 and continues up sequentially. If two values are the same, they have the same rank.
snowflake_docs/normal_4_0.txt
Returns ¶ Returns a random floating-point number. The accumulated results of a large number of repeated calls approximate a normal distribution.
snowflake_docs/approx_percentile_estimate_3_0.txt
Arguments ¶ ` _ state _ ` An expression that contains state information generated by a call to [ ` _ percentile _ ` A constant real value greater than or equal to ` 0.0 ` and less than ` 1.0 ` . This indicates the percentile from 0 to 99.999… (e.g. the value 0.65 indicates the 65th percentile).
snowflake_docs/parameters_5_0.txt
Session Parameters ¶ Most parameters are session parameters, which can be set at the following levels: Account : command to set session parameters for the account. The values set for the account default to individual users and their sessions. User : Administrators with the appropriate privileges (typically SECURIT...