id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/dateadd_0_0.txt
/ 1. Construction 5. Extraction 29. Addition & Subtraction 38. Truncation 42. Conversion 57. Time Zone 59. Alerts date-time) DATEADD Categories:
snowflake_docs/unset_2_0.txt
Syntax ¶ UNSET <var> UNSET ( <var> [ , <var> ... ] ) Copy
snowflake_docs/desc-authentication-policy_4_0.txt
Access Control Requirements ¶ access-control-overview-roles) used to execute this SQL command must have at control-overview.html
snowflake_docs/drop-external-volume_8_0.txt
Usage notes ¶ * After a dropped external volume has been purged, it cannot be recovered; it must be recreated. * After dropping an external volume, creating an external volume with the same name creates a new version of the external volume. You can restore the dropped version of the previous external volume by ...
snowflake_docs/create-schema_4_0.txt
Optional Parameters ¶ ` TRANSIENT ` Specifies a schema as transient. Transient schemas do not have a Fail-safe period so they do not incur additional storage costs once they leave Time Travel; however, this means they are also not protected by Fail-safe in the event of a data loss. For more information, see [ Under...
snowflake_docs/show-pipes_5_0.txt
Output ¶ The command output provides pipe properties and metadata in the following columns: Column | Description ---|--- created_on | Date and time when the pipe was created. name | Name of the pipe. database_name | Database in which the pipe is stored. schema_name | Schema in which the pipe is stored. d...
snowflake_docs/sha1_3_0.txt
Arguments ¶ ` _ msg _ ` A string expression, the message to be hashed.
snowflake_docs/drop-user_5_0.txt
Examples ¶ > > DROP USER user1; > > > 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/top_insights_7_0.txt
label-contribution-explorer-example) . Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Arguments 3. Output 4. Usage Notes 5. Example Related content Language : **English**
snowflake_docs/drop-session-policy_4_0.txt
Parameters ¶ ` _ name _ ` Identifier for the session policy; must be unique for your account. The identifier value 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" ` ). Identifiers enclosed ...
snowflake_docs/map_insert_3_0.txt
Arguments ¶ ` _ map _ ` The source map into which the new key-value pair is inserted. ` _ key _ ` The new key to insert into the map. Must be different from all existing keys in the map, unless ` _ updateFlag _ ` is set to TRUE. ` _ value _ ` The value associated with the key. **Optional** ` _ updateFlag _ ` A ...
snowflake_docs/st_envelope_5_0.txt
label-data-types-geometry) that represents the minimum bounding box around the input object.
snowflake_docs/drop-network-rule_0_0.txt
/ 1. Authentication Policy 7. Network Policy 13. Network Rule 19. Packages Policy 25. Password Policy 31. Session Policy 37. Secret
snowflake_docs/conditional_true_event_5_1.txt
---+-------+--------------+------------+ > > > Copy This example also compares CONDITIONAL_CHANGE_EVENT and CONDITIONAL_TRUE_EVENT: > > CREATE TABLE borrowers ( > name VARCHAR, > status_date DATE, > late_balance NUMERIC(11, 2), > thirty_day_late_balance NUMERIC(11, 2) > ); ...
snowflake_docs/use-role_2_0.txt
Syntax ¶ USE ROLE <name> Copy
snowflake_docs/array_except_2_0.txt
Syntax ¶ ARRAY_EXCEPT( <source_array> , <array_of_elements_to_exclude> ) Copy
snowflake_docs/group-by-cube_1_0.txt
GROUP BY CUBE ¶ “cross-tabulations” rows. Sub-total rows are rows that further aggregate whose values are derived by computing the same aggregate functions that were used to produce the grouped rows. A CUBE grouping is equivalent to a series of grouping sets and is essentially a shorter specification. The ` N ` ele...
snowflake_docs/data-types-numeric_3_0.txt
NUMBER ¶ Numbers up to 38 digits, with an optional precision and scale: Precision : Total number of digits allowed. Scale : Number of digits allowed to the right of the decimal point. By default, precision is ` 38 ` and scale is ` 0 ` (i.e. ` NUMBER(38, 0) ` ). Note that precision limits the range of values th...
snowflake_docs/create-user_11_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/desc-table_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the table to describe. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. ` TYPE = COLUMNS | STAGE ` Specifies whether to display the ...
snowflake_docs/create-file-format_1_0.txt
CREATE FILE FORMAT ¶ Creates a named file format that describes a set of staged data to access or load into Snowflake tables. See also: into-table)
snowflake_docs/approximate_similarity_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/listing-access-history_8_0.txt
, "objectName": "DATABASE_1.PUBLIC.VIEW_1" }, { "Columns": [ { "columnId":
snowflake_docs/create-iceberg-table_11_0.txt
Optional parameters ¶ ` EXTERNAL_VOLUME = ' _ external_volume_name _ ' ` Specifies the identifier (name) for the external volume where the Iceberg table stores its metadata files and data in Parquet format. Iceberg metadata and manifest files store the table schema, partitions, snapshots, and other metadata. If...
snowflake_docs/nvl_7_0.txt
Returns ¶ Returns the data type of the returned expression. If both expressions are NULL, returns NULL.
snowflake_docs/create-account_1_0.txt
CREATE ACCOUNT ¶ Creates a new account in your organization. See also:
snowflake_docs/show-variables_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/h3_cell_to_children_string_2_0.txt
Syntax ¶ H3_CELL_TO_CHILDREN_STRING( <cell_id> , <target_resolution> ) Copy
snowflake_docs/desc-integration_1_0.txt
DESCRIBE INTEGRATION ¶ Describes the properties of an integration. DESCRIBE can be abbreviated to DESC. See also: API integrations : Catalog integrations : External access integrations : Notification integrations : Security integrations : Storage integrations :
snowflake_docs/parse_url_5_0.txt
Examples ¶ Parse a simple URL: > > SELECT PARSE_URL('https://www.snowflake.com/'); > +-----------------------------------------+ > | PARSE_URL('HTTPS://WWW.SNOWFLAKE.COM/') | > |-----------------------------------------| > | { | > | "fragment": null, ...
snowflake_docs/show-compute-pools_1_0.txt
SHOW COMPUTE POOLS ¶ > services/overview) is available to all Snowflake accounts in AWS commercial > regions except for trial accounts. services/working-with-compute-pool) in your account for which you have access privileges. See also:
snowflake_docs/account-usage_7_0.txt
ACCOUNT_USAGE Views ¶ The ACCOUNT_USAGE schema contains the following views: View | Type | Latency [1] | Edition [3] | Notes ---|---|---|---|--- | Historical | 3 hours | Enterprise Edition (or higher) | Data retained for 1 year. | Historical | 3 hours | Enterprise Edition (or higher) | Data retained for 1 ye...
snowflake_docs/match_recognize_21_0.txt
Report One Summary Row for Each ` V ` Shape ¶ The following query searches for all ` V ` shapes in the previously presented stock_price_history. The output is explained in more detail after the query and output. > > SELECT * FROM stock_price_history > MATCH_RECOGNIZE( > PARTITION BY company > ...
snowflake_docs/create-clone_7_0.txt
Dynamic Tables ¶ CREATE [ OR REPLACE ] DYNAMIC TABLE <name> CLONE <source_dynamic_table> [ { AT | BEFORE } ( { TIMESTAMP => <timestamp> | OFFSET => <time_difference> | STATEMENT => <id> } ) ] [ TARGET_LAG = { '<num> { seconds | minutes | hours | days }' | DOWNSTREAM } WARE...
snowflake_docs/alter-authentication-policy_8_0.txt
Usage Notes ¶
snowflake_docs/current_schemas_4_0.txt
Usage Notes ¶ Do not confuse this function with the similarly named function [
snowflake_docs/constructs_0_0.txt
/ commands) Query Syntax
snowflake_docs/st_makeline_1_0.txt
ST_MAKELINE ¶ geometry) object that represents a line connecting the points in the input objects. See also:
snowflake_docs/decrypt_3_0.txt
Arguments ¶ **Required:** ` _ value_to_decrypt _ ` The BINARY value to decrypt. ` _ passphrase _ ` The passphrase to use to encrypt/decrypt the data. The passphrase is a VARCHAR. **Optional:** ` _ additional_authenticated_data _ ` Additional authenticated data (AAD) is additional data whose confidentiality and au...
snowflake_docs/like_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/desc-compute-pool_5_0.txt
Access Control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/concat_6_0.txt
Collation Details ¶
snowflake_docs/st_asewkb_5_0.txt
Usage Notes ¶
snowflake_docs/references_7_0.txt
label-stored-procedure-session-state- owners) executes with the privileges of the _owner_ rather than the privileges of the _caller_ who executes the stored procedure. In order to perform actions on a table, view, or function that the caller has privileges to access, the caller must pass a reference to the table, view,...
snowflake_docs/try_to_geometry_1_0.txt
TRY_TO_GEOMETRY ¶ geospatial.html
snowflake_docs/array_remove_at_2_0.txt
Syntax ¶ ARRAY_REMOVE_AT( <array> , <position> ) Copy
snowflake_docs/st_dwithin_2_0.txt
Syntax ¶ ST_DWITHIN( <geography_expression_1> , <geography_expression_2> , <distance_in_meters> ) Copy
snowflake_docs/sql-all_1_0.txt
All Commands (Alphabetical) ¶ This topic provides a list of all DDL and DML commands, as well as the SELECT command and other related commands, in alphabetical order. Command Name | Summary ---|--- **A** | | Modifies the metadata of an account-level or database object, or the parameters for a session. | Modi...
snowflake_docs/regr_r2_5_0.txt
Examples ¶ create or replace table aggr(k int, v decimal(10,2), v2 decimal(10, 2)); insert into aggr values(1, 10, null); insert into aggr values(2, 10, 11), (2, 20, 22), (2, 25,null), (2, 30, 35); Copy select k, regr_r2(v, v2) from aggr group by k; ---+----------------+ k | regr_r2(v, v2) |...
snowflake_docs/system_enable_behavior_change_bundle_4_0.txt
Returns ¶ Returns the VARCHAR value ` ENABLED ` if the function successfully enables the behavior changes.
snowflake_docs/radians_0_0.txt
/ 1. Arithmetic 4. Rounding and Truncation 13. Exponent and Root 21. Logarithmic 24. Trigonometric 42. Other numeric) RADIANS Categories:
snowflake_docs/is_timestamp_1_0.txt
IS_TIMESTAMP_* ¶ Verifies whether a VARIANT value contains the respective TIMESTAMP value: * IS_TIMESTAMP_LTZ (value with local time zone). * IS_TIMESTAMP_NTZ (value with no time zone). * IS_TIMESTAMP_TZ (value with time zone). See also: IS_TIMESTAMP_*
snowflake_docs/decrypt_raw_4_0.txt
Returns ¶ The function returns the decrypted value. The data type of the returned value is BINARY.
snowflake_docs/endswith_3_0.txt
Arguments ¶ ` _ expr1 _ ` The string to search in. ` _ expr2 _ ` The string to search for at the end of ` _ expr1 _ ` .
snowflake_docs/data-types-semistructured_15_0.txt
Common Uses for an OBJECT ¶ An OBJECT is typically used when one or more of the following are true: * You have multiple pieces of data that are identified by strings. For example, if you want to look up information by province name, you might want to use an OBJECT. * You want to store information about the data...
snowflake_docs/show-databases_1_0.txt
SHOW DATABASES ¶ Lists the databases for which you have access privileges across your entire account, including dropped databases that are still within the Time Travel retention period and, therefore, can be undropped. The output returns database metadata and properties, ordered lexicographically by database name. T...
snowflake_docs/ln_3_0.txt
Usage Notes ¶ * Always returns a floating point number, even if the input expression is of type integer. * If the input expression is less than or equal to 0, an error is returned.
snowflake_docs/data-types-structured_48_0.txt
Using the PARSE_JSON Function ¶ structured types.
snowflake_docs/roles_1_0.txt
ROLES View ¶ This Account Usage view can be used to query a list of all roles defined in the account. The data is retained for 365 days (1 year).
snowflake_docs/show-objects_1_0.txt
SHOW OBJECTS ¶ Lists the tables and views for which you have access privileges. This command can be used to list the tables and views for a specified database or schema (or the current database/schema for the session), or your entire account.
snowflake_docs/boolor_agg_2_0.txt
Syntax ¶ **Aggregate function** BOOLOR_AGG( <expr> ) Copy **Window function** BOOLOR_AGG( <expr> ) OVER ( [ PARTITION BY <partition_expr> ] ) Copy
snowflake_docs/datediff_0_0.txt
/ 1. Construction 5. Extraction 29. Addition & Subtraction 38. Truncation 42. Conversion 57. Time Zone 59. Alerts date-time) DATEDIFF Categories:
snowflake_docs/st_covers_2_0.txt
Syntax ¶ ST_COVERS( <geography_expression_1> , <geography_expression_2> ) ST_COVERS( <geometry_expression_1> , <geometry_expression_2> ) Copy
snowflake_docs/system_get_service_status_7_0.txt
Examples ¶ The following function retrieves status information for the “echo_service” service. The function specifies a 5-second timeout: SELECT SYSTEM$GET_SERVICE_STATUS('echo_service', 5); Copy Example outputs: * **Running one service instance that has one container.** The function returns the container info...
snowflake_docs/create-security-integration-api-auth_3_0.txt
OAuth: Client Credentials ¶ CREATE SECURITY INTEGRATION <name> TYPE = API_AUTHENTICATION AUTH_TYPE = OAUTH2 ENABLED = { TRUE | FALSE } [ OAUTH_TOKEN_ENDPOINT = '<string_literal>' ] [ OAUTH_CLIENT_AUTH_METHOD = CLIENT_SECRET_POST ] [ OAUTH_CLIENT_ID = '<string_literal>' ] ...
snowflake_docs/system_get_predecessor_return_value_1_0.txt
SYSTEM$GET_PREDECESSOR_RETURN_VALUE ¶ Retrieves the return value for the predecessor task in a [ task graph explicitly set by the predecessor task by calling the [
snowflake_docs/get_ddl_2_0.txt
Syntax ¶ GET_DDL( '<object_type>' , '[<namespace>.]<object_name>' [ , <use_fully_qualified_names_for_recreated_objects> ] ) Copy
snowflake_docs/st_geographyfromwkb_6_0.txt
Returns ¶ geospatial.html
snowflake_docs/cast_7_0.txt
label-structured-types-transform-object-insert) function instead.
snowflake_docs/desc-aggregation-policy_7_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/try_hex_decode_binary_5_0.txt
Examples ¶ This shows how to use the function ` TRY_HEX_DECODE_BINARY ` (note that the function is used in the ` INSERT ` statement to decode into a BINARY field; the function is not used in the ` SELECT ` statement): > Create a table and data: > >> >> CREATE TABLE hex (v VARCHAR, b BINARY); >> INSERT I...
snowflake_docs/constraints-create_0_0.txt
/
snowflake_docs/get_service_type_usage_5_0.txt
Access Control Requirements ¶ * The following minimum privileges and roles are required to view results for _custom budgets_ : * A role granted the USAGE privilege on the database and schema that contains the budget instance. * The following role is required to view results for the _account budget_ : guid...
snowflake_docs/system_estimate_query_acceleration_7_0.txt
label-identify-queries-using-system-estimate-query- acceleration) . Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Parameters 3. Output 4. Usage Notes 5. Examples Language : **English**
snowflake_docs/length_2_0.txt
Syntax ¶ LENGTH( <expression> ) LEN( <expression> ) Copy
snowflake_docs/count_if_6_0.txt
Examples ¶ The examples in this section demonstrate how to use the ` COUNT_IF ` function. The following statements set up a table for use in the examples: > > CREATE TABLE basic_example (i_col INTEGER, j_col INTEGER); > INSERT INTO basic_example VALUES > (11,101), (11,102), (11,NULL), (12,101), (NUL...
snowflake_docs/getdate_1_0.txt
GETDATE ¶ Returns the current timestamp for the system in the local time zone.
snowflake_docs/extract_answer-snowflake-cortex_3_0.txt
Syntax ¶ SNOWFLAKE.CORTEX.EXTRACT_ANSWER( <source_document>, <question>) Copy
snowflake_docs/pipes_1_0.txt
PIPES View ¶ This Account Usage view displays a row for each pipe defined in the account.
snowflake_docs/percent_rank_2_0.txt
Syntax ¶ PERCENT_RANK() OVER ( [ PARTITION BY <expr1> ] ORDER BY <expr2> [ { ASC | DESC } ] [ <cumulativeRangeFrame> ] ) Copy Where: > > cumulativeRangeFrame ::= > { > RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW > | RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING > ...
snowflake_docs/to_time_6_0.txt
Usage Notes ¶ * If the format of the input parameter is a string that contains an integer, the unit of measurement for the value (seconds, microseconds, milliseconds, or nanoseconds) is determined as follows: > * After the string is converted to an integer, the integer is treated as a > number of seconds, milli...
snowflake_docs/show-models_3_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/array_intersection_5_0.txt
Usage Notes ¶ * When comparing data of type ` OBJECT ` , the objects must be identical to be considered matching. For details, see Examples (in this topic). * The difference between ` ARRAY_INTERSECTION ` and the related ` ARRAYS_OVERLAP ` function is that the ` ARRAYS_OVERLAP ` function simply returns ` ...
snowflake_docs/square_1_0.txt
SQUARE ¶ Returns the square of a numeric expression (i.e. a numeric expression multiplied by itself).
snowflake_docs/sinh_2_0.txt
Syntax ¶ SINH( <real_expr> ) Copy
snowflake_docs/covar_pop_1_0.txt
COVAR_POP ¶ Returns the population covariance for non-null pairs in a group. It is computed for non-null pairs using the following formula: > ` (SUM(x*y) - SUM(x) * SUM(y) / COUNT(*)) / COUNT(*) ` Where ` x ` is the independent variable and ` y ` is the dependent variable. See also:
snowflake_docs/create-iceberg-table_20_0.txt
Examples ¶ **Create an Iceberg table with Snowflake as the catalog** This example creates an Iceberg table with Snowflake as the Iceberg catalog. The resulting table is managed by Snowflake and supports read and write access. The statement specifies a value for the ` BASE_LOCATION ` parameter. This tells Snowflake ...
snowflake_docs/nvl2_4_0.txt
Usage Notes ¶ * All three expressions should have the same (or compatible) data type.
snowflake_docs/hll_export_2_0.txt
Syntax ¶ HLL_EXPORT( <binary_expr> ) Copy
snowflake_docs/uniform_6_0.txt
Examples ¶ SELECT uniform(1, 10, random()) FROM table(generator(rowCount => 5)); --------------------------+ uniform(1, 10, random()) | --------------------------+ 6 | 4 | 7 | 9 | 4 ...
snowflake_docs/approx_top_k_estimate_4_0.txt
Returns ¶ Returns a value of type ` ARRAY ` .
snowflake_docs/create-file-format_9_0.txt
TYPE = ORC ¶ ` TRIM_SPACE = TRUE | FALSE ` Use : Data loading and external tables Definition : Boolean that specifies whether to remove leading and trailing white space from strings. For example, if your external database software encloses fields in quotes, but inserts a leading space, Snowflake reads the lea...
snowflake_docs/st_asgeojson_2_0.txt
Syntax ¶ ST_ASGEOJSON( <geography_or_geometry_expression> ) Copy
snowflake_docs/tags_2_0.txt
Columns ¶ Column Name | Data Type | Description ---|---|--- TAG_ID | NUMBER | The local identifier of a tag. TAG_NAME | TEXT | The name of a tag. TAG_SCHEMA_ID | NUMBER | The local identifier of the tag schema. TAG_SCHEMA | TEXT | The name of schema in which the tag exists. TAG_DATABASE_ID | NUMBER | The...
snowflake_docs/current_date_0_0.txt
/ 1. General 14. Session 29. Session Object 41. Alert context) CURRENT_DATE Categories:
snowflake_docs/current_date_4_0.txt
Arguments ¶ None.
snowflake_docs/operators-subquery_10_0.txt
[ NOT ] IN ¶ The IN and NOT IN operators check if an expression is included or not included in the values returned by a subquery.
snowflake_docs/alter-alert_2_0.txt
Syntax ¶ ALTER ALERT [ IF EXISTS ] <name> { RESUME | SUSPEND }; ALTER ALERT [ IF EXISTS ] <name> SET [ WAREHOUSE = <string> ] [ SCHEDULE = '{ <number> MINUTE | USING CRON <expr> <time_zone> }' ] [ COMMENT = '<string_literal>' ] ALTER ALERT [ IF EXISTS ] <name> SET TAG <tag_name> = '<tag...
snowflake_docs/forecast_1_0.txt
FORECAST ¶ _Fully-qualified name:_ SNOWFLAKE.ML.FORECAST A forecast model produces a forecast for a single time series or for multiple time series. You use CREATE SNOWFLAKE.ML.FORECAST to create and train the forecasting model, then use the model’s <name>!FORECAST method to produce forecasts. The <name>!EXPLAIN...
snowflake_docs/system_external_table_pipe_status_5_0.txt
Output ¶ The function returns a JSON object containing the following name/value pairs (if applicable to the current pipe status): > > {“executionState”:”<value>”,”oldestPendingFilePath”:”<value>”,”oldestFileTimestamp”:<value>,”pendingFileCount”:<value>,”lastPipeFaultTimestamp”:”<value>”,”notificationChannelName”:”<v...