id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/explain_json_2_0.txt
Syntax ¶ EXPLAIN_JSON( <explain_output_in_json_format> ) Copy
snowflake_docs/alter-alert_9_0.txt
| | | | |
snowflake_docs/system_cancel_query_2_0.txt
Syntax ¶ SYSTEM$CANCEL_QUERY( <query_id> ) Copy
snowflake_docs/auto_refresh_registration_history_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/replace_4_0.txt
Returns ¶ The returned value is the string after all replacements have been done.
snowflake_docs/create-api-integration_15_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/show-session-policies_8_0.txt
Usage notes ¶ * The command does not require a running warehouse to execute. * The value for ` LIMIT _ rows _ ` cannot exceed ` 10000 ` . If ` LIMIT _ rows _ ` is omitted, the command results in an error if the result set is larger than 10K rows. To view results for which more than 10K records exist, eith...
snowflake_docs/alter-account_1_0.txt
ALTER ACCOUNT ¶ Modifies an account. Can be used to modify any type of parameter (account, session, or object) at the account level. Also used to rename an account and to assign resource monitors and tags to an account. The command can only be executed by: * Account administrators (i.e. users with the ACCOUNTADMIN...
snowflake_docs/is-null_3_0.txt
Returns ¶ Returns BOOLEAN true or false.
snowflake_docs/strtok_5_0.txt
Usage Notes ¶ If the string starts or is terminated with the delimiter, the system considers empty space before or after the delimiter, respectively, as a valid token. Similar to Linux strtok(), STRTOK never returns an empty string as a token.
snowflake_docs/let_1_0.txt
LET (Snowflake Scripting) ¶ Assigns an expression to a Snowflake Scripting variable, cursor, or RESULTSET. For more information on variables, cursors, and RESULTSETs, see: Note construct is valid only within a [ Snowflake Scripting block See also :
snowflake_docs/match_recognize_20_0.txt
Examples ¶ guide/match-recognize-introduction) contains many examples, including some that are simpler than most of the examples here. If you are not already familiar with ` MATCH_RECOGNIZE ` , then you might want to read those examples first. Some of the examples below use the following table and data: > > cre...
snowflake_docs/translate-snowflake-cortex_10_0.txt
Legal Notices ¶ Snowflake Cortex LLM Functions are powered by machine learning technology, including Meta’s LLaMA 2. The foundation LLaMA 2 model is licensed under the [ LLaMA 2 Community License (c) Meta Platforms, Inc. All Rights Reserved. Your use of any LLM Functions based on the LLama 2 model is subject to Meta...
snowflake_docs/system_pipe_status_4_0.txt
Usage Notes ¶ * Returns results only for the pipe owner (i.e. the role with the OWNERSHIP privilege on the pipe) or a role with the MONITOR privilege on the pipe. * ` _ pipe_name _ ` is a string so it must be enclosed in single quotes: * Note that the entire name must be enclosed in single quotes, includi...
snowflake_docs/create-compute-pool_4_0.txt
label-spcs-working-with-compute-pool-creating-compute-pool) . ` MAX_NODES = _ num _ ` Specifies the maximum number of nodes for the compute pool. ` INSTANCE_FAMILY = _ instance_family_name _ ` Identifies the type of machine you want to provision for the nodes in the compute pool. The machine type determines the a...
snowflake_docs/delete_category_0_0.txt
/ 1. Commands 5. Methods DELETE_CATEGORY
snowflake_docs/set_email_notifications_9_0.txt
Error Messages ¶ The following scenarios can help you troubleshoot issues that can occur. Error | Unknown user-defined function <database_name>.<schema_name>.<budget_name>.SET_EMAIL_NOTIFICATIONS ---|--- Cause | The role you used to set the email notifications for a custom budget does not have the ADMIN in...
snowflake_docs/regexp_substr_8_0.txt
Examples ¶ many examples that use both REGEXP_SUBSTR and REGEXP_INSTR. You might want to look at those examples, too. The next few examples use the table of strings created below: > > CREATE TABLE demo2 (id INT, string1 VARCHAR);; > INSERT INTO demo2 (id, string1) VALUES > -- A string with multiple o...
snowflake_docs/create-view_4_0.txt
Optional Parameters ¶ ` SECURE ` Specifies that the view is secure. For more information about secure views, Default: No value (view is not secure) ` { [ { LOCAL | GLOBAL } ] TEMP | TEMPORARY | VOLATILE } ` Specifies that the view persists only for the duration of the [ session and all its contents ar...
snowflake_docs/desc-task_1_0.txt
DESCRIBE TASK ¶ Describes the columns in a task. DESCRIBE can be abbreviated to DESC. See also:
snowflake_docs/class_instances_4_0.txt
Examples ¶ Retrieve the names of all instances, and the class they were instantiated from, in the ` mydatabase ` database: SELECT name, class_name, class_schema_name, class_database_name FROM mydatabase.INFORMATION_SCHEMA.CLASS_INSTANCES; Copy Was this page helpful? Yes No Inc. All Rights Reserved . ...
snowflake_docs/create-security-integration-api-auth_12_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 [ * CREATE OR REPLACE _ <object> _ statem...
snowflake_docs/at-before_0_0.txt
/ Categories:
snowflake_docs/current_session_2_0.txt
Syntax ¶ CURRENT_SESSION() Copy
snowflake_docs/event_usage_history_2_0.txt
Columns ¶ Column Name | Data Type | Description ---|---|--- START_TIME | TIMESTAMP_LTZ | Start of the time range (in the UTC time zone) in which data loading took place. END_TIME | TIMESTAMP_LTZ | End of the time range (in the UTC time zone) in which data loading took place. CREDITS_USED | NUMBER | Number of...
snowflake_docs/st_xmin_6_0.txt
Examples ¶
snowflake_docs/create-task_26_0.txt
label-finalizer-task) . CREATE TASK finalize_task WAREHOUSE = my_warehouse FINALIZE = my_root_task AS CALL SYSTEM$SEND_EMAIL( 'my_email_int', 'first.last@example.com, first2.last2@example.com', 'Email Alert: Task A has finished.', 'Task A has success...
snowflake_docs/create-stage_3_0.txt
Required parameters ¶ ` _ internal_stage_name _ ` or . ` _ external_stage_name _ ` Specifies the identifier for the stage; must be unique for the schema in which the stage is created. In addition, the identifier must start with an alphabetic character and cannot contain spaces or special characters unless the en...
snowflake_docs/h3_grid_disk_2_0.txt
label-data-types-geospatial-h3) cells that are within the k-distance from the specified cell. The IDs in the returned ARRAY are INTEGER values (if an INTEGER value was provided as the input ID) or VARCHAR values containing the hexadecimal IDs (if a hexadecimal ID was provided as the input ID).
snowflake_docs/drop-authentication-policy_7_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/show-projection-policies_10_0.txt
Example ¶ SHOW PROJECTION POLICIES; 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. Example Language : **English**
snowflake_docs/cume_dist_3_0.txt
Arguments ¶ ` _ partition_expr _ ` This is the optional expression to use to group rows into partitions. ` _ order_expr _ ` This expression specifies the order of the rows within each partition.
snowflake_docs/create-projection-policy_7_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/create-session-policy_8_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/copy-files_6_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/boolor_3_0.txt
Examples ¶ SELECT BOOLOR(1, 2), BOOLOR(-1.35, 0), BOOLOR(3, NULL), BOOLOR(0, 0), BOOLOR(NULL, 0), BOOLOR(NULL, NULL); +--------------+------------------+-----------------+--------------+-----------------+--------------------+ | BOOLOR(1, 2) | BOOLOR(-1.35, 0) | BOOLOR(3, NULL) | BOOLOR(0, 0) | BOOLOR(NUL...
snowflake_docs/alter-file-format_5_3.txt
haracter ( ` ' ` ), or double quote character ( ` " ` ). To use the single quote character, use the octal or hex representation ( ` 0x27 ` ) or the double single-quoted escape ( ` '' ` ). When a field contains this character, escape it using the same character. For example, if the value is the double quote characte...
snowflake_docs/desc-pipe_0_0.txt
/ 1. Stage 7. File Format 13. External Volume 20. Pipe 26. Snowpipe Streaming 28. Loading and Unloading loading) DESCRIBE PIPE
snowflake_docs/system_explain_json_to_text_3_0.txt
Arguments ¶ ` _ explain_output_in_json_format _ ` A string, or an expression that evaluates to a string, containing EXPLAIN output as a JSON-compatible string. If the input is a string, the string should be enclosed in single quotes ` ' ` .
snowflake_docs/drop-custom-classifier_8_0.txt
label-access-control-overview- privileges) at a minimum: Privilege | Object ---|--- OWNERSHIP | SNOWFLAKE.DATA_PRIVACY.CUSTOM_CLASSIFIER instance 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 spe...
snowflake_docs/regr_valx_4_0.txt
Returns ¶ Returns a value of type ` DOUBLE ` .
snowflake_docs/system_behavior_change_bundle_status_4_0.txt
Returns ¶ Returns one of the following VARCHAR values: * ` ENABLED ` (if the specified bundle is enabled for the current account) * ` DISABLED ` (if the specified bundle is disabled for the current account)
snowflake_docs/base64_decode_string_5_0.txt
Usage Notes ¶ * The characters in the ` _ alphabet _ ` string are positionally parsed; to specify different characters in the second or third positions in the string, you must explicitly specify all preceding characters even if you wish to use the defaults. For example: > * ` +$ ` specifies the default ( ` ...
snowflake_docs/hll_import_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/show-shares-in-failover-group_2_0.txt
Syntax ¶ SHOW SHARES IN FAILOVER GROUP <name> Copy
snowflake_docs/show-custom-classifiers_2_0.txt
label-custom-classification-working) Lists all custom classification instances.
snowflake_docs/st_geographyfromwkb_9_0.txt
Examples ¶ The following example returns the GEOGRAPHY object for a geospatial object described in WKT format: > > -- Set the output format to WKT > alter session set GEOGRAPHY_OUTPUT_FORMAT='WKT'; > > > Copy > > > select > ST_GEOGRAPHYFROMWKB('01010000006666666666965EC06666666666C64240'); > +-...
snowflake_docs/regexp_like_7_0.txt
Examples ¶ Create a table with names of cities: > > CREATE OR REPLACE TABLE cities(city varchar(20)); > INSERT INTO cities VALUES > ('Sacramento'), > ('San Francisco'), > ('San Jose'), > (null); > > > Copy Execute a case-sensitive query with a wildcard: > > SELECT * FROM...
snowflake_docs/st_intersects_8_0.txt
GEOGRAPHY Examples ¶ This shows a simple use of the ST_INTERSECTS function: > > SELECT ST_INTERSECTS( > TO_GEOGRAPHY('POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'), > TO_GEOGRAPHY('POLYGON((1 1, 3 1, 3 3, 1 3, 1 1))') > ); > +---------------------------------------------------------+ > | S...
snowflake_docs/system_stream_backlog_5_0.txt
Usage Notes ¶ N/A
snowflake_docs/alter-secret_9_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- OWNERSHIP | Secret | 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 GRANTS privil...
snowflake_docs/st_makepoint_3_0.txt
Arguments ¶ ` _ longitude _ ` A REAL that represents the longitude. ` _ latitude _ ` A REAL that represents the latitude.
snowflake_docs/h3_polygon_to_cells_4_0.txt
Syntax ¶ H3_POLYGON_TO_CELLS( <geography_polygon> , <target_resolution> ) Copy
snowflake_docs/desc-schema_4_0.txt
Usage Notes ¶
snowflake_docs/approx_top_k_5_0.txt
Examples ¶ SELECT APPROX_TOP_K(C4) FROM lineitem; --------------------+ APPROX_TOP_K(C4,3) | --------------------| [ | [ | 1, | 124923 | ], | [ | 2, | ...
snowflake_docs/create-versioned-schema_2_0.txt
Syntax ¶ CREATE OR ALTER VERSIONED SCHEMA <name> [ WITH MANAGED ACCESS ] [ DATA_RETENTION_TIME_IN_DAYS = ] [ MAX_DATA_EXTENSION_TIME_IN_DAYS = ] [ DEFAULT_DDL_COLLATION = '<collation_specification>' ] [ COMMENT = '<string_literal>' ] Copy
snowflake_docs/explain_6_1.txt
----------------------------------------------------------------------------------------------------------------------------+ >> | content | >> |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------...
snowflake_docs/like_all_3_0.txt
Arguments ¶ **Required:** ` _ subject _ ` The string to compare to the pattern(s). ` _ pattern
snowflake_docs/current_secondary_roles_1_0.txt
CURRENT_SECONDARY_ROLES ¶ control-overview.html
snowflake_docs/listing-consumption-daily_2_0.txt
Columns ¶ Column Name | Data Type | Description ---|---|--- EVENT_DATE | DATETIME | Date of the consumption. EXCHANGE_NAME | VARCHAR | Name of the data exchange or the Snowflake Marketplace to which the listing belongs. SNOWFLAKE_REGION | VARCHAR | Snowflake Region where the consumption occurred. LISTING_N...
snowflake_docs/array_construct_compact_4_0.txt
` These are the input expressions to evaluate; the resulting values are put into the array. The expressions do not all need to evaluate to the same data type.
snowflake_docs/desc-sequence_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 DESCRIBE SEQUENCE
snowflake_docs/network_rules_0_0.txt
/ Schema:
snowflake_docs/strip_null_value_4_0.txt
Arguments ¶ ` _ variant_expr _ ` An expression of type VARIANT.
snowflake_docs/bitxor_4_0.txt
Returns ¶ Returns an integer that represents the bitwise XOR of the input expressions.
snowflake_docs/timeadd_4_0.txt
label-supported-date-time-parts) . ` _ value _ ` This is the number of units of time that you want to add. For example, if you want to add 2 days, then the value is 2. ` _ date_or_time_expr _ ` ` _ date_or_time_expr _ ` must evaluate to a date, time, or timestamp. This is the date, time, or timestamp to which you wa...
snowflake_docs/show-custom-classifiers_8_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL control-overview.html
snowflake_docs/show-global-accounts_5_0.txt
Output ¶ The command output provides global account properties and metadata in the following columns: Column | Description ---|--- ` region_group ` | Region group where the account is located. ` snowflake_region ` | Snowflake Region where the account is located. A Snowflake Region is a distinct location with...
snowflake_docs/h3_grid_path_1_0.txt
H3_GRID_PATH ¶ geospatial.html
snowflake_docs/try_base64_decode_binary_4_0.txt
Returns ¶ This returns a ` BINARY ` value. The value can be inserted into a column of type ` BINARY ` , for example.
snowflake_docs/group-by_7_0.txt
Group By Multiple Columns ¶ The following example demonstrates how to group by multiple columns: SELECT state, city, SUM(retail_price * quantity) AS gross_revenue FROM sales GROUP BY state, city; Copy +-------+---------+---------------+ | STATE | CITY | GROSS REVENUE | +=======+=======...
snowflake_docs/transactions_3_0.txt
What is a Transaction? ¶ A transaction is a sequence of SQL statements that are processed as an atomic unit. All statements in the transaction are either applied (i.e. committed) or undone (i.e. rolled back) together. Snowflake transactions guarantee [ ACID A transaction can include both reads and writes. Transactio...
snowflake_docs/atanh_0_0.txt
/ 1. Arithmetic 4. Rounding and Truncation 13. Exponent and Root 21. Logarithmic 24. Trigonometric 42. Other numeric) ATANH Categories:
snowflake_docs/create-function_46_0.txt
label-udf-java-examples) .
snowflake_docs/show-parameters_2_0.txt
Syntax ¶ SHOW PARAMETERS [ LIKE '<pattern>' ] [ { IN | FOR } { SESSION | ACCOUNT | USER [ <name> ] | { WAREHOUSE | DATABASE | SCHEMA | TASK } [ <name> ] | TABLE <table_name> } ] Copy
snowflake_docs/current_role_1_0.txt
CURRENT_ROLE ¶ control-overview.html
snowflake_docs/identifiers-syntax_1_0.txt
Identifier requirements ¶ Unquoted object identifiers : * Start with a letter (A-Z, a-z) or an underscore (“_”). * Contain only letters, underscores, decimal digits (0-9), and dollar signs (“$”). * Are stored and resolved as uppercase characters (e.g. ` id ` is stored and resolved as ` ID ` ). If you put...
snowflake_docs/create-table-constraint_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
snowflake_docs/add_resource_3_0.txt
Arguments ¶ ` ' _ object_reference _ ' ` The serialized string representation that resolves to an object. This string is the output of the [ SYSTEM$REFERENCE ` _ reference_statement _ ` A SYSTEM$REFERENCE statement that creates a reference for the object to be added to the budget.
snowflake_docs/system_disable_database_replication_4_0.txt
Arguments ¶ ` _ db_name _ ` Specifies the identifier for the database.
snowflake_docs/to_date_5_0.txt
Returns ¶ The data type of the returned value is ` DATE ` .
snowflake_docs/revoke-role_2_0.txt
Syntax ¶ REVOKE ROLE <name> FROM { ROLE <parent_role_name> | USER <user_name> } Copy
snowflake_docs/alter-stage_8_2.txt
ading data : Specifies the escape character for enclosed fields only. Specify the character used to enclose fields by setting ` FIELD_OPTIONALLY_ENCLOSED_BY ` . Note This file format option supports singlebyte characters only. Note that UTF-8 character encoding represents high-order ASCII characters as multibyte char...
snowflake_docs/systimestamp_2_0.txt
Syntax ¶ SYSTIMESTAMP() Copy
snowflake_docs/try_to_time_2_0.txt
Syntax ¶ TRY_TO_TIME( <string_expr> [, <format> ] ) TRY_TO_TIME( '<integer>' ) Copy
snowflake_docs/get_notification_mute_flag_2_0.txt
Syntax ¶ <budget_name>!GET_NOTIFICATION_MUTE_FLAG() Copy
snowflake_docs/regexp_substr_all_1_0.txt
REGEXP_SUBSTR_ALL ¶ that contains all substrings that match a regular expression within a string. If no match is found, the function returns an empty ARRAY. Aliases: REGEXP_EXTRACT_ALL
snowflake_docs/system_get_cmk_kms_key_policy_4_0.txt
Usage notes ¶ * This function is for use in Snowflake accounts on Amazon Web Services only. * Only account administrators (i.e. users with the ACCOUNTADMIN role) or a role that is granted the MONITOR SECURITY privilege can call this function.
snowflake_docs/st_asewkt_3_0.txt
Arguments ¶ ` _ geography_or_geometry_expression _ ` The argument must be an expression of type GEOGRAPHY or GEOMETRY.
snowflake_docs/desc-stream_5_0.txt
Examples ¶ Create an example stream: > > CREATE STREAM mystream ( ... ); > > > Copy Describe the columns in the stream: > > DESC STREAM mystream; > > > Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Parameters 3. Usage Notes 4. Examples Language : ...
snowflake_docs/add_months_6_0.txt
Examples ¶ Add 2 months to a date and cast the date to a timestamp with no time zone: > > SELECT ADD_MONTHS('2016-05-15'::timestamp_ntz, 2) AS RESULT; > +-------------------------+ > | RESULT | > |-------------------------| > | 2016-07-15 00:00:00.000 | > +-------------------...
snowflake_docs/round_0_0.txt
/ 1. Arithmetic 4. Rounding and Truncation 13. Exponent and Root 21. Logarithmic 24. Trigonometric 42. Other numeric) ROUND Categories:
snowflake_docs/external_functions_history_3_0.txt
Arguments ¶ All the arguments are optional. ` DATE_RANGE_START => _ constant_date_expression _ ` , . ` DATE_RANGE_END => _ constant_date_expression _ ` The date/time range, within the last 2 weeks, for which to retrieve the history: History is displayed in increments of 5 minutes, 1 hour, or 24 hours (depending...
snowflake_docs/alter-application-role_2_0.txt
Syntax ¶ ALTER APPLICATION ROLE [ IF EXISTS ] <name> RENAME TO <new_name> ALTER APPLICATION ROLE [ IF EXISTS ] <name> SET COMMENT = '<string_literal>' ALTER APPLICATION ROLE [ IF EXISTS ] <name> UNSET COMMENT Copy
snowflake_docs/show-columns_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 SHOW COLUMNS
snowflake_docs/drop-compute-pool_0_0.txt
/ 1. IMAGE REGISTRY AND REPOSITORY 5. COMPUTE POOL 11. SERVICE 18. JOB container-services) DROP COMPUTE POOL
snowflake_docs/soundex_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/lag_4_0.txt
Usage Notes ¶ * When the IGNORE NULLS clause is set, any row whose expression evaluates to NULL is not included when offset rows are counted. If ` { IGNORE | RESPECT } NULLS ` is not specified, the default is ` RESPECT NULLS ` . * The ` ORDER BY ` clause orders the data within each partition.
snowflake_docs/approx_percentile_accumulate_4_0.txt
Usage Notes ¶ * Percentile works only on numeric values, so ` _ expr _ ` should produce values that are numbers or can be cast to numbers.
snowflake_docs/show-indexes_3_0.txt
Syntax ¶ SHOW [ TERSE ] INDEXES [ LIKE '<pattern>' ] [ IN { ACCOUNT | DATABASE [ <database_name> ] | SCHEMA [ <schema_name> ] | TABLE | TABLE <table_name> } ] [ STARTS WITH '<name_string>' ] [ LIMIT <rows> [ FROM '<name_string>' ] ] Copy