id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/create-external-function_4_1.txt
is used as a literal character inside a header value, it must be escaped. In header values, both spaces and tabs are allowed, but header values should not contain more than one whitespace character in a row. This restriction applies to combinations of whitespace characters (e.g. a space followed by a tab) as well as i...
snowflake_docs/is_binary_3_0.txt
Examples ¶ Get all binary values in a variable column. Note The output format for binary values is set using the [ BINARY_OUTPUT_FORMAT setting is ` HEX ` . Create and load the table: > > create or replace table varbin (v variant); > insert into varbin select to_variant(to_binary('snow', 'utf-8')); > > > ...
snowflake_docs/h3_grid_path_2_0.txt
label-data-types-geospatial-h3) cells that represent the line between two cells. The IDs in the returned ARRAY are INTEGER values (if INTEGER values were provided as the input IDs) or VARCHAR values containing the hexadecimal IDs (if hexadecimal IDs were provided as the input IDs).
snowflake_docs/data-types-geospatial_37_0.txt
Working with Invalid Shapes ¶ The next sections explain how to allow functions to create invalid shapes and how to determine if a GEOGRAPHY or GEOMETRY object represents an invalid or repaired shape.
snowflake_docs/system_get_gcp_kms_cmk_grant_access_cmd_5_0.txt
Examples ¶ Return the gcloud command to obtain GCP KMS policy information for customer- managed keys and Tri-Secret Secure. Note that the example gcloud command does not contain real option values, some of which are replaced by angle brackets. For details about the gcloud command, see the documentation for [ gcloud ...
snowflake_docs/alter-packages-policy_0_0.txt
/ 1. Authentication Policy 7. Network Policy 13. Network Rule 19. Packages Policy 25. Password Policy 31. Session Policy 37. Secret POLICY
snowflake_docs/create-replication-group_11_0.txt
| | | ____ month (1-12, JAN-DEC)
snowflake_docs/functions-table_12_0.txt
Usage Notes ¶ * Table functions can also be applied to a set of rows using the LATERAL construct. Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. What Are Table Functions? 2. Using a Table Function 3. List of System-Defined Table Functions 4. Syntax 5. Usage Notes Relate...
snowflake_docs/data-types-datetime_18_0.txt
Simple Arithmetic for Dates ¶ In addition to using interval constants to add to and subtract from dates, time, and timestamps, Snowflake also supports the basic addition and subtraction of days to DATE values, in the form of ` { + | - } <integer> ` , where ` <integer> ` specifies the number of days to add/subtr...
snowflake_docs/create-schema_7_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- CREATE SCHEMA | Database | access-control-configure.html
snowflake_docs/current_task_graphs_1_0.txt
CURRENT_TASK_GRAPHS ¶ Returns the status of a _graph_ run that is currently scheduled or is executing. A graph is currently defined as a single scheduled task or a [ scheduled root task and one or more child tasks. For the purposes of this function, _root task_ refers to either the single scheduled task or the roo...
snowflake_docs/result_scan_1_0.txt
RESULT_SCAN ¶ Returns the result set of a previous command (within 24 hours of when you executed the query) as if the result was a table. This is particularly useful if you want to process the output from any of the following: The command/query can be from the current session or any of your other sessions, including...
snowflake_docs/functions-analytic_11_0.txt
Window Syntax and Usage ¶
snowflake_docs/transactions_6_0.txt
Implicit Transactions ¶ Transactions can be started and ended implicitly, without an explicit ` BEGIN TRANSACTION ` or ` COMMIT ` / ` ROLLBACK ` . Implicit transactions behave the same way as explicit transactions. However, the rules that determine when the implicit transaction starts are different from the rules...
snowflake_docs/st_intersects_5_0.txt
Returns ¶ BOOLEAN.
snowflake_docs/strtok_to_array_1_0.txt
STRTOK_TO_ARRAY ¶ Tokenizes the given string using the given set of delimiters and returns the tokens as an array. If either parameter is a NULL, a NULL is returned. An empty array is returned if tokenization produces no tokens. See also:
snowflake_docs/listing-auto-fulfillment-database-storage-daily_1_0.txt
LISTING_AUTO_FULFILLMENT_DATABASE_STORAGE_DAILY View ¶ This view in the DATA_SHARING_USAGE schema can be used to determine the data storage used by Cross-Cloud Auto-Fulfillment. When a listing is fulfilled to another region, the data product is stored in the region. This view contains details about how much data is ...
snowflake_docs/drop-user_4_0.txt
Usage Notes ¶ * Dropped users cannot be recovered; they must be recreated. DISABLED = TRUE ` instead. Caution When you drop a user, the worksheets and dashboards owned by that user are also removed. To retain access to the worksheets owned by a user, you have two options:
snowflake_docs/show-password-policies_1_0.txt
SHOW PASSWORD POLICIES ¶ Lists password policy information, including the creation date, database and schema names, owner, and any available comments. See also: management.html
snowflake_docs/alter-external-table_13_0.txt
Add or remove partitions manually ¶ Manually add partitions in a specified location for the partition columns: ALTER EXTERNAL TABLE et2 ADD PARTITION(col1='2022-01-24', col2='a', col3='12') LOCATION '2022/01'; Copy Snowflake adds the partitions to the metadata for the external table. The operation also adds any ...
snowflake_docs/account-usage_15_0.txt
Querying the Account Usage Views ¶ This section includes considerations when querying the Account Usage views along with query examples.
snowflake_docs/drop-network-rule_6_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/drop-custom-classifier_4_0.txt
Parameters ¶ ` _ custom_classifier_name _ ` Specifies the identifier (name) for the instance. 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. syntax) .
snowflake_docs/alter-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. ` ' ' ` )). ` _ masking_policy_name _ [ , MASKING POLICY _ masking_policy_2_name _ , ... ] ` guide/security-column-in...
snowflake_docs/create-schema_12_1.txt
| Y > | MYDB | PUBLIC | > | | 1 | > | 2018-11-26 06:08:24.263 -0800 | PUBLIC | N | N > | MYDB | PUBLIC | > | | 1 | > | 2018-12-10 09:35:32.326 -0800 | TSCHEMA | N | Y > | MYDB...
snowflake_docs/h3_point_to_cell_4_0.txt
Returns ¶ Returns an INTEGER value corresponding to the H3 cell ID for the given location and resolution.
snowflake_docs/scheduled_time_8_0.txt
label-alerts-specify-timestamps) . 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/execute-immediate-from_8_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/skew_6_0.txt
Examples ¶ Create a table and load the data: > > create or replace table aggr(k int, v decimal(10,2), v2 decimal(10, 2)); > > insert into aggr values > (1, 10, null), > (2, 10, null), > (2, 20, 22), > (2, 25, null), > (2, 30, 35); > > > Copy Display the data: > > ...
snowflake_docs/create-stage_11_0.txt
External stages ¶ > **Amazon S3** > >> ` REFRESH_ON_CREATE = _ TRUE | FALSE _ ` >> >> >> Specifies whether to automatically refresh the directory table metadata once, immediately after the stage is created. Refreshing the directory table metadata synchronizes the metadata with the current list of data files i...
snowflake_docs/next_day_5_0.txt
Examples ¶ Return the date of the next Friday that occurs after the current date: > > SELECT CURRENT_DATE() AS "Today's Date", > NEXT_DAY("Today's Date", 'Friday ') AS "Next Friday"; > > +--------------+-------------+ > | Today's Date | Next Friday | > |--------------+-------------| > ...
snowflake_docs/get_ddl_1_0.txt
GET_DDL ¶ Returns a DDL statement that can be used to recreate the specified object. For databases and schemas, GET_DDL is recursive (i.e. it returns the DDL statements for recreating all supported objects within the specified database/schema). GET_DDL currently supports the following object types:
snowflake_docs/alter-security-integration-oauth-snowflake_5_0.txt
oauth) . ` OAUTH_ISSUE_REFRESH_TOKENS = TRUE | FALSE ` Boolean that specifies whether to allow the client to exchange a refresh token for an access token when the current access token has expired. If set to ` FALSE ` , a refresh token is not issued. User consent is revoked, and the user must confirm authorization...
snowflake_docs/organization-usage_4_0.txt
SNOWFLAKE Database Roles ¶ notes/preview-features) — Open Available to all accounts. access-control-considerations.html
snowflake_docs/system_stream_has_data_2_0.txt
Syntax ¶ SYSTEM$STREAM_HAS_DATA('<stream_name>') Copy
snowflake_docs/match_recognize_12_0.txt
label-match-recognize-introduction-search-for-patterns-in- non-adjacent-rows) .
snowflake_docs/system_show_active_behavior_change_bundles_2_0.txt
Syntax ¶ SYSTEM$SHOW_ACTIVE_BEHAVIOR_CHANGE_BUNDLES() Copy
snowflake_docs/array_agg_4_0.txt
Returns ¶ Returns a value of type ARRAY. The maximum amount of data that ARRAY_AGG can return for a single call is 16MB.
snowflake_docs/current_task_graphs_3_0.txt
Arguments ¶ All the arguments are optional. ` RESULT_LIMIT => _ integer _ ` A number specifying the maximum number of rows returned by the function. Note that the results are returned in descending SCHEDULED_TIME order. If the number of matching rows is greater than the result limit, the graph executions with the ...
snowflake_docs/let_4_0.txt
Cursor Assignment Syntax ¶ Use one of the following syntaxes to assign an expression to a [ cursor LET <cursor_name> CURSOR FOR <query> ; Copy LET <cursor_name> CURSOR FOR <resultset_name> ; Copy Where: > ` _ cursor_name _ ` > > > The name to give the cursor. This can be any valid Snowflake [ identifier >...
snowflake_docs/least_4_0.txt
Usage Notes ¶ * The first argument determines the return type: * If the first type is numeric, then the return type is ‘widened’ according to the numeric types in the list of all arguments. * If the first type is not numeric, then all other arguments must be convertible to the first type. * If any o...
snowflake_docs/update_4_0.txt
Optional Parameters ¶ ` FROM _ additional_tables _ ` Specifies one or more tables to use for selecting rows to update or for setting new values. Note that repeating the target table results in a self- join. ` WHERE _ condition _ ` Expression that specifies the rows in the target table to update. Default: No valu...
snowflake_docs/enabled_roles_0_0.txt
/
snowflake_docs/create-external-table_1_0.txt
CREATE EXTERNAL TABLE ¶ Creates a new external table in the current/specified schema or replaces an existing external table. When queried, an external table reads data from a set of one or more files in a specified external stage and outputs the data in a single VARIANT column. Additional columns can be defined, wit...
snowflake_docs/desc-schema_2_0.txt
Syntax ¶ DESC[RIBE] SCHEMA <schema_name> Copy
snowflake_docs/create-api-integration_0_0.txt
/ 1. General 7. API 10. Catalog 15. External access 18. Notification 21. Security 25. Storage INTEGRATION
snowflake_docs/data-types-text_8_0.txt
BINARY ¶ The maximum length is 8 MB (8,388,608 bytes). Unlike VARCHAR, the BINARY data type has no notion of Unicode characters, so the length is always measured in terms of bytes. (BINARY values are limited to 8 MB so that they fit within 16 MB when converted to hexadecimal strings, e.g. via ` TO_CHAR(<binary_expre...
snowflake_docs/var_pop_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/array_distinct_4_0.txt
Returns ¶ This function returns an ARRAY that contains the elements of the input array without any duplicate elements. For example, if the value ` 'x' ` appears multiple times in the input ARRAY, only one element has the value ` 'x' ` in the returned ARRAY. If the input argument is NULL, the function returns NULL....
snowflake_docs/create-projection-policy_3_0.txt
Syntax ¶ CREATE [ OR REPLACE ] PROJECTION POLICY [ IF NOT EXISTS ] <name> AS () RETURNS PROJECTION_CONSTRAINT -> <body> [ COMMENT = '<string_literal>' ] Copy
snowflake_docs/endswith_2_0.txt
Syntax ¶ ENDSWITH( <expr1> , <expr2> ) Copy
snowflake_docs/snowpipe_streaming_file_migration_history_0_0.txt
/ Schema:
snowflake_docs/as_date_3_0.txt
Arguments ¶ ` _ variant_expr _ ` An expression that evaluates to a value of type VARIANT.
snowflake_docs/atan2_3_0.txt
Arguments ¶ ` _ y _ ` This parameter is the Y coordinate of the point at the end of the ray. The data type is DOUBLE. ` _ x _ ` This parameter is the X coordinate of the point at the end of the ray. The data type is DOUBLE.
snowflake_docs/copy-into-table_0_0.txt
/ 1. Stage 7. File Format 13. External Volume 20. Pipe 26. Snowpipe Streaming 28. Loading and Unloading loading) COPY INTO <table>
snowflake_docs/raise_1_0.txt
RAISE (Snowflake Scripting) ¶ Raises an exception. For more information about exceptions, see [ Handling Exceptions Note construct is valid only within a [ Snowflake Scripting block See also :
snowflake_docs/desc-streamlit_5_0.txt
Output ¶ The command output provides information about a Streamlit object in the following columns: | name | root_location | main_file | query_warehouse | url_id | Copy Column | Description ---|--- ` name ` | Name of the Streamlit object. ` root_location ` | Root location of the Streamlit object’s applic...
snowflake_docs/show-authentication-policies_7_0.txt
Usage Notes ¶ * The command does not require a running warehouse to execute. * The value for ` LIMIT _ rows _ ` cannot exceed ` 10000 ` . If ` LIMIT _ rows _ ` is omitted, the command results in an error if the result set is larger than 10K rows. To view results for which more than 10K records exist, eith...
snowflake_docs/create-managed-account_3_0.txt
Required Parameters ¶ ` _ name _ ` Identifier for the managed account; must be unique for your account. 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 double quotes (e.g. ` "My object" ` ). Impo...
snowflake_docs/monthname_0_0.txt
/ 1. Construction 5. Extraction 29. Addition & Subtraction 38. Truncation 42. Conversion 57. Time Zone 59. Alerts date-time) MONTHNAME Categories:
snowflake_docs/execute-task_5_0.txt
label-task-dag) with ` _ name _ ` restarting from where the tasks failed. To re-execute a task the following conditions must be met: * The last task graph run must be in state FAILED or CANCELED. * The task graph must not have been modified since it was last run. * The task graph must have been executed, or re...
snowflake_docs/show-tables_4_0.txt
Usage Notes ¶ * If an account (or database or schema) has a large number of tables, then searching the entire account (or table or schema) can consume a significant amount of compute resources. * In the output, results are sorted by database name, schema name, and then table name. This means results for a datab...
snowflake_docs/task_dependents_6_0.txt
Output ¶ The function output provides table properties and metadata in the following columns: | created_on | name | database_name | schema_name | owner | comment | warehouse | schedule | predecessors | state | definition | condition | Copy Column | Description ---|--- ` created_on ` | Date and time when the...
snowflake_docs/drop-account_1_0.txt
DROP ACCOUNT ¶ Drops an account, which initiates the process of [ deleting the account See also:
snowflake_docs/hour-minute-second_0_0.txt
/ 1. Construction 5. Extraction 29. Addition & Subtraction 38. Truncation 42. Conversion 57. Time Zone 59. Alerts date-time) HOUR Categories:
snowflake_docs/parameters_67_0.txt
ODBC_TREAT_DECIMAL_AS_INT ¶ Type : Session — Can be set for Account » User » Session Data Type : Boolean Description : Specifies how ODBC processes columns that have a scale of zero ( ` 0 ` ). Values : ` TRUE ` : ODBC processes a column whose scale is zero as BIGINT. ` FALSE ` : ODBC processes a column whose ...
snowflake_docs/drop-tag_1_0.txt
DROP TAG ¶ This feature requires Enterprise Edition or higher. To inquire about upgrading, please contact [ Snowflake Support Snowflake-Lodge) . Removes a tag from the system. For details about this command and tag references, see [ Tag quotas for tagging-quota) . See also: ddl)
snowflake_docs/desc-stream_2_0.txt
Syntax ¶ DESC[RIBE] STREAM <name> Copy
snowflake_docs/get_path_2_0.txt
Syntax ¶ GET_PATH( <column_identifier> , '<path_name>' ) <column_identifier>:<path_name> :( <column_identifier> , '<path_name>' ) Copy
snowflake_docs/bind-variables_0_0.txt
/ Variables
snowflake_docs/hash_1_0.txt
HASH ¶ Returns a signed 64-bit hash value. Note that HASH never returns NULL, even for NULL inputs. Possible uses for the HASH function include: * Convert skewed data values to values that are likely to be more randomly or more evenly distributed. For example, you can hash a group of highly skewed values and gene...
snowflake_docs/create-table_24_0.txt
Usage Notes ¶ * A schema cannot contain tables and/or views with the same name. When creating a table: > * If a view with the same name already exists in the schema, an error is > returned and the table is not created. > > * If a table with the same name already exists in the schema, an error > is returne...
snowflake_docs/trunc2_0_0.txt
/ 1. Construction 5. Extraction 29. Addition & Subtraction 38. Truncation 42. Conversion 57. Time Zone 59. Alerts date-time) TRUNC Categories:
snowflake_docs/sinh_4_0.txt
Examples ¶ > > SELECT SINH(1.5); > > -------------+ > SINH(1.5) | > -------------+ > 2.129279455 | > -------------+ > > > Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Arguments 3. Examples Language : **English**
snowflake_docs/show-grants_6_0.txt
Examples ¶ List all privileges that have been granted on the ` sales ` database: > > SHOW GRANTS ON DATABASE sales; > > > +---------------------------------+-----------+------------+------------+------------+--------------+--------------+----------------------+--------------+ > | created_on ...
snowflake_docs/create-security-integration-oauth-snowflake_17_0.txt
Custom client example ¶ The following example creates an OAuth integration that uses key pair authentication. The integration allows refresh tokens, which expire after 1 day (86400 seconds). The integration blocks users from starting a session with SYSADMIN as the active role: > > CREATE SECURITY INTEGRATION oau...
snowflake_docs/bitor_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/functions-regexp_5_0.txt
Matching Characters That Are Metacharacters ¶ In regular expressions, some characters are treated as metacharacters that have a specific meaning. For example: * ` ? ` is a quantifier that matches zero or one instance of the preceding element. To match the actual character (e.g. an actual period, asterisk, or que...
snowflake_docs/regexp_substr_all_0_0.txt
/ reference/functions-regexp) REGEXP_EXTRACT_ALL Categories:
snowflake_docs/show-resource-monitors_0_0.txt
/ 1. Virtual Warehouses 8. Resource Monitors reference/commands-warehouse) SHOW RESOURCE MONITORS
snowflake_docs/invoker_role_3_0.txt
Arguments ¶ None.
snowflake_docs/min_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/create-role_8_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/data-types-geospatial_3_0.txt
GEOGRAPHY Data Type ¶ The GEOGRAPHY data type follows the WGS 84 standard (spatial reference ID 4326; for details, see [ https://spatialreference.org/ref/epsg/wgs-84/ Points on the earth are represented as degrees of longitude (from -180 degrees to +180 degrees) and latitude (-90 to +90). Snowflake uses 14 decimal p...
snowflake_docs/try_to_timestamp_1_0.txt
TRY_TO_TIMESTAMP / TRY_TO_TIMESTAMP_* ¶ performs the same operation (i.e. converts an input expression into a timestamp), 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/system_get_directory_table_status_1_0.txt
SYSTEM$GET_DIRECTORY_TABLE_STATUS ¶ Available to all accounts. guide/data-load-dirtables) consistency status for stages in your account. Consistency status indicates whether a directory table on a replicated stage has information about (is consistent with) all of the replicated files on the stage. See also: guide/da...
snowflake_docs/st_geometryfromwkt_1_0.txt
ST_GEOMETRYFROMWKT ¶ known_text_representation_of_geometry) or EWKT (extended well-known text) geospatial.html
snowflake_docs/extract_semantic_categories_4_0.txt
Arguments ¶ **Required:** ` _ object_name _ ` The name of the table, external table, view, or materialized view containing the columns to be classified. If a database and schema is not in use in the current session, the name must be fully-qualified. The name must be specified exactly as it is stored in the database...
snowflake_docs/st_y_5_0.txt
Usage Notes ¶ * Issues an error if the argument is not a Point.
snowflake_docs/as_array_5_0.txt
Examples ¶ This shows how to use the function: > Create a table and data: > >> >> CREATE TABLE multiple_types ( >> array1 VARIANT, >> array2 VARIANT, >> boolean1 VARIANT, >> char1 VARIANT, >> varchar1 VARIANT, >> decimal1 VARIANT, >> double1 VARIANT, >> ...
snowflake_docs/system_show_active_behavior_change_bundles_5_0.txt
Usage Notes ¶
snowflake_docs/array_position_5_0.txt
Usage Notes ¶ * The return value is 0-based, not 1-based. In other words, if the ` _ value_expr _ ` matches the first element in the array, this function returns 0, not 1. * If the value is not contained in the ARRAY, the function returns NULL. * If you specify NULL for ` _ value_expr _ ` , the function re...
snowflake_docs/is_role_in_session_2_0.txt
Syntax ¶ **Literal — specify a role directly:** > > IS_ROLE_IN_SESSION( '<string_literal>' ) > > > Copy **Nonliteral — specify a column:** > > IS_ROLE_IN_SESSION( <column_name> ) > > > Copy
snowflake_docs/split_part_1_0.txt
SPLIT_PART ¶ Splits a given string at a specified character and returns the requested part. If any parameter is NULL, NULL is returned. Tip You can use the search optimization service to improve the performance of queries that call this function. For details, see [ Search Optimization See also :
snowflake_docs/data-types-logical_0_0.txt
/ data-types) Logical
snowflake_docs/hll_estimate_2_0.txt
Syntax ¶ HLL_ESTIMATE( <state> ) Copy
snowflake_docs/set_email_notifications_1_0.txt
<budget_name>!SET_EMAIL_NOTIFICATIONS ¶ guide/intro-editions) . This feature is currently not available for [ Trial Accounts Set the email address(es) to receive budget notifications. Requires a [ procedures.html
snowflake_docs/system_get_tag_allowed_values_3_0.txt
Arguments ¶ ` _ name _ ` The fully-qualified name of the tag key as a string.
snowflake_docs/array_prepend_5_0.txt
Usage Notes ¶
snowflake_docs/ntile_4_0.txt
Usage Notes ¶ If the data is partitioned, then the data is divided into buckets equally within each partition. For example, if the number of buckets is 3, and if the data is partitioned by province, then approximately 1/3 of the rows for each province are put into each bucket. If the statement has an ORDER BY clause...