id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/current_time_4_0.txt
Returns ¶ Returns a value of type ` TIME ` .
snowflake_docs/system_client_version_info_2_0.txt
Syntax ¶ SYSTEM$CLIENT_VERSION_INFO() Copy
snowflake_docs/show-tasks_3_1.txt
es are supported. Default: No value (no limit is applied to the output) Note For SHOW commands that support both the ` FROM ' _ name_string _ ' ` and ` STARTS WITH ' _ name_string _ ' ` clauses, you can combine both of these clauses in the same statement. However, both conditions must be met or they cancel ou...
snowflake_docs/row_number_0_0.txt
/ 1. General 27. Rank-Related 39. Bitwise Aggregation 43. Boolean Aggregation 47. Hash Aggregation 49. Semi-structured Aggregation 52. Counting Distinct Values 55. Linear Regression 65. Statistics and Probability ...
snowflake_docs/revoke-privilege_2_0.txt
Syntax ¶ Account roles: REVOKE [ GRANT OPTION FOR ] { { globalPrivileges | ALL [ PRIVILEGES ] } ON ACCOUNT | { accountObjectPrivileges | ALL [ PRIVILEGES ] } ON { RESOURCE MONITOR | WAREHOUSE | COMPUTE POOL | DATABASE | INTEGRATION | FAILOVER GROUP | REPLICATION GROUP | EXTER...
snowflake_docs/cos_1_0.txt
COS ¶ Computes the cosine of its argument; the argument should be expressed in radians.
snowflake_docs/array_append_6_0.txt
Examples ¶ This is a simple example of building an array (with the ` ARRAY_CONSTRUCT ` function) and then appending to that array. Note that the appended element does not need to be the same data type as the other elements in the array. Execute the query: > > SELECT ARRAY_APPEND(ARRAY_CONSTRUCT(1, 2, 3), 'HELLO...
snowflake_docs/drop-session-policy_6_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- OWNERSHIP | Session policy | 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 GRANT...
snowflake_docs/try_base64_decode_binary_1_0.txt
TRY_BASE64_DECODE_BINARY ¶ returns a NULL value if an error occurs during decoding.
snowflake_docs/show-tasks_3_0.txt
Parameters ¶ ` TERSE ` Returns only a subset of the output columns: * created_on * name * kind (shows NULL for all task records) * database_name * schema_name * schedule ` LIKE ' _ pattern _ ' ` Optionally filters the command output by object name. The filter uses case- insensitive pattern m...
snowflake_docs/let_2_0.txt
Syntax ¶ LET { <variable_assignment> | <cursor_assignment> | <resultset_assignment> } Copy The syntax for each type of assignment is described below in more detail. * Variable Assignment Syntax * Cursor Assignment Syntax * RESULTSET Assignment Syntax
snowflake_docs/soundex_p123_3_0.txt
Arguments ¶ ` _ varchar_expr _ ` The string for which a representation of the pronunciation is returned. The string should use the Latin or Unicode character set.
snowflake_docs/transactions_27_0.txt
Best Practices ¶ * A transaction should contain statements that are related and should succeed or fail together, for example, withdrawing money from one account and depositing that same money to another account. If a rollback occurs, either the payer or the recipient ends up with the money; the money never “disapp...
snowflake_docs/show-session-policies_9_0.txt
Example ¶ SHOW SESSION POLICIES; Copy ----------------------------------+-----------------------+---------------+-------------+----------------+--------------+--------------------------------------------------+---------+ created_on | name | database_name | schema_n...
snowflake_docs/system_explain_json_to_text_2_0.txt
Syntax ¶ SYSTEM$EXPLAIN_JSON_TO_TEXT( <explain_output_in_json_format> ) Copy
snowflake_docs/st_coveredby_5_0.txt
Usage Notes ¶ * For GEOMETRY objects, the function reports an error if the two input GEOMETRY objects have different SRIDs.
snowflake_docs/encrypt_raw_6_1.txt
> "CA2F4A383F6F55", | | | > | | | | "iv": > "416C736F4E6F745365637265", | | > | > | | | | "tag": > "91F28FBC6A2FE9B213D1C44B8D75D147" | | > | > ...
snowflake_docs/operators-subquery_7_0.txt
Syntax ¶ [ NOT ] EXISTS ( <query> ) Copy
snowflake_docs/decompress_binary_3_0.txt
Arguments ¶ **Required:** ` _ input _ ` A ` BINARY ` value (or expression) with data that was compressed using one of If you attempt to decompress a compressed string, rather than a compressed ` BINARY ` value, you do not get an error; instead, the function returns a ` BINARY ` value. See the Usage Notes below f...
snowflake_docs/select_9_0.txt
Usage Notes ¶ * Without an ORDER BY clause, the results returned by SELECT are an unordered set. Running the same query repeatedly against the same tables might result in a different output order every time. If order matters, use the ` ORDER BY ` clause. * In many cases, when you use a column alias for an exp...
snowflake_docs/octet_length_4_0.txt
Examples ¶ SELECT OCTET_LENGTH('abc'), OCTET_LENGTH('\u0392'), OCTET_LENGTH(X'A1B2'); ---------------------+------------------------+-----------------------+ OCTET_LENGTH('ABC') | OCTET_LENGTH('\U0392') | OCTET_LENGTH(X'A1B2') | ---------------------+------------------------+-----------------------+...
snowflake_docs/regr_intercept_4_0.txt
Usage Notes ¶ * DISTINCT is not supported for this function. * When used as a window function: > * This function does not support: > >> * ORDER BY sub-clause in the OVER() clause. >> >> * Window frames.
snowflake_docs/generate_column_description_0_0.txt
/ metadata) GENERATE_COLUMN_DESCRIPTION Categories:
snowflake_docs/create-application-role_1_0.txt
CREATE APPLICATION ROLE ¶ Available This feature is not supported on Google Cloud Platform. Creates a new application role or replaces an existing application role. Use application roles to enable access control security for objects within an application object. setup-script.html
snowflake_docs/split_to_table_5_0.txt
Examples ¶ Here is a simple example on constant input. > > SELECT table1.value > FROM table(split_to_table('a.b', '.')) AS table1 > ORDER BY table1.value; > +-------+ > | VALUE | > |-------| > | a | > | b | > +-------+ > > > Copy The following example uses the ta...
snowflake_docs/create-role_5_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/match_recognize_6_0.txt
Optional Subclauses ¶
snowflake_docs/to_binary_2_0.txt
Syntax ¶ TO_BINARY( <string_expr> [, '<format>'] ) TO_BINARY( <variant_expr> ) Copy
snowflake_docs/random_5_0.txt
Examples ¶ The following examples demonstrate how to use the RANDOM function. The values displayed in the output below might differ from the values returned when you run these examples yourself. The following example calls RANDOM without a seed. The output for each row is different. > > SELECT random() FROM tabl...
snowflake_docs/st_geompointfromgeohash_2_0.txt
Syntax ¶ ST_GEOMPOINTFROMGEOHASH( <geohash> ) Copy
snowflake_docs/alter-task_4_0.txt
label-cloud-services-credit-usage) accumulates no cloud services charges. Currently, the following functions are supported for evaluation in the SQL expression: Indicates whether a specified stream contains change tracking data. Used to skip the current task run if the stream contains no change data. If the result is `...
snowflake_docs/replace_8_0.txt
Examples ¶ Replace the string ` down ` with the string ` up ` : > > SELECT REPLACE('down', 'down', 'up'); > > > Copy > > > +-------------------------------+ > | REPLACE('DOWN', 'DOWN', 'UP') | > |-------------------------------| > | up | > +-----------------...
snowflake_docs/alter-projection-policy_3_0.txt
Syntax ¶ ALTER PROJECTION POLICY [ IF EXISTS ] <name> RENAME TO <new_name> ALTER PROJECTION POLICY [ IF EXISTS ] <name> SET BODY -> <expression> ALTER PROJECTION POLICY <name> SET TAG <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ... ] ALTER PROJECTION POLICY <name> UNSET TAG <tag_name> [...
snowflake_docs/dynamic_table_graph_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/array_intersection_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)
snowflake_docs/bitor_3_0.txt
Arguments ¶ ` _ expr1 _ ` This expression must evaluate to a data type that can be cast to ` INTEGER ` . ` _ expr2 _ ` This expression must evaluate to a data type that can be cast to ` INTEGER ` .
snowflake_docs/commands-integration_8_0.txt
Storage ¶ Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. General 2. API 3. Catalog 4. External Network Access 5. Notification 6. Security 7. Storage Language : **English**
snowflake_docs/array_cat_1_0.txt
ARRAY_CAT ¶ Returns a concatenation of two arrays.
snowflake_docs/create-task_23_0.txt
Procedural logic using Snowflake Scripting ¶ Create a task that declares a variable, uses the variable, and returns the value of the variable every 2 minutes: CREATE TASK t1 USER_TASK_MANAGED_INITIAL_WAREHOUSE_SIZE = 'XSMALL' SCHEDULE = '2 minute' AS EXECUTE IMMEDIATE $$ ...
snowflake_docs/all_user_names_1_0.txt
ALL_USER_NAMES ¶ Returns all user names in the current account.
snowflake_docs/coalesce_2_0.txt
Syntax ¶ COALESCE( <expr1> , <expr2> [ , ... , <exprN> ] ) Copy
snowflake_docs/st_coveredby_4_0.txt
Returns ¶ BOOLEAN.
snowflake_docs/create-external-table_10_0.txt
Format type options ( ` formatTypeOptions ` ) ¶ overview) tables. Depending on the file format type specified ( ` 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/system_get_classification_result_1_0.txt
SYSTEM$GET_CLASSIFICATION_RESULT ¶ This feature requires Enterprise Edition or higher. To inquire about upgrading, please contact [ Snowflake Support Snowflake-Lodge) . This topic is in preview and is available to all accounts that are Enterprise Edition (or higher). Returns the classification result of the specifie...
snowflake_docs/rest_event_history_3_0.txt
Arguments ¶ **Required:** ` _ REST_SERVICE_TYPE _ => 'scim' ` The type of REST API service. Currently, Snowflake only supports ` SCIM ` . **Optional:** ` _ TIME_RANGE_START _ => <constant_expr> ` , . ` _ TIME_RANGE_END _ => <constant_expr> ` Time range (in TIMESTAMP_LTZ format), within the last 7 days, in whi...
snowflake_docs/functions_3_0.txt
Usage Notes ¶ * Latency for the view can be up to 120 minutes (2 hours). * The view only displays objects for which the current role for the session has been granted access privileges. * The view does not recognize the MANAGE GRANTS privilege and consequently might show less information compared to a SHOW co...
snowflake_docs/desc-sequence_5_0.txt
Examples ¶ DESC SEQUENCE my_sequence; 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/system_link_account_objects_by_name_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$LINK_ACCOUNT_OBJECTS_BY_NAME Categories:
snowflake_docs/functions-table_10_0.txt
label-scim-auditing) Search Optimization Maintenance | | guide/search-optimization-service) . Streams | | For more information, refer to [ Change Tracking Using Table Streams Tasks | | For more information, refer to [ Executing SQL statements on a schedule using | | | | | | | | Network rules | | Information...
snowflake_docs/asin_1_0.txt
ASIN ¶ Computes the inverse sine (arc sine) of its argument; the result is a number in the interval ` [-pi/2, pi/2] ` .
snowflake_docs/where_7_1.txt
rtment_name, p.project_name, e.employee_name >> FROM departments d, projects p, employees e >> WHERE >> p.department_id = d.department_id >> AND >> e.project_id(+) = p.project_id >> ORDER BY d.department_id, p.project_id, e.employee_id; >> +----------...
snowflake_docs/show-password-policies_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-masking-policy_13_0.txt
Example: Allow a masked column in a row access policy or conditional masking policy ¶ Replace a masking policy that either allows viewing the email address, viewing only the email address domain, or a viewing fixed masked value: > > create or replace masking policy governance.policies.email_mask > as (val st...
snowflake_docs/create-task_4_0.txt
Required parameters ¶ ` _ name _ ` String that specifies the identifier for the task; must be unique for the schema in which the task 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 dou...
snowflake_docs/approx_percentile_estimate_2_0.txt
Syntax ¶ APPROX_PERCENTILE_ESTIMATE( <state> , <percentile> ) Copy
snowflake_docs/alter-warehouse_1_0.txt
ALTER WAREHOUSE ¶ Suspends or resumes a virtual warehouse, or aborts all queries (and other SQL statements) for a warehouse. Can also be used to rename or set/unset the properties for a warehouse. See also: warehouses)
snowflake_docs/call-with_5_0.txt
label-stored-procedure-scala-return- table) via ` RETURNS TABLE(...) ` is a preview feature that is available to all accounts. WITH <name> AS PROCEDURE ([ <arg_name> <arg_data_type> ]) [ , ... ] ) RETURNS { <result_data_type> [ [ NOT ] NULL ] | TABLE ( [ <col_name> <col_data_type> [ , ... ] ] ) } LANG...
snowflake_docs/operators-query_0_0.txt
/
snowflake_docs/current_time_1_0.txt
CURRENT_TIME ¶ Returns the current time for the system. Aliases:
snowflake_docs/create-security-integration-oauth-external_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 [ * CREATE OR REPLACE _ <object> _ statem...
snowflake_docs/create-network-rule_7_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/create-function_14_0.txt
Java ¶ ` LANGUAGE JAVA ` Specifies that the code is in the Java language. ` RUNTIME_VERSION = _ java_jdk_version _ ` Specifies the Java JDK runtime version to use. The supported versions of Java are: * 11.x * 17.x (Preview support for this feature is available to all accounts.) If RUNTIME_VERSION is not s...
snowflake_docs/strtok_to_array_2_0.txt
Syntax ¶ STRTOK_TO_ARRAY(<string> [,<delimiter>]) Copy
snowflake_docs/get_spending_limit_2_0.txt
Syntax ¶ <budget_name>!GET_SPENDING_LIMIT() Copy
snowflake_docs/alert_history_4_0.txt
Examples ¶ Retrieve records for the 10 most recent completed alert runs: > > SELECT name, condition, condition_query_id, action, action_query_id, > state > FROM snowflake.account_usage.alert_history > LIMIT 10; > > > Copy Retrieve records for alert runs completed in the past hour: > > SELECT name, ...
snowflake_docs/services_0_0.txt
/
snowflake_docs/count_if_2_0.txt
Syntax ¶ **Aggregate function** COUNT_IF( <condition> ) Copy **Window function** COUNT_IF( <condition> ) OVER ( [ PARTITION BY <expr1> ] [ ORDER BY <expr2> [ ASC | DESC ] [ <window_frame> ] ] ) Copy For details about ` _ window_frame _ ` syntax, see [ Window Frame Syntax and
snowflake_docs/system_send_email_0_0.txt
/ 1. Alerts 3. Data Classification procedures) SYSTEM$SEND_EMAIL
snowflake_docs/system_get_privatelink_authorized_endpoints_4_0.txt
Usage notes ¶ * Only account administrators (i.e. users with the ACCOUNTADMIN role) can execute this function. * This function can be used with Snowflake accounts on Amazon Web Services (AWS) or Microsoft Azure (Azure); Google Cloud Platform (GCP) is not currently supported.
snowflake_docs/system_get_tag_on_current_column_5_0.txt
Examples ¶ For a contextual example on how to use this function, see [ Example 2: Protect based-masking-policies.html
snowflake_docs/current_role_type_1_0.txt
CURRENT_ROLE_TYPE ¶ Returns either ROLE or DATABASE_ROLE based on whether the current active role in the session is an account role or a database role, respectively.
snowflake_docs/system_cancel_job_1_0.txt
SYSTEM$CANCEL_JOB ¶ Support for this feature is currently not in production and is available only to selected accounts. Contact your Snowflake representative for more information. guide/snowpark-container-services/working-with-jobs) . All the job containers exit. See also: guide/snowpark-container-services/working-w...
snowflake_docs/st_makepolygonoriented_4_0.txt
Returns ¶ The function returns a value of type GEOGRAPHY.
snowflake_docs/alter-schema_5_0.txt
Usage Notes ¶ * To rename a schema, the role used to perform the operation must have the CREATE SCHEMA privilege on the database for the schema and OWNERSHIP privileges on the schema. * To swap two schemas, the role used to perform the operation must have OWNERSHIP privileges on both schemas. * To convert a ...
snowflake_docs/data-types-structured_55_0.txt
Using the DESCRIBE and Other SHOW Commands to View Structured Type Information ¶ The output of the following commands includes information about structured types: For example, in the DESCRIBE RESULT output, the row for a MAP(VARCHAR, VARCHAR) column contains the following value in the ` type ` column: map(VARCH...
snowflake_docs/st_disjoint_3_0.txt
Syntax ¶ ST_DISJOINT( <geography_expression_1> , <geography_expression_2> ) ST_DISJOINT( <geometry_expression_1> , <geometry_expression_2> ) Copy
snowflake_docs/system_verify_ext_oauth_token_1_0.txt
SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKEN ¶ overview) access token is valid or has expired and needs to be regenerated.
snowflake_docs/drop_1_0.txt
DROP _ <object> _ ¶ Removes the specified object from the system. See also:
snowflake_docs/to_object_5_0.txt
Returns ¶ The data type of the returned value is OBJECT.
snowflake_docs/array_generate_range_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)
snowflake_docs/functions-file_0_0.txt
/
snowflake_docs/desc-result_3_0.txt
Parameters ¶ ` _ query_id _ ` or ` LAST_QUERY_ID() ` Specifies either the ID for a query you executed (within the last 24 hours in which returns the ID for a query within your current session.
snowflake_docs/current_timestamp_4_0.txt
Returns ¶ Returns the current system time. The data type of the returned value is [ variations) .
snowflake_docs/array_contains_5_0.txt
Examples ¶ The following queries demonstrate basic usage of the ` ARRAY_CONTAINS ` function: > > SELECT ARRAY_CONTAINS('hello'::variant, array_construct('hello', 'hi')); > +------------------------------------------------------------------+ > | ARRAY_CONTAINS('HELLO'::VARIANT, ARRAY_CONSTRUCT('HELLO', '...
snowflake_docs/create-external-volume_5_0.txt
Cloud provider parameters ( ` cloudProviderParams ` ) ¶ Note The KMS keys are managed by the storage owner in Amazon S3 or Google Cloud Storage instances. The service principals (IAM role and GCS service account) must be granted privileges to use KMS keys. For more information, see [ iceberg-configure-external-volu...
snowflake_docs/show-users_2_0.txt
Syntax ¶ SHOW [ TERSE ] USERS [ LIKE '<pattern>' ] [ STARTS WITH '<name_string>' ] [ LIMIT <rows> ] [ FROM '<name_string>' ] Copy
snowflake_docs/st_intersection_agg_1_0.txt
ST_INTERSECTION_AGG ¶ Available to all accounts. Given a GEOGRAPHY column, returns a GEOGRAPHY object that represents the shape containing the combined set of points that are common to the shapes represented by the objects in the column (i.e. the intersection of the shapes). See also:
snowflake_docs/getdate_5_0.txt
Usage Notes ¶ * Do not use the returned value for precise time ordering between concurrent queries (processed by the same virtual warehouse) because the queries might be serviced by different compute resources (in the warehouse).
snowflake_docs/parameters_35_0.txt
label-stage-pipe-load-history-replication-requirements) .
snowflake_docs/create-stream_3_0.txt
Variant Syntax ¶ **CREATE STREAM … CLONE** Creates a new stream with the same definition as the source stream. The clone inherits the current _offset_ (i.e. the current transactional [ table version the source stream. > > CREATE [ OR REPLACE ] STREAM <name> CLONE <source_stream> > [ COPY GRANTS ] > [...
snowflake_docs/create-model_0_0.txt
/ 1. Models 6. Versions MODEL
snowflake_docs/alter-schema_4_0.txt
label-granting-future-privs-on-schema-objects) , on objects in the schema. Object owners retain the OWNERSHIP privileges on the objects; however, only the schema owner can manage privilege grants on the objects.
snowflake_docs/drop-projection-policy_0_0.txt
/ 1. Aggregation Policy 7. Projection Policy POLICY
snowflake_docs/desc-alert_7_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/system_disable_behavior_change_bundle_6_0.txt
Examples ¶ The following example disables the ` 2020_08 ` behavior change bundle for the current account. SELECT SYSTEM$DISABLE_BEHAVIOR_CHANGE_BUNDLE('2020_08'); Copy +--------------------------------------------------+ | SYSTEM$DISABLE_BEHAVIOR_CHANGE_BUNDLE('2020_08') | |-------------------------...
snowflake_docs/database_storage_usage_history_0_0.txt
/ 24. Legacy Views Schema:
snowflake_docs/alter-application-package-release-directive_1_0.txt
ALTER APPLICATION PACKAGE … RELEASE DIRECTIVE ¶ Available This feature is not supported on Google Cloud Platform. Modifies the properties of an existing application package in the Native Apps Framework. Use this command to add a new version or patch. See also:
snowflake_docs/alter-table_2_0.txt
Syntax ¶ ALTER TABLE [ IF EXISTS ] <name> RENAME TO <new_table_name> ALTER TABLE [ IF EXISTS ] <name> SWAP WITH <target_table_name> ALTER TABLE [ IF EXISTS ] <name> { clusteringAction | tableColumnAction | constraintAction } ALTER TABLE [ IF EXISTS ] <name> dataGovnPolicyTagAction ALTER TABLE [ ...
snowflake_docs/alter-replication-group_8_0.txt
label-account-replication-integrations) . ` REPLICATION_SCHEDULE ... ` Specifies the schedule for refreshing secondary replication groups. * ` USING CRON _ expr _ _ time_zone _ ` Specifies a cron expression and time zone for the secondary group refresh. Supports a subset of standard cron utility syntax. For a l...
snowflake_docs/create-notification-integration_8_0.txt
Parameters for Email Notifications ¶ ` ALLOWED_RECIPIENTS=(' _ email_address_1 _ ' [, ... ' _ email_address_N _ ']) ` (For ` TYPE = EMAIL ` ) A comma-separated list of quoted email addresses that can receive notification emails from this integration. You must specify email addresses of users in the current...