id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/randstr_1_0.txt
RANDSTR ¶ Returns a random string of specified ` _ length _ ` .
snowflake_docs/alter-iceberg-table_5_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/delete_category_12_0.txt
Examples ¶ For a representative example, see the [ custom classification example example) . Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Arguments 3. Output 4. Access control requirements 5. Usage notes 6. Examples Language : **English**
snowflake_docs/st_dimension_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) ST_DIMENSION Categories:
snowflake_docs/list_6_0.txt
Access control requirements ¶ overview.html
snowflake_docs/h3_cell_to_children_4_0.txt
Arguments ¶ ` _ cell_id _ ` An INTEGER that represents the H3 cell ID ( [ index ` _ target_resolution _ ` An INTEGER between 0 and 15 (inclusive) specifying the H3 [ resolution returned H3 cells. Specifying any other INTEGER value results in an error.
snowflake_docs/lead_3_0.txt
Arguments ¶ ` _ expr _ ` The string expression to be returned. ` _ offset _ ` The number of rows forward from the current row from which to obtain a value. For example, an ` _ offset _ ` of 2 returns the ` _ expr _ ` value with an interval of 2 rows. Note that setting a negative offset has the same effect as usi...
snowflake_docs/show-primary-keys_5_0.txt
Output ¶ The command output provides primary key properties and metadata in the following columns: Column | Description ---|--- ` created_on ` | Date and time when the table was created. ` database_name ` | Database in which the table is stored. ` schema_name ` | Schema in which the table is stored. ` t...
snowflake_docs/create-stage_13_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/functions-all_27_0.txt
label-data-types-geometry) objects intersect (i.e. share any portion of space). | | Returns TRUE if the specified GEOGRAPHY or GEOMETRY object represents a [ handling-intro) . | | types-geospatial.html
snowflake_docs/show-integrations_3_0.txt
Parameters ¶ ` API | CATALOG | EXTERNAL ACCESS | NOTIFICATION | SECURITY | STORAGE ` Returns integrations of the specified type only. ` LIKE ' _ pattern _ ' ` Optionally filters the command output by object name. The filter uses case- insensitive pattern matching, with support for SQL wildcard chara...
snowflake_docs/table_constraints_2_0.txt
Columns ¶ Column Name | Data Type | Description ---|---|--- CONSTRAINT_CATALOG | TEXT | Database that the constraint belongs to CONSTRAINT_SCHEMA | TEXT | Schema that the constraint belongs to CONSTRAINT_NAME | TEXT | Name of the constraint TABLE_CATALOG | TEXT | Name of the database of the current table ...
snowflake_docs/alter-security-integration-scim_3_0.txt
Parameters ¶ ` _ 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 double quotes are also case-sensitive. ` SET ... ` Specifies one or more properties/parameters to set for the int...
snowflake_docs/alter-password-policy_11_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/parse_ip_5_0.txt
Usage Notes ¶ * The function parses an IP address and returns a JSON object. The following elements are always returned: > ` family ` > > > Numeric value. ` 4 ` (IPv4) or ` 6 ` (IPv6). > > ` ip_type ` > > > String value. ` inet ` or ` cidr ` from the input. > > ` host ` > > > String value. Host addre...
snowflake_docs/try_to_boolean_6_0.txt
Examples ¶ This demonstrates usage of ` TRY_TO_BOOLEAN ` : > > SELECT TRY_TO_BOOLEAN('True') AS "T", > TRY_TO_BOOLEAN('False') AS "F", > TRY_TO_BOOLEAN('Oops') AS "N"; > +------+-------+------+ > | T | F | N | > |------+-------+------| > | True | False | NULL | ...
snowflake_docs/alter-external-table_3_0.txt
Parameters ¶ ` _ name _ ` Identifier for the external table to alter. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. ` REFRESH [ ' _ relative-path _ ' ] ` Accesses the staged data file...
snowflake_docs/booland_2_0.txt
Syntax ¶ BOOLAND( expr1 , expr2 ) Copy
snowflake_docs/parameters_61_0.txt
MAX_CONCURRENCY_LEVEL ¶ Type : Object (for warehouses) — Can be set for Account » Warehouse Data Type : Number Description : Specifies the concurrency level for SQL statements (i.e. queries and DML) executed by a warehouse. When the level is reached, the operation performed depends on whether the warehouse is a s...
snowflake_docs/get_6_0.txt
Usage notes ¶ * GET does not support the following actions: * Downloading files from external stages. To download files from external stages, use the utilities provided by your cloud service. * Downloading multiple files with divergent directory paths. The command _does not_ preserve stage directory st...
snowflake_docs/hash_2_0.txt
Syntax ¶ HASH( <expr> [ , <expr2> ... ] ) HASH(*) Copy
snowflake_docs/alter-external-volume_5_1.txt
e location, where: > > * ` _ account _ ` is the name of your Azure account; for example, ` > myaccount ` . > > * ` _ container _ ` is the name of an Azure container that stores your > data files. > > * ` _ path _ ` is an optional path that can be used to provide granular > control over logical directories in ...
snowflake_docs/system_disable_database_replication_3_0.txt
Syntax ¶ SYSTEM$DISABLE_DATABASE_REPLICATION('<db_name>'); Copy
snowflake_docs/create-table-constraint_7_0.txt
Properties (for Foreign Keys Only) ¶ The following constraint properties apply only to foreign keys (the order of the properties is interchangeable): MATCH { FULL | SIMPLE | PARTIAL } ON [ UPDATE { CASCADE | SET NULL | SET DEFAULT | RESTRICT | NO ACTION } ] [ DELETE { CASCADE | SET NULL | SET DEFAUL...
snowflake_docs/alter-failover-group_9_0.txt
__________ minute (0-59)
snowflake_docs/hex_decode_binary_4_0.txt
Returns ¶ A ` BINARY ` value that can, for example, be inserted into a column of type ` BINARY ` .
snowflake_docs/array_unique_agg_5_0.txt
Usage Notes ¶ * This function can be used as either of the following types of functions: When used as a window function, this does not support [ window frames
snowflake_docs/max_by_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/alter-security-integration-api-auth_11_0.txt
Usage notes ¶ * Regarding metadata: Attention Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see [
snowflake_docs/data-types-logical_10_0.txt
Implicit Conversion ¶ String Conversion : * TRUE is converted to ‘true’. * FALSE is converted to ‘false’.
snowflake_docs/drop-masking-policy_2_0.txt
Syntax ¶ DROP MASKING POLICY <name> Copy
snowflake_docs/tag_references_with_lineage_6_0.txt
Output ¶ The function returns the following columns: Column | Data Type | Description ---|---|--- TAG_DATABASE | TEXT | The database in which the tag is set. TAG_SCHEMA | TEXT | The schema in which the tag is set. TAG_ID | NUMBER | Internal/system-generated identifier for the tag. TAG_NAME | TEXT | The nam...
snowflake_docs/to_variant_4_0.txt
Usage Notes ¶ * The ` TO_VARIANT ` function cannot be used directly in an INSERT statement. Instead, use ` INSERT INTO ... SELECT... ` . The Examples section shows how to do this.
snowflake_docs/create-dynamic-table_2_0.txt
Syntax ¶ CREATE [ OR REPLACE ] DYNAMIC TABLE [ IF NOT EXISTS ] <name> ( -- Column definition <col_name> <col_type> [ [ WITH ] MASKING POLICY <policy_name> [ USING ( <col_name> , <cond_col1> , ... ) ] ] [ [ WITH ] TAG ( <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ...
snowflake_docs/bitor_agg_2_0.txt
Syntax ¶ **Aggregate function** BITOR_AGG( <expr1> ) Copy **Window function** > BITOR_AGG( <expr1> ) OVER ( [ PARTITION BY <expr2> ] )
snowflake_docs/show-projection-policies_8_0.txt
label-access-control-securable-objects) , see [ Overview of For additional details on projection policy DDL and privileges, see [ projection-policy-manage) .
snowflake_docs/system_disable_behavior_change_bundle_3_0.txt
Syntax ¶ SYSTEM$DISABLE_BEHAVIOR_CHANGE_BUNDLE( '<bundle_name>' ) Copy
snowflake_docs/drop-iceberg-table_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the table 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 (for example, ` "My Object" ` ). If the tabl...
snowflake_docs/system_allowlist_2_0.txt
Syntax ¶ SYSTEM$ALLOWLIST() Copy
snowflake_docs/decrypt_raw_6_0.txt
Examples ¶ This example shows encryption and decryption. > For readability, set the BINARY_OUTPUT_FORMAT to HEX: > > > ALTER SESSION SET BINARY_OUTPUT_FORMAT='HEX'; > > > Copy > > Create a table and load it. > > Caution > > To simplify this example, the encryption/decryption key is stored in the > table wi...
snowflake_docs/date-time-input-output_23_0.txt
Date & Time Function Format Best Practices ¶ AUTO detection usually determines the correct input format; however, there are situations where it might not be able to make the correct determination. To avoid this, Snowflake strongly recommends the following best practices appropriate): * Avoid using AUTO format if t...
snowflake_docs/desc-authentication-policy_1_0.txt
DESCRIBE AUTHENTICATION POLICY ¶ Available to all accounts. Describes the properties of an authentication policy. See also:
snowflake_docs/organization-usage_3_0.txt
Accessing the ORGANIZATION_USAGE Schema ¶ To view data in the ORGANIZATION_USAGE schema, you must: To grant access to users who are not the account administrator or organization administrator, use a SNOWFLAKE database role. Note The views in the ORGANIZATION_SCHEMA are currently not available in [ US snowgov-regions...
snowflake_docs/complete-snowflake-cortex_7_0.txt
label-data-type-object) must contain a ` role ` key and a ` content ` key. The ` content ` value is a prompt or a response, depending on the role. The role must be one of the following. ` role ` Value | ` content ` Value ---|--- ` system ` | An initial plain-English prompt to the language model to provide it ...
snowflake_docs/translate_3_0.txt
Arguments ¶ ` _ subject _ ` A string expression that is translated. If a character in ` subject ` is not contained in ` _ sourceAlphabet _ ` , the character is added to the result without any translation. ` _ sourceAlphabet _ ` A string with all characters that are modified by this function. Each character is ei...
snowflake_docs/bit_length_1_0.txt
BIT_LENGTH ¶ Returns the length of a string or binary value in bits. Snowflake doesn’t use fractional bytes so length is always calculated as 8 * [
snowflake_docs/create-table_11_0.txt
Format Type Options ( ` formatTypeOptions ` ) ¶ overview) tables. Depending on the file format type specified ( ` STAGE_FILE_FORMAT = ( TYPE = ... ) ` ), you can include one or more of the following format-specific options (separated by blank spaces, commas, or new lines):
snowflake_docs/stddev_pop_1_0.txt
STDDEV_POP ¶ Returns the population standard deviation (square root of variance) of non- NULL values. (square root of variance).
snowflake_docs/object_dependencies_4_0.txt
Data sharing usage notes ¶ General notes : The view updates assume the share is not deleted. The view schema (i.e. column names, data types, and values) remains the same with these exceptions: * The value for the REFERENCED_OBJECT_ID column in the consumer account is always NULL for a shared object. This value p...
snowflake_docs/current_date_3_0.txt
Usage Notes ¶ To comply with ANSI standards, this function can be called without parentheses.
snowflake_docs/to_binary_5_0.txt
Returns ¶ Returns a value of type BINARY.
snowflake_docs/match_recognize_14_0.txt
Usage Notes ¶
snowflake_docs/array_unique_agg_3_0.txt
Arguments ¶ ` _ column _ ` The column containing the values.
snowflake_docs/getvariable_4_0.txt
Returns ¶ The data type of the return value is VARCHAR.
snowflake_docs/show-aggregation-policies_7_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/rest_event_history_6_0.txt
Examples ¶ Return the SCIM REST API requests made in the last five minutes, up to 200 requests. > > use role accountadmin; > use database my_db; > use schema information_schema; > select * > from table(rest_event_history( > rest_service_type => 'scim', > time_range_start => ...
snowflake_docs/create-event-table_4_0.txt
Optional Parameters ¶ ` CLUSTER BY ( _ expr _ [ , _ expr _ , ... ] ) ` Specifies one or more columns or column expressions in the table as the clustering key. For more details, see [ Clustering Keys & Clustered Tables Default: No value (no clustering key is defined for the table) Important Clustering keys...
snowflake_docs/current_account_7_0.txt
Examples ¶ This shows how to call the ` CURRENT_ACCOUNT ` function: > > SELECT CURRENT_ACCOUNT(); > > > Copy > > Output: > > > +-------------------+ > | CURRENT_ACCOUNT() | > |-------------------| > | XY12345 | > +-------------------+ > > > Copy Was this page helpful? Yes ...
snowflake_docs/sql-format-models_13_0.txt
Sign Position for Fixed-Position Formats ¶ By default, fixed-position formats always reserve a space for the number’s sign: * For non-negative numbers, the default blank space is printed before the first digit. * For negative numbers, the default blank space and ` - ` sign are printed before the first digit (o...
snowflake_docs/get_absolute_path_0_0.txt
/ GET_ABSOLUTE_PATH Categories:
snowflake_docs/array_generate_range_2_0.txt
Syntax ¶ ARRAY_GENERATE_RANGE( <start> , <stop> [ , <step> ] ) Copy
snowflake_docs/drop-table_4_0.txt
Usage Notes ¶ > 1. Within the Time Travel retention period, a dropped table can be > > 2. Changing the Time Travel retention period for the account or for a > parent object (that is to say, database or schema) _after_ a table is > dropped does not change the Time Travel retention period for the dropped > tab...
snowflake_docs/asof-join_12_0.txt
TIME Columns in the Match Condition ¶ The following example joins two tables that contain weather observations. The observations in both tables are recorded into TIME columns. All the TIME values appear to be exactly the same in this result set ( ` 14:42:59 ` ). SELECT * FROM preciptime p ASOF JOIN snowtime s M...
snowflake_docs/commands-session_1_0.txt
Session Commands ¶ Session commands enable you to manage your session.
snowflake_docs/object_construct_2_0.txt
Syntax ¶ OBJECT_CONSTRUCT( [<key1>, <value1> [, <keyN>, <valueN> ...]] ) OBJECT_CONSTRUCT( * ) Copy
snowflake_docs/array_slice_6_1.txt
| [] | >> +-------------------------------------------------------+ >> >> >> Copy Although the indexes must be numeric, the elements of the array do not need to be numeric: > > >> SELECT ARRAY_SLICE(ARRAY_CONSTRUCT('foo','snow','flake','bar'), 1, 3); >> ...
snowflake_docs/hll_estimate_1_0.txt
HLL_ESTIMATE ¶ Returns the cardinality estimate for the given HyperLogLog state. using the HLL_ESTIMATE function. Thus, HLL_ESTIMATE(HLL_ACCUMULATE(…)) is equivalent to HLL(…). See also:
snowflake_docs/date-time-examples_7_0.txt
Retrieving the Current Date and Time ¶ Get the current date as a DATE value: SELECT current_date(); Copy Get the current date and time as a TIMESTAMP value: SELECT current_timestamp(); Copy
snowflake_docs/listing-access-history_5_0.txt
, "columnName": "column1_name" }, { "columnId":
snowflake_docs/execute-immediate_3_0.txt
Required Parameters ¶ ` ' _ string_literal _ ' ` or . ` _ variable _ ` or . ` _ session_variable _ ` variables) that contains a statement. A statement can be any of the following: * A single SQL statement * A stored procedure call If you use a session variable, the length of the statement must not exc...
snowflake_docs/system_query_reference_8_0.txt
label-reference-object-query-references) . 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/charindex_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/aggregate_access_history_2_1.txt
` Table ` , ` User ` , ` Internal Named ` , or ` External Named ` . If the query does not access a stage, this field is omitted. baseSources | TEXT | The columns that serve as the source columns for the columns specified by ` directSources ` . These columns facilitate column lineage. directSources | TEXT | T...
snowflake_docs/map_keys_3_0.txt
Arguments ¶ ` _ map _ ` The input map.
snowflake_docs/drop-row-access-policy_8_0.txt
Usage notes ¶ SELECT * from table(information_schema.policy_references(policy_name=>'<string>')); Copy * If a table column has a row access policy attached to it, the column cannot be dropped from the table.
snowflake_docs/show-services_12_0.txt
Examples ¶ The following example lists services in the current database and schema for the session: SHOW SERVICES; Copy The following example lists one service: SHOW SERVICES LIMIT 1; Copy The following example lists services with names containing “echo”: SHOW SERVICES LIKE '%echo%'; Copy The following e...
snowflake_docs/alert_history_1_0.txt
ALERT_HISTORY View ¶ This Account Usage view enables you to retrieve the history of [ alert displays one row for each run of a alert in the history.
snowflake_docs/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/st_length_9_0.txt
GEOGRAPHY Examples ¶ This shows the length in meters of one degree of arc at the equator: > > SELECT ST_LENGTH(TO_GEOGRAPHY('LINESTRING(0.0 0.0, 1.0 0.0)')); > +---------------------------------------------------------+ > | ST_LENGTH(TO_GEOGRAPHY('LINESTRING(0.0 0.0, 1.0 0.0)')) | > |----------------...
snowflake_docs/system_behavior_change_bundle_status_5_0.txt
Examples ¶ The following example returns the status of the ` 2020_08 ` behavior change bundle for the current account. SELECT SYSTEM$BEHAVIOR_CHANGE_BUNDLE_STATUS('2020_08'); Copy +-------------------------------------------------+ | SYSTEM$BEHAVIOR_CHANGE_BUNDLE_STATUS('2020_08') | |---------------...
snowflake_docs/hll_accumulate_3_0.txt
Arguments ¶ ` _ expr _ ` The expression for which you want to estimate cardinality (number of distinct values). This is typically a column name, but can be a more general expression.
snowflake_docs/usage_in_currency_daily_legacy_5_0.txt
Usage Notes ¶ * Latency for the view may be up to 72 hours. * Until month close, data for a given day in a month can change to account for any end-of-month adjustments/credits, contract amendments, or Snowflake account transfers between organizations. * Customers who signed a contract through a Snowflake res...
snowflake_docs/create-aggregation-policy_8_0.txt
label-access-control-securable-objects) , see [ Overview of For additional details on aggregation policy DDL and privileges, see [ aggregation-policy-manage) .
snowflake_docs/functions-analytic_21_0.txt
Examples ¶ guide/functions-window-using) .
snowflake_docs/system_generate_scim_access_token_2_0.txt
Syntax ¶ SYSTEM$GENERATE_SCIM_ACCESS_TOKEN('<integration_name>') Copy
snowflake_docs/regr_sxx_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/use-role_0_0.txt
/ 1. User Management 7. Database Role Management 16. Account-level Role Management 25. Privilege Management 1. Parameters 4. Context 10. Variables 14. Queries USE ROLE
snowflake_docs/system_user_task_cancel_ongoing_executions_2_0.txt
Syntax ¶ SYSTEM$USER_TASK_CANCEL_ONGOING_EXECUTIONS( '<task_name>' ) Copy
snowflake_docs/get_spending_limit_5_0.txt
Examples ¶ View the spending limit for budget ` my_budget ` in schema ` budget_db.budget_schema ` : CALL budget_db.budget_schema.my_budget!GET_SPENDING_LIMIT(); Copy View the spending limit for the account budget: CALL snowflake.local.account_root_budget!GET_SPENDING_LIMIT(); Copy Was this page helpful? Ye...
snowflake_docs/alter-external-volume_2_0.txt
label-tables-iceberg-external-volume-def) . See also:
snowflake_docs/system_convert_pipes_sqs_to_sns_2_0.txt
Syntax ¶ SYSTEM$CONVERT_PIPES_SQS_TO_SNS( '<bucket_name>, '<sns_topic_arn>' ) Copy
snowflake_docs/show-password-policies_7_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/explain_0_0.txt
/ 1. Parameters 4. Context 10. Variables 14. Queries
snowflake_docs/create-procedure_13_0.txt
All Languages ¶ ` _ name _ ( [ _ arg_name _ _ arg_data_type _ [ DEFAULT _ default_value _ ] ] [ , ... ] ) ` Specifies the identifier ( ` _ name _ ` ), any input arguments, and the default values for any optional arguments for the stored procedure. * For the identifier: * For the input arguments: ...
snowflake_docs/show-variables_0_0.txt
/ 1. Parameters 4. Context 10. Variables 14. Queries
snowflake_docs/map_delete_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. * Key values that are not found in the map are ignored.
snowflake_docs/create-procedure_14_0.txt
label-procedure-function-arguments-optional) . ` RETURNS _ result_data_type _ [ NOT NULL ] ` Specifies the type of the result returned by the stored procedure. * For ` _ result_data_type _ ` , use the Snowflake data type that corresponds to the type of the language that you are using. Note Stored procedures y...
snowflake_docs/try_base64_decode_string_7_0.txt
Examples ¶ This shows how to use the function and demonstrates that ` TRY_BASE64_DECODE_STRING ` is the converse of ` BASE64_ENCODE ` : > > SELECT TRY_BASE64_DECODE_STRING(BASE64_ENCODE('HELLO')); > +--------------------------------------------------+ > | TRY_BASE64_DECODE_STRING(BASE64_ENCODE('HELLO')...
snowflake_docs/create-dynamic-table_10_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/array_max_0_0.txt
/ 1. JSON and XML Parsing 9. Array/Object Creation and Manipulation 43. Map Creation and Manipulation 51. Extraction 58. Conversion/Casting 82. Type Predicates Categories: semistructured) (Array/Object)