id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/try_decrypt_raw_1_0.txt
TRY_DECRYPT_RAW ¶ if an error occurs during decryption. See also:
snowflake_docs/metering_daily_history_4_0.txt
Usage Notes ¶ * Latency for the view may be up to 180 minutes (3 hours). > > ALTER SESSION SET TIMEZONE = UTC; > > > Copy
snowflake_docs/desc-schema_1_0.txt
DESCRIBE SCHEMA ¶ Describes the schema. For example, lists the tables and views in the schema. DESCRIBE can be abbreviated to DESC. See also:
snowflake_docs/drop-external-volume_9_0.txt
Examples ¶ The following example drops an external volume named ` my_external_volume ` : > > DROP EXTERNAL VOLUME my_external_volume; > > > 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. Examp...
snowflake_docs/show-services_9_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/database_storage_usage_history_3_0.txt
Usage Notes ¶ * Latency for the view may be up to 24 hours (1 day). * The data is retained for 365 days (1 year). Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Columns 2. Usage Notes Language : **English**
snowflake_docs/show-references_6_0.txt
label-native-apps-supported-privs-references) for a list of the supported objects for a reference. multi-valued | Indicates if the reference requires more than one type of object. object_name | The name of the object specified by the reference after the consumer associates the object with the application. schema_...
snowflake_docs/current_region_1_0.txt
CURRENT_REGION ¶ Returns the name of the region for the account where the current user is logged in. For organizations that have accounts in multiple [ region groups returns ` _ region_group _ . _ region _ ` .
snowflake_docs/system_internal_stages_public_access_status_5_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/alter-account_9_0.txt
Usage Notes ¶ * Account parameters can be set only at the account level. * Session and object parameters that are set using this command serve only as defaults: > * User parameters can be overridden at the individual user level. > > * Session parameters can be overridden at the individual user and > se...
snowflake_docs/functions-regexp_6_0.txt
Using Backreferences ¶ Snowflake does not support backreferences in regular expression patterns (known as “squares” in formal language theory); however, backreferences are supported in the replacement string of the [ REGEXP_REPLACE
snowflake_docs/cot_2_0.txt
Syntax ¶ COT( <real_expr> ) Copy
snowflake_docs/match_recognize_24_0.txt
Demonstrate the ` WITH UNMATCHED ROWS ` Option ¶ This example demonstrates the ` WITH UNMATCHED ROWS option ` . Like the Omit Empty Matches example above, this example searches for price ranges above the average price of each company’s chart. Note that the quantifier in this query is ` + ` , while the quant...
snowflake_docs/create-catalog-integration_12_0.txt
Examples ¶ **AWS Glue** The following example creates a catalog integration that uses an AWS Glue catalog source. When you create a catalog integration for Glue, you must complete additional steps to establish a trust relationship between Snowflake and the Glue Data Catalog. For details, see [ Configure a catalog in...
snowflake_docs/unset_5_0.txt
Examples ¶ UNSET V1; UNSET V2; UNSET (V1, V2); Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Parameters 3. Usage Notes 4. Examples Language : **English**
snowflake_docs/login_history_4_0.txt
Usage Notes ¶ * Latency for the view may be up to 120 minutes (2 hours). * This view does not record the activity of internal users the system defines to perform various operations (e.g. maintain Snowsight worksheets). Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Columns 2. ...
snowflake_docs/to_array_2_0.txt
label-data-type-array) : * If the input is an ARRAY, or VARIANT containing an array value, the result is unchanged. * For NULL or a JSON **null** input, returns NULL. * For any other value, the result is a single-element array containing this value.
snowflake_docs/minhash_2_0.txt
Syntax ¶ MINHASH( <k> , [ DISTINCT ] expr+ ) MINHASH( <k> , * ) Copy
snowflake_docs/call-with_9_0.txt
Required Parameters ¶
snowflake_docs/h3_string_to_int_5_0.txt
Examples ¶ The following example converts an H3 cell ID from hexadecimal format to an INTEGER value. SELECT H3_STRING_TO_INT('89283087033FFFF'); Copy +------------------------------------------------+ | H3_STRING_TO_INT('89283087033FFFF') | |------------------------------------------------...
snowflake_docs/system_estimate_search_optimization_costs_7_0.txt
label-delimited-identifier) .
snowflake_docs/months_between_0_0.txt
/ 1. Construction 5. Extraction 29. Addition & Subtraction 38. Truncation 42. Conversion 57. Time Zone 59. Alerts date-time) MONTHS_BETWEEN Categories:
snowflake_docs/st_xmin_5_0.txt
Usage Notes ¶
snowflake_docs/system_reference_2_0.txt
Syntax ¶ SYSTEM$REFERENCE('<object_type>', '<object_identifier>', [ , <reference_scope> [ , '<privilege>' [ , '<privilege>' ... ] ] ] ) Copy
snowflake_docs/show-streamlits_1_0.txt
SHOW STREAMLITS ¶ Attention This feature is available to accounts in [ AWS and Microsoft Azure commercial Lists the Streamlit objects for which you have access privileges. See also: streamlit)
snowflake_docs/monthname_2_0.txt
Syntax ¶ MONTHNAME( <date_or_timestamp_expr> ) Copy
snowflake_docs/parameters_0_0.txt
/ Parameters
snowflake_docs/zipf_1_0.txt
ZIPF ¶ Returns a Zipf-distributed integer, for ` _ N _ ` elements and characteristic exponent ` _ s _ ` .
snowflake_docs/show-iceberg-tables_7_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/encrypt_2_0.txt
Syntax ¶ ENCRYPT( <value_to_encrypt> , <passphrase> , [ [ <additional_authenticated_data> , ] <encryption_method> ] ) Copy
snowflake_docs/remove_resource_1_0.txt
<budget_name>!REMOVE_RESOURCE ¶ guide/intro-editions) . This feature is currently not available for [ Trial Accounts Remove an object from a _custom budget_ . The object must be removed by [ See also:
snowflake_docs/nvl_8_0.txt
Examples ¶ Create a table that contains contact information for suppliers: CREATE TABLE IF NOT EXISTS suppliers ( supplier_id INT PRIMARY KEY, supplier_name VARCHAR(30), phone_region_1 VARCHAR(15), phone_region_2 VARCHAR(15)); Copy The table contains the phone number for each supplier in ...
snowflake_docs/alter-streamlit_0_0.txt
/
snowflake_docs/limit_2_0.txt
Syntax ¶ -- Postgres syntax SELECT ... FROM ... [ ORDER BY ... ] LIMIT <count> [ OFFSET <start> ] [ ... ] -- ANSI syntax SELECT ... FROM ... [ ORDER BY ... ] [ OFFSET <start> ] [ { ROW | ROWS } ] FETCH [ { FIRST | NEXT } ] <count> [ { ROW | ROWS } ] [ ONLY ] [ ... ] Co...
snowflake_docs/st_geographyfromwkt_2_0.txt
Syntax ¶ ST_GEOGRAPHYFROMWKT( <varchar_expression> [ , <allow_invalid> ] ) ST_GEOGFROMWKT( <varchar_expression> [ , <allow_invalid> ] ) ST_GEOGRAPHYFROMEWKT( <varchar_expression> [ , <allow_invalid> ] ) ST_GEOGFROMEWKT( <varchar_expression> [ , <allow_invalid> ] ) ST_GEOGRAPHYFROMTEXT( <varchar_e...
snowflake_docs/hash_7_0.txt
Examples ¶ SELECT HASH(SEQ8()) FROM TABLE(GENERATOR(rowCount=>10)); ----------------------+ HASH(SEQ8()) | ----------------------+ -6076851061503311999 | -4730168494964875235 | -3690131753453205264 | -7287585996956442977 | -1285360004004520191 | 4801857165282451...
snowflake_docs/as_integer_2_0.txt
Syntax ¶ AS_INTEGER( <variant_expr> ) Copy
snowflake_docs/system_whitelist_privatelink_6_0.txt
Examples ¶ To call the function: > > SELECT SYSTEM$WHITELIST_PRIVATELINK(); > > > Copy > > Sample output: > > > [ > {"type":"SNOWFLAKE_DEPLOYMENT", "host":"xy12345.us- > west-2.privatelink.snowflakecomputing.com","port":443}, > {"type":"STAGE", "host":"sfc-ss-ds2-customer- > ...
snowflake_docs/drop-application-package_2_0.txt
Syntax ¶ DROP APPLICATION PACKAGE <name> Copy
snowflake_docs/aggregate_query_history_7_0.txt
Examples ¶ You can use the AGGREGATE_QUERY_HISTORY view to monitor for potential problems with errors, queueing, lock blocking, or hybrid table throttling. You typically want these metrics to be consistently low. If you see a spike in any of these metrics, it may indicate a problem: > > SET (START_DATE, END_DATE...
snowflake_docs/alter-compute-pool_7_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/exception_3_0.txt
Usage Notes ¶ * Snowflake supports no more than one exception handler per block. However, that handler can catch more than one type of exception by having more than one ` WHEN ` clause. * The exception handler should be at the end of the block. If the block contains statements after the exception handler, thos...
snowflake_docs/alter-password-policy_12_0.txt
Usage notes ¶ If you want to update an existing password policy and need to see the current
snowflake_docs/data-types-logical_11_0.txt
Examples ¶ CREATE OR REPLACE TABLE test_boolean( b BOOLEAN, n NUMBER, s STRING); INSERT INTO test_boolean VALUES (true, 1, 'yes'), (false, 0, 'no'), (null, null, null); SELECT * FROM test_boolean; +-------+------+------+ | B | N | S | |-------+------+------| ...
snowflake_docs/commands-data-loading_4_0.txt
External Volume ¶
snowflake_docs/h3_polygon_to_cells_6_0.txt
Returns ¶ Returns an ARRAY of INTEGER values for the IDs of the H3 cells that have centroids contained in the specified input Polygon.
snowflake_docs/commands-table_8_0.txt
Iceberg Table ¶
snowflake_docs/is_role_in_session_4_0.txt
Usage notes ¶ * Use one syntax. * Literal syntax: * Only one database role name can be passed as an argument. * The name of an account role is not supported. * Nonliteral syntax: * Only one column can be passed as an argument. * Specify the column as one of the following: * ` colum...
snowflake_docs/create-replication-group_4_0.txt
label-account-replication-integrations) . > > If integration objects are included in the list of specified object types, > the ` ALLOWED_INTEGRATION_TYPES ` parameter must be set. > > NETWORK POLICIES : > > > _Requires Business Critical Edition (or higher)._ > > All network policies in the source account. > > RESOU...
snowflake_docs/system_pipe_status_1_0.txt
SYSTEM$PIPE_STATUS ¶ Retrieves a JSON representation of the current status of a pipe. intro) .
snowflake_docs/insert_7_0.txt
Single Row Insert Using a Query ¶ Convert three string values to dates or timestamps and insert them into a single row in the ` mytable ` table: > > DESC TABLE mytable; > > > +------+------------------+--------+-------+---------+-------------+------------+-------+------------+---------+ > | name | type ...
snowflake_docs/execute-immediate_5_0.txt
Optional Parameters ¶ ` USING ( _ bind_variable _ [ , _ bind_variable _ ... ] ) ` Specifies one or more bind variables that hold values to be used in the cursor’s query definition (for example, in a WHERE clause).
snowflake_docs/array_min_3_0.txt
Arguments ¶ ` _ array _ ` The input ARRAY.
snowflake_docs/references_10_0.txt
Supported targets for references ¶ The targets for a reference can be an object or a query. If the target of the reference is an object, privilege(s) on the object are required for the reference.
snowflake_docs/functions-all_25_0.txt
label-data-types-geometry) . | | known_text_representation_of_geometry) or EWKT (extended well-known text) geospatial.html
snowflake_docs/dateadd_5_0.txt
Returns ¶ If ` _ date_or_time_expr _ ` is a time: > * The return data type is a time. > > If ` _ date_or_time_expr _ ` is a timestamp: > * The return data type is a timestamp. > > If ` _ date_or_time_expr _ ` is a date: > * If ` _ date_or_time_part _ ` is ` day ` or larger (e.g. ` month ` , ` > year ` )...
snowflake_docs/get_relative_path_1_0.txt
GET_RELATIVE_PATH ¶ Extracts the path of a staged file relative to its location in the stage using the stage name and absolute file path in cloud storage as inputs.
snowflake_docs/get_stage_location_1_0.txt
GET_STAGE_LOCATION ¶ Retrieves the URL for an external or internal named stage using the stage name as the input.
snowflake_docs/show-catalog-integrations_4_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/create-aggregation-policy_7_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/create-share_2_0.txt
Syntax ¶ CREATE [ OR REPLACE ] SHARE [ IF NOT EXISTS ] <name> [ COMMENT = '<string_literal>' ] Copy
snowflake_docs/st_azimuth_3_0.txt
Arguments ¶ ` _ geography_expression_for_origin _ ` A GEOGRAPHY object that is a Point representing the origin (where the observer is located). ` _ geography_expression_for_target _ ` A GEOGRAPHY object that is a Point for which you want to calculate the azimuth. ` _ geometry_expression_for_origin _ ` A GEOMETRY ...
snowflake_docs/regexp_replace_1_0.txt
REGEXP_REPLACE ¶ Returns the subject with the specified pattern (or all occurrences of the pattern) either removed or replaced by a replacement string. If no matches are found, returns the original subject.
snowflake_docs/sysdate_1_0.txt
SYSDATE ¶ Returns the current timestamp for the system in the UTC time zone. See also:
snowflake_docs/alter-failover-group_11_0.txt
| | ______ day of month (1-31, or L)
snowflake_docs/open_2_0.txt
Syntax ¶ OPEN <cursor_name> [ USING (bind_variable_1 [, bind_variable_2 ...] ) ] ; Copy Where: > ` _ cursor_name _ ` > > > The name of the cursor. > > ` _ bind_variable _ ` > > > A bind variable holds a value to be used in the cursor’s query definition > (e.g. in a ` WHERE ` clause). > > An example of bin...
snowflake_docs/ascii_3_0.txt
Arguments ¶ ` _ input _ ` The string for which the ASCII code for the first character in the string is returned.
snowflake_docs/show-columns_4_0.txt
Usage Notes ¶ * Columns that start with the prefix ` is_ ` return either ` Y ` (yes) or ` N ` (no). * The command does not require a running warehouse to execute. * The command returns a maximum of 10K records for the specified object type, as dictated by the access privileges for the role used to execu...
snowflake_docs/dayname_1_0.txt
DAYNAME ¶ Extracts the three-letter day-of-week name from the specified date or timestamp.
snowflake_docs/execute-alert_6_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/array_contains_4_0.txt
Returns ¶ The function returns TRUE if ` _ value _ ` is present in ` _ array _ ` .
snowflake_docs/build_scoped_file_url_2_0.txt
Syntax ¶ BUILD_SCOPED_FILE_URL( @<stage_name> , '<relative_file_path>' ) Copy
snowflake_docs/system_estimate_query_acceleration_3_0.txt
Parameters ¶ ` _ query_id _ ` Query ID. Query ID must be for a query executed within the last 14 days; otherwise, the ` status ` is ` invalid ` .
snowflake_docs/top_insights_5_0.txt
Usage Notes ¶ * Metrics must be non-negative. * Input data must be restricted to only test or control data. * Runtime scales with the number of dimensions and the cardinality of those dimensions. * Cardinality of categorical dimensions is automatically reduced when their cardinality exceeds 5.
snowflake_docs/create-alert_7_0.txt
| | ______ day of month (1-31, or L)
snowflake_docs/create-failover-group_5_0.txt
label-update-remote-service-for-api-integrations) . >> >> STORAGE INTEGRATIONS : >> >> >> Specifies storage integrations. >> >> >> Storage integration replication is currently in preview. >> >> EXTERNAL ACCESS INTEGRATIONS : >> >> network-access/creating-using-external-network-access) . >> >> For more information...
snowflake_docs/st_centroid_2_0.txt
Syntax ¶ ST_CENTROID( <geography_or_geometry_expression> ) Copy
snowflake_docs/count_5_1.txt
I_COL | J_COL | V | V:TITLE | >> |-------+-------+-----------------+---------| >> | 1 | 11 | { | null | >> | | | "Title": null | | >> | | | } | | >> | 2 | 12 | { | "O" | >> | ...
snowflake_docs/system_get_privatelink_authorized_endpoints_3_0.txt
Arguments ¶ None
snowflake_docs/create-table_20_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- CREATE TABLE | Schema | Note that creating a temporary table does not require the CREATE TABLE privilege. SELECT | Table, external table, view | Required on queried tables and/or views only when cloning a table or exe...
snowflake_docs/columns_2_0.txt
Columns ¶ Column | Data Type | Description ---|---|--- TABLE_CATALOG | TEXT | Database that the table belongs to. TABLE_SCHEMA | TEXT | Schema that the table belongs to. TABLE_NAME | TEXT | Table or view that the column belongs to. COLUMN_NAME | TEXT | Name of the column. ORDINAL_POSITION | NUMBER | Ordi...
snowflake_docs/create-index_6_0.txt
Examples ¶ The following examples presumes that you have already created a hybrid table and that it contains some records. CREATE OR REPLACE HYBRID TABLE mytable ( pk INT PRIMARY KEY, val INT val2 INT ); INSERT INTO mytable SELECT seq, seq+100, seq+200 FROM (SELECT seq8() seq FROM...
snowflake_docs/usage_in_currency_daily_legacy_0_0.txt
/ 24. Legacy Views (Legacy)
snowflake_docs/comment_4_1.txt
mment4 | > > +-----------+-------------------+--------+-------+---------+-------------+------------+-------+------------+--------------+ > > > Copy Create a view with a comment, then overwrite the comment: > > CREATE VIEW my_view comment='this is comment5' AS (SELECT * FROM > my_table); > > SHOW VIEWS LIKE ...
snowflake_docs/show-pipes_1_0.txt
SHOW PIPES ¶ Lists the pipes for which you have access privileges. This command can be used to list the pipes for a specified database or schema (or the current database/schema for the session), or your entire account. See also:
snowflake_docs/alter-database-role_6_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,
snowflake_docs/system_get_privatelink_authorized_endpoints_5_0.txt
Examples ¶ Return the authorized endpoints for your Snowflake account to use with AWS PrivateLink for your Snowflake account on AWS: > > use role accountadmin; > select system$get_privatelink_authorized_endpoints(); > > > Copy You can optionally use the following command to flatten the query result. For ex...
snowflake_docs/system_cancel_query_4_0.txt
Usage Notes ¶ * A user can cancel their own running SQL operations using this SQL function. Canceling running operations executed by another user requires a role with one of the following privileges: * OWNERSHIP on the user who executed the operation. * OPERATE or OWNERSHIP on the warehouse that is run...
snowflake_docs/st_geometryfromwkb_9_0.txt
Examples ¶ The following example returns the GEOMETRY object for a geospatial object described in EWKB format: > > -- Set the geometry output format to EWKT > ALTER SESSION SET GEOMETRY_OUTPUT_FORMAT='EWKT'; > > SELECT > ST_GEOMETRYFROMEWKB('0101000020797F000066666666A9CB17411F85EBC19E325641'); > > >...
snowflake_docs/system_task_dependents_enable_2_0.txt
label-task-dag) (like the role with the OWNERSHIP privilege on the tasks) to resume the tasks by executing a single SQL statement rather than RESUME). For more information about tasks, see [ Executing SQL statements on a schedule
snowflake_docs/create-notification-integration_1_0.txt
CREATE NOTIFICATION INTEGRATION ¶ Creates a new notification integration in the account or replaces an existing integration. A notification integration is a Snowflake object that provides an interface between Snowflake and third-party messaging services (third-party cloud message queuing services, email services, et...
snowflake_docs/case_0_0.txt
/ snowflake-scripting) CASE
snowflake_docs/show-organization-accounts_2_0.txt
Syntax ¶ SHOW ORGANIZATION ACCOUNTS [ HISTORY ] [ LIKE '<pattern>' ] Copy
snowflake_docs/dynamic_table_refresh_history_5_0.txt
Usage Notes ¶
snowflake_docs/st_makepolygon_1_0.txt
ST_MAKEPOLYGON , ST_POLYGON ¶ geometry) object that represents a Polygon without holes. The function uses the specified LineString as the outer loop. This function corrects the orientation of the loop to prevent the creation of Polygons that span more than half of the globe. In contrast, [ the orientation of the loo...
snowflake_docs/commands-transaction_1_0.txt
Transaction Commands ¶ Transaction commands enable you to manage your transactions. Was this page helpful? Yes No Inc. All Rights Reserved . Language : **English**
snowflake_docs/create-security-integration-oauth-external_11_0.txt
Microsoft Azure AD example ¶ The following example creates an External OAuth security integration for a Microsoft Azure AD OAuth 2.0 authorization server. > > CREATE SECURITY INTEGRATION external_oauth_azure_1 > TYPE = external_oauth > ENABLED = true > EXTERNAL_OAUTH_TYPE = azure > ...
snowflake_docs/with_0_0.txt
/ Categories:
snowflake_docs/revoke-privilege_4_0.txt
Optional parameters ¶ ` GRANT OPTION FOR ` If specified, removes the ability for the recipient role to grant the privileges to another role. Default: No value ` ON FUTURE ` If specified, only removes privileges granted on new (i.e. future) schema objects of a specified type (e.g. tables or views) rather than ex...
snowflake_docs/is_granted_to_invoker_role_6_0.txt
Example ¶ Call the function directly: > > IS_GRANTED_TO_INVOKER_ROLE('ANALYST') > > --------------------------------------+ > IS_GRANTED_TO_INVOKER_ROLE('ANALYST') | > --------------------------------------+ > TRUE | > --------------------------------------+...