id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/create-budget_2_0.txt
Syntax ¶ CREATE [ OR REPLACE ] SNOWFLAKE.CORE.BUDGET [ IF NOT EXISTS ] <name> () [ [ WITH ] COMMENT = '<string_literal>' ] Copy
snowflake_docs/alter-replication-group_19_0.txt
Executed from the source account ¶ Add ` myorg.myaccount3 ` to the list of target accounts to which replication of specified objects from the source account is enabled: ALTER REPLICATION GROUP myrg ADD myorg.myaccount3 TO ALLOWED_ACCOUNTS; Copy Reset the object types list for replication in the source account: ...
snowflake_docs/compress_4_0.txt
Returns ¶ A ` BINARY ` with compressed data.
snowflake_docs/data-types-semistructured_1_0.txt
Semi-structured Data Types ¶ The following Snowflake data types can contain other data types: * VARIANT (can contain any other data type). * ARRAY (can directly contain VARIANT, and thus indirectly contain any other data type, including itself). * OBJECT (can directly contain VARIANT, and thus indirectly con...
snowflake_docs/md5_number_upper64_6_0.txt
Examples ¶ select md5_number_upper64('Snowflake'); +---------------------------------+ | MD5_NUMBER_UPPER64('SNOWFLAKE') | |---------------------------------| | 17145559544104499780 | +---------------------------------+ Copy Was this page helpful? Yes No Inc. All Rights Reserved ...
snowflake_docs/revoke-privilege_9_0.txt
label-managed-access-schemas) .
snowflake_docs/binary-input-output_2_0.txt
Overview of Supported Binary Formats ¶
snowflake_docs/begin_1_0.txt
BEGIN … END (Snowflake Scripting) ¶ ` BEGIN ` and ` END ` define a Snowflake Scripting block. For more information on blocks, see [ Understanding Blocks in Snowflake
snowflake_docs/ifnull_0_0.txt
/ reference/expressions-conditional) IFNULL Categories:
snowflake_docs/create-aggregation-policy_9_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/show-user-functions_6_0.txt
Examples ¶ Show all the UDFs that you have privileges to view in the current database: > > show user functions like 'ALLOWED_REGIONS%' in schema; > > > ---------------------------------+--------------------------+-------------+------------+--------------+---------+-------------------+-------------------+------...
snowflake_docs/greatest_1_0.txt
GREATEST ¶ Returns the largest value from a list of expressions. If any of the argument values is NULL, the result is NULL. GREATEST supports all data types, including VARIANT.
snowflake_docs/system_authorize_privatelink_5_0.txt
Examples ¶ Enable AWS PrivateLink for your Snowflake account on AWS. Note that the values are truncated in this example. > > use role accountadmin; > > select SYSTEM$AUTHORIZE_PRIVATELINK( > '185...', > '{ > "Credentials": { > "AccessKeyId": "ASI...", > ...
snowflake_docs/show-roles_5_0.txt
Examples ¶ Show all roles: > > SHOW ROLES; > > > Copy > > > > ---------------------------------+---------------+------------+------------+--------------+-------------------+------------------+---------------+---------------+--------------------------+ > created_on | name ...
snowflake_docs/revoke-database-role_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the database role to revoke. 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. ` ROLE _ parent_role_name _ ` Revokes the database role f...
snowflake_docs/parameters_44_0.txt
ENFORCE_NETWORK_RULES_FOR_INTERNAL_STAGES ¶ notes/preview-features) — Open Using network rules to protect internal stages is in preview for all accounts on AWS. Using network rules to protect the Snowflake service is generally available. Type : Account — Can be set only for Account Data Type : Boolean Description ...
snowflake_docs/system_authorize_privatelink_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$AUTHORIZE_PRIVATELINK Categories:
snowflake_docs/concat_1_0.txt
CONCAT , ` || ` ¶ Concatenates one or more strings, or concatenates one or more binary values. If any of the values is null, the result is also null. The ` || ` operator provides alternative syntax for CONCAT and requires at least two arguments. See also:
snowflake_docs/alter-stream_2_0.txt
Syntax ¶ ALTER STREAM [ IF EXISTS ] <name> SET COMMENT = '<string_literal>' ALTER STREAM [ IF EXISTS ] <name> SET TAG <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ... ] ALTER STREAM <name> UNSET TAG <tag_name> [ , <tag_name> ... ] ALTER STREAM [ IF EXISTS ] <name> UNSET COMMENT Copy
snowflake_docs/create-packages-policy_5_0.txt
Access Control Requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/commands-class_2_0.txt
Class Commands ¶ Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Class Commands Language : **English**
snowflake_docs/atan2_5_0.txt
Usage Notes ¶ * If the data type of an argument is a numeric data type other than DOUBLE, then the value is converted to DOUBLE. * If the data type of an argument is string, the value is converted to DOUBLE if possible. * If the data type of an argument is any other data type, the function returns an error. ...
snowflake_docs/functions-table_3_0.txt
Simple Examples of Table Functions ¶ The following are appropriate as table functions: * A function that accepts an account number and a date, and returns all charges billed to that account on that date. (More than one charge might have been billed on a particular date.) * A function that accepts a user ID and ...
snowflake_docs/endswith_4_0.txt
Returns ¶ Returns a BOOLEAN. The value is TRUE if ` _ expr1 _ ` ends with ` _ expr2 _ ` . Returns NULL if either input expression is NULL. Otherwise, returns FALSE.
snowflake_docs/system_wait_5_0.txt
Examples ¶ > > CALL SYSTEM$WAIT(10); > > -------------------+ > SYSTEM$WAIT | > -------------------+ > waited 10 seconds | > -------------------+ > > > Copy > > > CALL SYSTEM$WAIT(2, 'MINUTES'); > > -------------------+ > SYSTEM$WAIT | > --------------...
snowflake_docs/left_2_0.txt
Syntax ¶ LEFT( <string_expr> , <length_expr> ) Copy
snowflake_docs/create-tag_1_0.txt
CREATE TAG ¶ This feature requires Enterprise Edition or higher. To inquire about upgrading, please contact [ Snowflake Support Snowflake-Lodge) . Creates a new tag or replaces an existing tag in the system. See also:
snowflake_docs/transactions_11_0.txt
Transactions and Multi-threading ¶ Although multiple sessions cannot share the same transaction, multiple threads using a single connection share the same session, and thus share the same transaction. This can lead to unexpected results, such as one thread rolling back work done in another thread. This situation ca...
snowflake_docs/operators-query_5_0.txt
Syntax ¶ SELECT ... INTERSECT SELECT ... Copy
snowflake_docs/use-schema_4_0.txt
Usage Notes ¶ * The ` SCHEMA ` keyword is optional if a database has been specified for the session or the schema name is fully-qualified.
snowflake_docs/delete_4_0.txt
Optional Parameters ¶ ` USING _ additional_table_or_query _ [, ... ] ` If you need to refer to additional tables in the WHERE clause to help identify the rows to be removed, then specify those table names in the USING clause. You can also use the USING clause to specify subqueries that identify the rows to be r...
snowflake_docs/forecast_14_0.txt
Syntax ¶ DROP SNOWFLAKE.ML.FORECAST [ IF EXISTS ] <name>; Copy
snowflake_docs/event_tables_1_0.txt
EVENT_TABLES View ¶ This Information Schema view displays a row for each event table and view in the specified (or current) database, including the views in the INFORMATION_SCHEMA schema itself. See also:
snowflake_docs/create-table-constraint_6_0.txt
Properties (for All Keys) ¶ The following constraint properties apply to all keys (the order of the properties is interchangeable): [ NOT ] ENFORCED [ NOT ] DEFERRABLE INITIALLY { DEFERRED | IMMEDIATE } { ENABLE | DISABLE } { VALIDATE | NOVALIDATE } { RELY | NORELY } Copy * ` { VALIDATE |...
snowflake_docs/drop-alert_3_0.txt
Required Parameters ¶ ` _ name _ ` Identifier for the alert to drop. 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.
snowflake_docs/show-databases-in-replication-group_1_0.txt
SHOW DATABASES IN REPLICATION GROUP ¶ Lists databases in a replication group. See also:
snowflake_docs/from_9_0.txt
Examples ¶ Create a table and load data into it: > > CREATE TABLE ftable1 (retail_price FLOAT, wholesale_cost FLOAT, > description VARCHAR); > INSERT INTO ftable1 (retail_price, wholesale_cost, description) > VALUES (14.00, 6.00, 'bling'); > > > Copy Here is a basic example of using the FROM clause: ...
snowflake_docs/array_compact_3_0.txt
Arguments ¶ ` _ array1 _ ` The source array.
snowflake_docs/system_internal_stages_public_access_status_2_0.txt
Syntax ¶ > > SYSTEM$INTERNAL_STAGES_PUBLIC_ACCESS_STATUS() > > > Copy
snowflake_docs/snowflake-db-classes_6_0.txt
Class Methods ¶ A class provides a public API through stored procedures and functions. Collectively they are referred to as class _methods_ . To list all the methods for a class, including the arguments required for each method, execute the [ the same name but different signatures (that is to say, a different number...
snowflake_docs/date-time-examples_8_0.txt
Retrieving Dates and Days of the Week ¶ Get the current day of the week as a number using the [ EXTRACT > > SELECT EXTRACT('dayofweek',current_date()); > > > Copy Note * The ` dayofweek_iso ` part follows the ISO-8601 data elements and interchange formats standard. The function returns the day of the week a...
snowflake_docs/transactions_16_1.txt
e contains statements ` A ` and ` E ` . * The transaction in stored procedure ` p1() ` contains statements ` B ` and ` D ` * The transaction in ` p2() ` contains statement ` C ` . The rules for scoped transactions also apply to recursive stored procedure calls. A recursive call is just a specific type of n...
snowflake_docs/boolor_2_0.txt
Syntax ¶ BOOLOR( expr1 , expr2 ) Copy
snowflake_docs/desc-secret_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the secret to describe. 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.
snowflake_docs/h3_polygon_to_cells_strings_2_0.txt
label-data-types-geospatial-h3) cells that have geospatial.html
snowflake_docs/drop-network-rule_4_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/regr_sxy_1_0.txt
REGR_SXY ¶ Returns REGR_COUNT(expr1, expr2) * COVAR_POP(expr1, expr2) for non-null pairs.
snowflake_docs/execute-immediate-from_5_0.txt
Returns ¶ EXECUTE IMMEDIATE FROM returns: * The result of the last statement in the file if all statements are successfully executed. * The error message, if any statement in the file failed. If there is an error in any statement in the file, the EXECUTE IMMEDIATE FROM command fails and returns the error messa...
snowflake_docs/copy-into-location_9_0.txt
TYPE = PARQUET ¶ ` COMPRESSION = AUTO | LZO | SNAPPY | NONE ` String (constant). Compresses the data file using the specified compression algorithm. Supported Values | Notes ---|--- ` AUTO ` | Files are compressed using Snappy, the default compression algorithm. ` LZO ` | Files are compressed using ...
snowflake_docs/constraints-properties_4_0.txt
Properties for Foreign Key Constraints Only ¶ The following constraint properties are also from the ANSI SQL standard, but only apply to foreign keys: ` MATCH { FULL | PARTIAL | SIMPLE } ` Specifies whether the foreign key is satisfied with regard to NULL values in one or more of the columns. ` UPDATE { CA...
snowflake_docs/execute-immediate-from_7_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/create-storage-integration_5_0.txt
Cloud provider parameters ( ` cloudProviderParams ` ) ¶ **Amazon S3** > ` STORAGE_PROVIDER = { S3 | S3GOV } ` > > > Specifies the cloud storage provider that stores your data files: > > * **S3:** S3 storage in public AWS regions. > > * **S3GOV:** S3 storage in AWS government regions. > > > ` STORAGE_AW...
snowflake_docs/skew_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/create-table_14_0.txt
TYPE = AVRO ¶ ` COMPRESSION = AUTO | GZIP | BROTLI | ZSTD | DEFLATE | RAW_DEFLATE | NONE ` Use : Data loading only Definition : * When loading data, specifies the current compression algorithm for the data file. Snowflake uses this option to detect how an already-compressed data file was compress...
snowflake_docs/system_estimate_search_optimization_costs_2_0.txt
Syntax ¶ SYSTEM$ESTIMATE_SEARCH_OPTIMIZATION_COSTS('<table_name>' [ , '<search_method_with_target>' ]) Copy
snowflake_docs/trim_6_0.txt
Examples ¶ Remove leading and trailing ` ❄ ` and ` - ` characters from a string: > > SELECT TRIM('❄-❄ABC-❄-', '❄-'); > > -------------------------+ > TRIM('❄-❄ABC-❄-', '❄-') | > -------------------------+ > ABC | > -------------------------+ > > > Copy Remove leadi...
snowflake_docs/st_xmin_7_0.txt
GEOGRAPHY Examples ¶ This shows a simple use of the ST_XMIN, ST_XMAX, ST_YMIN, and ST_YMAX functions: > > CREATE or replace TABLE extreme_point_collection (id INTEGER, g > GEOGRAPHY); > INSERT INTO extreme_point_collection (id, g) > SELECT column1, TO_GEOGRAPHY(column2) FROM VALUES > (1, ...
snowflake_docs/fetch_5_0.txt
Examples ¶ FETCH my_cursor_name INTO my_variable_name ; Copy For a more complete example of using a cursor, see [ the introductory cursor snowscript-cursors-example) . An example using a loop is included in the documentation for [ FOR loops for) . Was this page helpful? Yes No Inc. All Rights Reserved . On th...
snowflake_docs/desc-external-volume_8_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/create-tag_5_0.txt
label-object-tag-supported-objects) using the command. The maximum number of tag values in this list is 300. Default: NULL (all string values are allowed, including an empty string value (i.e. ` ' ' ` )). ` COMMENT = ' _ string_literal _ ' ` Specifies a comment for the tag. Default: No value
snowflake_docs/information_schema_catalog_name_0_0.txt
/ INFORMATION_SCHEMA_CATALOG_NAME
snowflake_docs/desc-view_5_0.txt
Examples ¶ Example setup: > > CREATE VIEW emp_view AS SELECT id "Employee Number", lname "Last Name", > location "Home Base" FROM emp; > > > Copy Describe the view: > > DESC VIEW emp_view; > > > +-----------------+--------------+--------+-------+---------+-------------+------------+-------+------------+-...
snowflake_docs/system_block_internal_stages_public_access_6_0.txt
Usage Notes ¶ * Only account administrators (i.e. users with the ACCOUNTADMIN role) can execute this function. * This function can take a few minutes to finish executing. * This function can be used with Snowflake accounts on Azure only. AWS and Google Cloud Platform are not supported.
snowflake_docs/system_database_refresh_history_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$DATABASE_REFRESH_HISTORY Categories:
snowflake_docs/drop-application_6_0.txt
Examples ¶ DROP APPLICATION hello_snowflake_app; Copy +-------------------------------------------+ | status | |-------------------------------------------| | hello_snowflake_app successfully dropped. | +-------------------------------------------+ Was this ...
snowflake_docs/extract_semantic_categories_5_0.txt
Returns ¶ As a representative example, the JSON object has the following structure: { "valid_value_ratio": 1.0, "recommendation": { "semantic_category": "PASSPORT", "privacy_category": "IDENTIFIER", "confidence": "HIGH", "coverage": 0.7, "details": [ ...
snowflake_docs/data-types-structured_14_0.txt
label-when-coercion-occurs) from one structured type to another structured type: * A structured type can be coerced to another structured type if the two basic object types are the same: * An ARRAY of one type can be coerced to an ARRAY of another type, provided that the first element type is coercible to the se...
snowflake_docs/create-stage_27_0.txt
Examples ¶
snowflake_docs/array_agg_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/tag_references_with_lineage_7_0.txt
Examples ¶ Retrieve the list of tag associations for the ` cost_center ` tag: select * from table(snowflake.account_usage.tag_references_with_lineage('my_db.my_schema.cost_center')); Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Arguments 3. Usage notes...
snowflake_docs/show-authentication-policies_6_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/set_email_notifications_3_0.txt
Syntax ¶ <budget_name>!SET_EMAIL_NOTIFICATIONS('<notification_integration>', '<email> [ , <email> [ , ... ] ]' ) Copy
snowflake_docs/try_hex_decode_binary_1_0.txt
TRY_HEX_DECODE_BINARY ¶ NULL value if an error occurs during decoding.
snowflake_docs/alter-security-integration-saml2_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/drop-share_0_0.txt
/ 1. Database 9. Schema 17. Share database) DROP SHARE
snowflake_docs/to_xml_6_0.txt
Examples ¶ This example shows how to use the function if you’ve loaded XML-formatted data > Create a table and data: > >> >> CREATE TABLE xml2 (x OBJECT); >> INSERT INTO xml2 (x) >> SELECT PARSE_XML('<note> <body>Sample XML</body> </note>'); >> >> >> Copy > > Call the TO_XML() and TO_VARCHAR() functi...
snowflake_docs/substr_2_0.txt
Syntax ¶ SUBSTR( <base_expr>, <start_expr> [ , <length_expr> ] ) SUBSTRING( <base_expr>, <start_expr> [ , <length_expr> ] ) Copy
snowflake_docs/snowflake-db-roles_10_0.txt
ALERT schema ¶ The ALERT_VIEWER SNOWFLAKE database role is granted the USAGE privilege on the functions defined in this schema.
snowflake_docs/to_timestamp_2_0.txt
Syntax ¶ timestampFunction ( <numeric_expr> [ , <scale> ] ) timestampFunction ( <date_expr> ) timestampFunction ( <timestamp_expr> ) timestampFunction ( <string_expr> [ , <format> ] ) timestampFunction ( '<integer>' ) timestampFunction ( <variant_expr> ) Copy Where: > > timestampFunction ...
snowflake_docs/table_privileges_1_0.txt
TABLE_PRIVILEGES view ¶ This Information Schema view displays a row for each table privilege that has been granted to each role in the specified (or current) database. For more information about roles and privileges, see [ Overview of Access See also:
snowflake_docs/desc-schema_0_0.txt
/ 1. Database 9. Schema 17. Share database) DESCRIBE SCHEMA
snowflake_docs/regr_valx_1_0.txt
REGR_VALX ¶ Returns NULL if the first argument is NULL; otherwise, returns the second argument. Note that REGR_VALX is a NULL-preserving function, while the more commonly-
snowflake_docs/drop-database-role_0_0.txt
/ 1. User Management 7. Database Role Management 16. Account-level Role Management 25. Privilege Management DROP DATABASE ROLE
snowflake_docs/bitand_0_0.txt
/ reference/expressions-byte-bit) BITAND Categories:
snowflake_docs/array_max_6_0.txt
Examples ¶ The following example returns a VARIANT containing the element with the semistructured.html
snowflake_docs/create-task_25_0.txt
Finalizer task ¶ Create a finalizer task, associated with the root task of a task graph, that sends an email alert after task completion. For more information about intro.html
snowflake_docs/get_config_3_0.txt
Returns ¶ The function returns the following columns: Column Name | Data Type | Description ---|---|--- NOTIFICATION_CHANNEL | NUMBER | Internal/system identifier for the notification integration. NOTIFICATION_EMAIL | VARCHAR | The email address(es) that receive budget notifications. If there is more than one ...
snowflake_docs/system_finish_oauth_flow_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$FINISH_OAUTH_FLOW Categories:
snowflake_docs/desc-masking-policy_4_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have at control-overview.html
snowflake_docs/create-secret_8_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/drop-custom-classifier_0_0.txt
/ 1. Commands 5. Methods CUSTOM_CLASSIFIER
snowflake_docs/system_stream_get_table_timestamp_4_0.txt
Usage Notes ¶ * This function returns an error when the input is a stream on a view. To create a stream at or before the current offset for an existing stream, we recommend providing the existing stream name as input to the AT | BEFORE clause for simplicity and maximum compatibility with existing streams: ...
snowflake_docs/snowpark_container_services_history_2_0.txt
Columns ¶ Column Name | Data Type | Description ---|---|--- START_TIME | TIMESTAMP_LTZ | The date and beginning of the hour (in the local time zone) in which the usage took place. END_TIME | TIMESTAMP_LTZ | The date and end of the hour (in the local time zone) in which the usage took place. COMPUTE_POOL_NAME...
snowflake_docs/system_abort_session_2_0.txt
Syntax ¶ SYSTEM$ABORT_SESSION( <session_id> ) Copy
snowflake_docs/listing-events-daily_3_0.txt
Usage Notes ¶ * Latency for the view may be up to 2 days. * The data is retained for 365 days (1 year). * The view contains data for all data products, whether your data product is a Snowflake Native App or a share.
snowflake_docs/to_json_6_1.txt
| {"a":2,"b":1} | False | True | >> +--------------------------------------+--------------------------------------------------------+--------------------------------------------------------+ >> >> >> Copy > > Although both ` PARSE_JSON ` and...
snowflake_docs/class_instance_procedures_1_0.txt
CLASS_INSTANCE_PROCEDURES View ¶ This Information Schema view displays a row for each procedure in a [ class See also:
snowflake_docs/listing-access-history_4_0.txt
LISTING_OBJECTS_ACCESSED Array ¶ The LISTING_OBJECTS_ACCESSED array provides details about the objects in a share accessed by a consumer query. The format of an item in the array depends on the type of object that was accessed. Functions: { "argumentSignature": (function_signature varchar), "objectNa...
snowflake_docs/grouping_id_4_0.txt
Examples ¶ The examples use the following table and data: > > CREATE OR REPLACE TABLE aggr2(col_x int, col_y int, col_z int); > INSERT INTO aggr2 VALUES (1, 2, 1), > (1, 2, 3); > INSERT INTO aggr2 VALUES (2, 1, 10), > (2, 2, 11), > ...
snowflake_docs/regexp_0_0.txt
/ reference/functions-regexp) [ NOT ] REGEXP Categories: