id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/functions-string_1_0.txt
String & Binary Functions ¶ This family of functions perform operations on a string input value, or binary input value (for certain functions), and return a string or numeric value. The functions are grouped by type of operation performed. Function Name | Binary Input Supported | Collation Supported | Notes ---|--...
snowflake_docs/md5_1_0.txt
MD5 , MD5_HEX ¶ Returns a 32-character hex-encoded string containing the 128-bit MD5 message digest. These functions are synonymous. See also:
snowflake_docs/functions-all_19_0.txt
label-data-types-geometry) object. | | There are two forms of ST_COLLECT. | | geometry) object is completely inside another object of the same type. | | Returns TRUE if no point in one geospatial object is outside another geospatial object. | | Returns TRUE if no point in one geospatial object is outside of another geo...
snowflake_docs/h3_polygon_to_cells_strings_4_0.txt
Syntax ¶ H3_POLYGON_TO_CELLS_STRINGS( <geography_polygon> , <target_resolution> ) Copy
snowflake_docs/bitmap_bucket_number_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-function_30_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- CREATE FUNCTION | Schema | USAGE | Function | Granting the USAGE privilege on the newly created function to a role allows users with that role to call the function elsewhere in Snowflake (e.g. masking policy owner role ...
snowflake_docs/functions-all_22_0.txt
Well-known_binary) or [ EWKB (extended geospatial.html
snowflake_docs/from_5_0.txt
Staged File Clause ¶ ` @[ _ namespace _ .] _ stage_name _ [/ _ path _ ] ` Specifies a named stage to be queried (or ` ~ ` for referring to the stage for the current user or ` % ` followed by a table name for referring to the stage for the specified table). When querying a stage, you can also optionally spec...
snowflake_docs/desc-secret_10_0.txt
Examples ¶ Describe the secret: > > DESC SECRET service_now_creds_pw; > > > Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Parameters 3. Output 4. Access control requirements 5. Usage notes 6. Examples Related content Language : **English**
snowflake_docs/st_asgeojson_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_ASGEOJSON Categories:
snowflake_docs/listagg_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-storage-integration_9_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/alter-alert_0_0.txt
/
snowflake_docs/create-security-integration-saml2_0_0.txt
/ 1. General 7. API 10. Catalog 15. External access 18. Notification 21. Security 25. Storage SAML2
snowflake_docs/list_11_0.txt
Usage notes ¶ Call each method in a separate SQL statement (no method chaining).
snowflake_docs/commands-native-apps_0_0.txt
/ 1. APPLICATION 7. APPLICATION PACKAGE 12. APPLICATION ROLE 19. Additional Commands commands) Native Apps Framework
snowflake_docs/drop-role_5_0.txt
Examples ¶ > > DROP ROLE myrole; > > > 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/trunc_6_0.txt
Examples ¶ The following examples demonstrate the ` TRUNC ` function. > > SELECT DISTINCT n, TRUNCATE(n) > FROM test_1 > ORDER BY n; > +----------+-------------+ > | N | TRUNCATE(N) | > |----------+-------------| > | -975.975 | -975 | > | 135.135 | 135 | > ...
snowflake_docs/warehouse_events_history_5_1.txt
he suspended cluster (always ` 1 ` for a > single-cluster warehouse) > > * Event state: COMPLETED > > * Event reason: > > * WAREHOUSE_AUTOSUSPEND or WAREHOUSE_SUSPEND (single-cluster warehouses) > > * MULTICLUSTER_SPINDOWN (multi-cluster warehouses) > > * RESOURCE_MONITOR_SUSPEND (all warehouses) > > ...
snowflake_docs/current_account_2_0.txt
label-account-locator) used by the user’s current session. Note identifier.html
snowflake_docs/system_stream_backlog_2_0.txt
label-streams-introduction-offset) for a specified stream and the current timestamp. This function accepts any stream type as input (e.g. table, external table, or view) with the exception of streams on directory tables. For each table version, the function provides the estimated number of change data capture (CDC) rec...
snowflake_docs/drop-iceberg-table_6_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/sql-all_11_0.txt
label-replication-and-failover-groups) from the account. | from the system. | Removes the specified role from the system. | Removes a row access policy from the system. | Removes a schema from the current/specified database. | Removes a secret from the system. | Removes a sequence from the current/specified...
snowflake_docs/data-types-datetime_19_0.txt
Date Arithmetic Examples ¶ Add 1 day to a specific date: > > select to_date('2018-04-15') + 1; > > +---------------------------+ > | TO_DATE('2018-04-15') + 1 | > |---------------------------| > | 2018-04-16 | > +---------------------------+ > > > Copy Subtract 4 days from ...
snowflake_docs/get_0_0.txt
/
snowflake_docs/try_to_double_1_0.txt
TRY_TO_DOUBLE ¶ operation (i.e. converts an input expression to a double-precision floating- point number), but with error-handling support (i.e. if the conversion cannot be performed, it returns a NULL value instead of raising an error). For more information, see [ Error-handling Conversion Functions
snowflake_docs/in_12_0.txt
Using NULL ¶ Remember that NULL != NULL. Neither of the following queries returns a match when the value on the left or right of the ` IN ` contains a NULL: > > SELECT NULL IN (1, 2, NULL) AS RESULT; > +--------+ > | RESULT | > |--------| > | NULL | > +--------+ > > > Copy > > > ...
snowflake_docs/create-compute-pool_9_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/array_min_2_0.txt
Syntax ¶ ARRAY_MIN( <array> ) Copy
snowflake_docs/to_variant_2_0.txt
Syntax ¶ TO_VARIANT( <expr> ) Copy
snowflake_docs/organization-usage_2_0.txt
ORGANIZATION_USAGE Views ¶ The ORGANIZATION_USAGE schema contains the following views: View | Type | Latency [1] | Notes ---|---|---|--- | Object | 24 hours | usage/automatic_clustering_history) | Historical | 24 hours | Data retained for 1 year. | Historical | 24 hours | usage/data_transfer_daily_history...
snowflake_docs/decrypt_raw_5_0.txt
Usage Notes ¶ > * To decrypt data encrypted by ` ENCRYPT() ` , use ` DECRYPT() ` . Do > not use ` DECRYPT_RAW() ` . * To decrypt data encrypted by ` ENCRYPT_RAW() ` , use ` DECRYPT_RAW() ` . Do not use ` DECRYPT() ` . * The function’s parameters are masked for security. Sensitive information such as the...
snowflake_docs/data-types-structured_36_0.txt
Determining if Two ARRAYs Overlap ¶ If you need to determine if the elements of two structured ARRAYs overlap, SELECT ARRAYS_OVERLAP(numeric_array, other_numeric_array); Copy The ARRAYs must be of comparable types . Note that you cannot pass a semi-structured ARRAY and a structured ARRAY to this function. Both...
snowflake_docs/operators-subquery_0_0.txt
/
snowflake_docs/current_timestamp_3_0.txt
Arguments ¶ ` _ fract_sec_precision _ ` This optional argument indicates the precision with which to report the time. For example, a value of 3 says to use 3 digits after the decimal point (i.e. to specify the time with a precision of milliseconds). The default precision is 9 (nanoseconds). Valid values range from ...
snowflake_docs/commands-warehouse_1_0.txt
Warehouse and Resource Monitor Commands ¶ Warehouse and resource monitor commands enable you to manage your warehouses and resource monitors.
snowflake_docs/snowpark_container_services_history_0_0.txt
/ Schema:
snowflake_docs/alter-streamlit_4_0.txt
Usage Notes ¶ * If you run the ALTER STREAMLIT command while the Streamlit app is running, the app does not reflect the changes that you made. If you want your changes reflected in the app, you must reload or reboot the app. * Regarding metadata: Attention Customers should ensure that no personal data (other t...
snowflake_docs/parameters_80_0.txt
ROWS_PER_RESULTSET ¶ Type : Session — Can be set for Account » User » Session Data Type : Number Clients : SQL API Description : Specifies the maximum number of rows returned in a result set. Values : ` 0 ` to any number (i.e. no limit) — a value of ` 0 ` specifies no maximum. Default : ` 0 `
snowflake_docs/previous_day_4_0.txt
Usage Notes ¶ * The return value is always a date regardless of whether ` _ date_or_time_expr _ ` is a date or timestamp.
snowflake_docs/binary-examples_2_0.txt
Converting Between Hex and Base64 ¶ The BINARY data type can be used as an intermediate step when converting between hex and base64 strings. : SELECT c1, to_char(to_binary(c1, 'hex'), 'base64') FROM hex_strings; +----------------------+-----------------------------------------+ | C1 | T...
snowflake_docs/show-views_2_0.txt
Syntax ¶ SHOW [ TERSE ] VIEWS [ LIKE '<pattern>' ] [ IN { ACCOUNT | DATABASE [ <db_name> ] | [ SCHEMA ] [ <schema_name> ] } ] [ STARTS WITH '<name_string>' ] [ LIMIT <rows> [ FROM '<name_string>' ] ] Copy
snowflake_docs/show-variables_1_0.txt
SHOW VARIABLES ¶ See also:
snowflake_docs/system_registry_list_images_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$REGISTRY_LIST_IMAGES Categories:
snowflake_docs/st_dwithin_3_0.txt
Arguments ¶ ` _ geography_expression_1 _ ` The argument must be an expression of type GEOGRAPHY. ` _ geography_expression_2 _ ` The argument must be an expression of type GEOGRAPHY. ` _ distance_in_meters _ ` The argument must be an expression of type REAL. The distance is in meters.
snowflake_docs/is_granted_to_invoker_role_4_0.txt
Usage notes ¶ * Only one role name can be passed as an argument. * The following table summarizes the context in which you can call the function and the role hierarchy Snowflake evaluates. Context | Evaluated role ---|--- User | Table | CURRENT_ROLE. View | View owner role. UDF | UDF owner role. Stor...
snowflake_docs/st_makepoint_5_0.txt
Usage Notes ¶ * ST_POINT is an alias for ST_MAKEPOINT.
snowflake_docs/try_to_boolean_2_0.txt
Syntax ¶ TRY_TO_BOOLEAN( <string_expr> ) Copy
snowflake_docs/convert_timezone_1_0.txt
CONVERT_TIMEZONE ¶ Converts a timestamp to another time zone.
snowflake_docs/alter-table_30_0.txt
Adding and Dropping Row Access Policies ¶ The following example adds a row access policy on a table while specifying a single column. After setting the policy, you can verify by checking the [ row-policy-refs) . > > alter table t1 add row access policy rap_t1 on (empl_id); > > > Copy The following example adds...
snowflake_docs/create-security-integration-scim_5_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/system_classify_7_0.txt
Examples ¶ Classify a table: > > CALL SYSTEM$CLASSIFY('hr.tables.empl_info', null); > > > Copy Classify a table and specify the number of rows to sample: > > CALL SYSTEM$CLASSIFY('hr.tables.empl_info', {'sample_count': 1000}); > > > Copy Classify a table and set the system tags to the columns: > > CA...
snowflake_docs/desc-integration_0_0.txt
/ 1. General 7. API 10. Catalog 15. External access 18. Notification 21. Security 25. Storage INTEGRATION
snowflake_docs/create-replication-group_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the replication group. The identifier must start with an alphabetic character and cannot contain spaces or special characters unless the identifier string is enclosed in double quotes (e.g. ` "My object" ` ). Identifiers enclosed in double quotes are also case...
snowflake_docs/space_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/create-custom-classifier_6_0.txt
Access control requirements ¶ overview.html
snowflake_docs/decrypt_raw_0_0.txt
/ encryption) DECRYPT_RAW Categories:
snowflake_docs/last_transaction_1_0.txt
LAST_TRANSACTION ¶ Returns the transaction ID of the last transaction that was either committed or rolled back in the current session. See also:
snowflake_docs/create-row-access-policy_1_0.txt
CREATE ROW ACCESS POLICY ¶ This feature requires Enterprise Edition (or higher). To inquire about upgrading, please contact [ Snowflake Support Snowflake-Lodge) . Creates a new row access policy in the current/specified schema or replaces an existing row access policy. After creating a row access policy, add the pol...
snowflake_docs/endswith_5_0.txt
Collation Details ¶ specification) of all input arguments must be compatible. This function does not support the following collation specifications: * ` pi ` (punctuation-insensitive). * ` cs-ai ` (case-sensitive, accent-insensitive). Note To use this function with a column that has the ` upper ` or ` lower...
snowflake_docs/editdistance_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/parameters_82_0.txt
label-network-isolation-aws-config) . Alternative formats include ` bucket.vpce- xxxxxxxx.s3.<region>.vpce.amazonaws.com ` and ` vpce- xxxxxxxx.s3.<region>.vpce.amazonaws.com ` . Default : Empty string
snowflake_docs/st_covers_1_0.txt
ST_COVERS ¶ Returns TRUE if no point in one geospatial object is outside of another geospatial object. In other words: ST_COVERS is similar to, but subtly different from, ST_CONTAINS. For details on the differences between “covers” and “contains”, see the [ Dimensionally . Although ST_COVERS and ST_CONTAINS might se...
snowflake_docs/create-versioned-schema_1_0.txt
CREATE OR ALTER VERSIONED SCHEMA ¶ Available to all accounts. Creates a new versioned schema or modifies an existing versioned schema. This command is only supported for application instances in the Native Apps Framework. See also:
snowflake_docs/functions-date-time_5_0.txt
ISO Weeks ¶ standard (for dates and time formats), ISO weeks always start on Monday and “belong” to the year that contains the Thursday of that week. This means that a day in one year might belong to a week in a different year: * For days in early January, the WOY (week of the year) value can be 52 or 53 (i.e. the...
snowflake_docs/forecast_23_0.txt
<name>!SHOW_EVALUATION_METRICS ¶ Returns out-of-sample evaluation metrics generated using time series cross validation. Metrics are available only if ` evaluate=TRUE ` in the ` CONFIG_OBJECT ` during model construction (this is the default).
snowflake_docs/covar_pop_3_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/transactions_23_0.txt
Analyzing Blocked Transactions with the LOCK_WAIT_HISTORY View ¶ transaction details that can be useful in analyzing blocked transactions. Each row in the output includes the details for a transaction that is waiting on a lock and the details of transactions that are holding that lock or waiting ahead for that lock....
snowflake_docs/get_query_operator_stats_11_0.txt
label-udf-java-methods) was invoked. | ` Java UDTF process() execution time ` | DOUBLE | amount of time to execute the Java UDTF process. | ` Avg Java UDTF process() execution time ` | DOUBLE | average amount of time to execute the Java UDTF process. | ` Java UDTF's constructor invocations ` | DOUB...
snowflake_docs/create-projection-policy_2_0.txt
label-projection-policy-ddl)
snowflake_docs/transactions_9_0.txt
Mixing Implicit and Explicit Starts and Ends of a Transaction ¶ To avoid writing confusing code, you should avoid mixing implicit and explicit starts and ends in the same transaction. The following are legal, but discouraged: * An implicitly-started transaction can be ended by an explicit COMMIT or ROLLBACK. * ...
snowflake_docs/strtok_split_to_table_5_0.txt
Examples ¶ Here is a simple example on constant input. > > SELECT table1.value > FROM table(strtok_split_to_table('a.b', '.')) AS table1 > ORDER BY table1.value; > +-------+ > | VALUE | > |-------| > | a | > | b | > +-------+ > > > Copy The following two examples...
snowflake_docs/create-security-integration-api-auth_7_0.txt
Optional parameters ¶ Note that this is an exhaustive list of parameters that you can configure. Configure the parameters in the integration to match the parameters that you that you choose. ` OAUTH_AUTHORIZATION_ENDPOINT = ' _ string_literal _ ' ` Specifies the URL for authenticating to the external service. F...
snowflake_docs/system_get_service_logs_1_0.txt
SYSTEM$GET_SERVICE_LOGS ¶ > services/overview) is available to all Snowflake accounts in AWS commercial > regions except for trial accounts. Retrieves local logs from a [ Snowpark Container Services service container. See also: services/working-with-services.html
snowflake_docs/execute-immediate-from_6_0.txt
Access Control Requirements ¶ Note that operating on any object in a schema also requires the USAGE privilege on the parent database and schema. For instructions on creating a custom role with a specified set of privileges, configure.html
snowflake_docs/try_cast_2_0.txt
Syntax ¶ TRY_CAST( <source_string_expr> AS <target_data_type> ) Copy
snowflake_docs/alter-projection-policy_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/last_day_1_0.txt
LAST_DAY ¶ Returns the last day of the specified date part for a date or timestamp. Commonly used to return the last day of the month for a date or timestamp.
snowflake_docs/create-function_3_0.txt
Java Handler ¶ Use the syntax below if the source code is in-line: CREATE [ OR REPLACE ] [ { TEMP | TEMPORARY } ] [ SECURE ] FUNCTION [ IF NOT EXISTS ] <name> ( [ <arg_name> <arg_data_type> [ DEFAULT <default_value> ] ] [ , ... ] ) [ COPY GRANTS ] RETURNS { <result_data_type> | TABLE ( <col_n...
snowflake_docs/create-dynamic-table_6_0.txt
Optional Parameters ¶ ` COMMENT ' _ string_literal _ ' ` Specifies a comment for the column. (Note that comments can be specified at the column level or the table level. The syntax for each is slightly different.) ` MASKING POLICY = _ policy_name _ ` set on a column. ` _ column_list _ ` If you want to chang...
snowflake_docs/system_get_iceberg_table_information_5_0.txt
Usage notes ¶ Calling this function requires a role that has the OWNERSHIP privilege on the Iceberg table.
snowflake_docs/system_get_job_logs_1_0.txt
SYSTEM$GET_JOB_LOGS ¶ Support for this feature is currently not in production and is available only to selected accounts. Contact your Snowflake representative for more information. Retrieves local logs from a [ Snowpark Container Services job container. See also: services/working-with-jobs.html
snowflake_docs/remaining_balance_daily_0_0.txt
/ 24. Legacy Views Schema:
snowflake_docs/transactions_22_0.txt
Allowing Statement Errors to Abort Transactions ¶ To allow a statement error within a transaction to abort the transaction, set on-error) parameter at the session or account level.
snowflake_docs/hybrid_table_usage_history_0_0.txt
/ Schema:
snowflake_docs/binary-examples_1_0.txt
Using Binary Data ¶ The usefulness and flexibility of the BINARY data type is best demonstrated by example. This topic provides practical examples of tasks that involve the BINARY data type and its three encoding schemes.
snowflake_docs/alter-notification-integration_8_0.txt
Examples ¶ The following example initiates operation of a suspended integration: ALTER NOTIFICATION INTEGRATION myint SET ENABLED = TRUE; ALTER NOTIFICATION INTEGRATION myint UNSET COMMENT; Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Parameters 3. Cloud ...
snowflake_docs/regr_sxx_1_0.txt
REGR_SXX ¶ Returns REGR_COUNT(y, x) * VAR_POP(x) for non-null pairs.
snowflake_docs/grant-privilege-application-role_11_0.txt
Example ¶ Grant the SELECT privilege on a view to an application role: GRANT SELECT ON VIEW data.views.credit_usage TO APPLICATION ROLE app_snowflake_credits; Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Required parameters 3. Optional parameters 4. ...
snowflake_docs/is_binary_2_0.txt
Syntax ¶ IS_BINARY( <variant_expr> ) Copy
snowflake_docs/st_geometryfromwkt_3_0.txt
Syntax ¶ ST_GEOMETRYFROMWKT( <varchar_expression> [ , <srid> ] [ , <allow_invalid> ] ) ST_GEOMFROMWKT( <varchar_expression> [ , <srid> ] [ , <allow_invalid> ] ) ST_GEOMETRYFROMEWKT( <varchar_expression> [ , <srid> ] [ , <allow_invalid> ] ) ST_GEOMFROMEWKT( <varchar_expression> [ , <srid> ] [ , <allow...
snowflake_docs/div0null_0_0.txt
/ 1. Arithmetic 4. Rounding and Truncation 13. Exponent and Root 21. Logarithmic 24. Trigonometric 42. Other numeric) DIV0NULL Categories:
snowflake_docs/hex_decode_binary_5_0.txt
Examples ¶ Start with a string; encode it as characters representing hexadecimal digits; then convert those hex digit characters to BINARY using ` HEX_DECODE_BINARY ` : > Create and fill a table: > >> >> CREATE TABLE binary_table (v VARCHAR, b BINARY); >> INSERT INTO binary_table (v, b) >> SELECT 'H...
snowflake_docs/st_envelope_7_0.txt
Examples ¶
snowflake_docs/forecast_0_0.txt
/ FORECAST
snowflake_docs/system_clustering_depth_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$CLUSTERING_DEPTH Categories:
snowflake_docs/h3_grid_distance_5_0.txt
Usage Notes ¶ The two input cell IDs must use the same resolution.
snowflake_docs/system_user_task_cancel_ongoing_executions_4_0.txt
Usage Notes ¶ * Only the task owner (i.e. the role with the OWNERSHIP privilege on the task) or a role with the OPERATE privilege on the task can call this function. * ` _ task_name _ ` is a string so it must be enclosed in single quotes: * Note that the entire name must be enclosed in single quotes, in...
snowflake_docs/desc-warehouse_3_0.txt
Parameters ¶ ` _ name _ `
snowflake_docs/sentiment-snowflake-cortex_2_0.txt
label-cortex-llm-availability) . Returns a sentiment score for the given English-language input text.