id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/columns_6_0.txt
Examples ¶ Retrieve all columns in the ` myTable ` table defined in the ` mydb ` database: USE DATABASE mydb; SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'myTable'; Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Columns 2. Usage Notes 3. Exa...
snowflake_docs/functions-system_0_0.txt
/ 1. Control 29. Information 90. Query Information
snowflake_docs/typeof_2_0.txt
label-data-type-variant) column. The type is returned as a string. See also:
snowflake_docs/drop-aggregation-policy_9_0.txt
Usage notes ¶ * Prior to dropping the aggregation policy, execute the following statement to determine if the aggregation policy is set on any tables or views. SELECT * FROM TABLE(mydb.INFORMATION_SCHEMA.POLICY_REFERENCES(POLICY_NAME=>'my_agg_policy')); Copy For more information, see [ Identify aggregatio...
snowflake_docs/drop-alert_8_0.txt
Usage Notes ¶ * An alert can be dropped by the alert owner (i.e. the role that has the OWNERSHIP privilege on the alert) or a higher role without first suspending the alert.
snowflake_docs/st_simplify_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_SIMPLIFY Categories:
snowflake_docs/create-iceberg-table_16_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- CREATE ICEBERG TABLE | Schema | CREATE EXTERNAL VOLUME | Account | Required to create a new external volume. USAGE | External Volume | Required to reference an existing external volume. CREATE INTEGRATION | Account ...
snowflake_docs/remaining_balance_daily_1_0.txt
REMAINING_BALANCE_DAILY View ¶ The REMAINING_BALANCE_DAILY view in the ORGANIZATION_USAGE schema can be used to return the daily remaining balance and on demand consumption daily for an organization. Important This topic describes the upgraded version of the REMAINING_BALANCE_DAILY view, which is designed to help wi...
snowflake_docs/as_object_4_0.txt
Usage Notes ¶
snowflake_docs/alter-dynamic-table_5_0.txt
Examples ¶ Change the lag time of a dynamic table named ` product ` to 1 hour: > > ALTER DYNAMIC TABLE product SET > TARGET_LAG = '1 hour'; > > > Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Parameters 3. Usage Notes 4. Examples Related content L...
snowflake_docs/collation_16_0.txt
Character Weights ¶ Snowflake supports the following collation specifications . * Snowflake-specific collation specifications (e.g. ` upper ` and ` lower ` ). For case-insensitive comparison operations defined by the ICU, Snowflake follows the [ Unicode Collation Algorithm (UCA) secondary weights, not the ter...
snowflake_docs/unicode_3_0.txt
Arguments ¶ ` _ input _ ` The string for which the Unicode code point for the first character in the string is returned.
snowflake_docs/functions-conversion_1_0.txt
Conversion Functions ¶ This family of functions can be used to convert an expression of any Snowflake data type to another data type.
snowflake_docs/create-clone_3_0.txt
Clone objects using Time Travel ¶ For databases, schemas, and non-temporary tables, ` CLONE ` supports an additional ` AT | BEFORE ` clause for cloning using [ Time Travel For databases and schemas, ` CLONE ` supports the IGNORE TABLES WITH INSUFFICIENT DATA RETENTION parameter to skip any tables that have been...
snowflake_docs/system_whitelist_5_0.txt
Usage Notes ¶ * The function must be called as a system function. * The output may include multiple entries for certain types (e.g. ` STAGE ` , ` OCSP_RESPONDER ` ).
snowflake_docs/md5_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-service_4_0.txt
Optional parameters ¶ ` EXTERNAL_ACCESS_INTEGRATIONS = ( _ EAI_name _ [ , ... ] ) ` guide/external-network-access/creating-using-external-network-access) that allow your service to access external sites. The names in this list are case- sensitive. By default, application containers don’t have permission to ...
snowflake_docs/try_to_decimal_5_0.txt
Usage Notes ¶ * Only works for string expressions.
snowflake_docs/show-projection-policies_0_0.txt
/ 1. Aggregation Policy 7. Projection Policy POLICIES
snowflake_docs/parameters_89_0.txt
STATEMENT_TIMEOUT_IN_SECONDS ¶ Type : Session and Object (for warehouses) Can be set for Account » User » Session; can also be set for individual warehouses Data Type : Number Description : Amount of time, in seconds, after which a running SQL statement (query, DDL, DML, etc.) is canceled by the system. The par...
snowflake_docs/create-authentication-policy_8_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/st_asewkb_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_ASEWKB Categories:
snowflake_docs/create-integration_3_0.txt
General Usage Notes ¶ * ` OR REPLACE ` and ` IF NOT EXISTS ` clauses are mutually exclusive; they cannot both be used in the same statement. * CREATE OR REPLACE _ <object> _ statements are atomic. That is, when an object is replaced, the old object is deleted and the new object is created in a single trans...
snowflake_docs/accounts_6_0.txt
label-account-locator) of the account. MANAGED_ACCOUNTS | VARCHAR | create) have been created by the account. IS_MANAGED | BOOLEAN | Indicates whether the account is a reader account. If ` true ` , the account is a reader account. PARENT_ACCOUNT | VARCHAR | For reader accounts, provides the name of the parent ac...
snowflake_docs/alter-database-role_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier (i.e. name) for the database role; must be unique in the database in which the role is created. 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 (...
snowflake_docs/create-authentication-policy_9_0.txt
Usage Notes ¶ * CREATE OR REPLACE _ <object> _ statements are atomic. That is, when an object is replaced, the old object is deleted and the new object is created in a single transaction.
snowflake_docs/functions-regexp_8_0.txt
Specifying Regular Expressions in Dollar-Quoted String Constants ¶ If you are using a string constant to specify the regular expression for a text.html
snowflake_docs/st_x_7_0.txt
GEOGRAPHY Examples ¶ This shows a simple use of the ST_X and ST_Y functions with VARCHAR data: > > SELECT ST_X(ST_MAKEPOINT(37.5, 45.5)), ST_Y(ST_MAKEPOINT(37.5, 45.5)); > +--------------------------------+--------------------------------+ > | ST_X(ST_MAKEPOINT(37.5, 45.5)) | ST_Y(ST_MAKEPOINT(37.5, 45.5...
snowflake_docs/create-external-table_21_0.txt
Examples ¶
snowflake_docs/show-external-volumes_9_0.txt
Output ¶ The command output provides table properties and metadata in the following columns: Column | Description ---|--- ` name ` | Name of the external volume. ` allow_writes ` | Signifies whether Snowflake can write files to the storage location(s). ` comment ` | Comment for the external volume.
snowflake_docs/undrop-external-volume_4_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the external volume to restore. 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. .
snowflake_docs/drop-integration_0_0.txt
/ 1. General 7. API 10. Catalog 15. External access 18. Notification 21. Security 25. Storage INTEGRATION
snowflake_docs/join-lateral_3_0.txt
Usage Notes ¶ SELECT * FROM table_reference_me, LATERAL (...), table_do_not_reference_me ... Copy * Although the inline view typically references a column(s) from the ` _ left_hand_table_expression _ ` , it is not required to do so. * Just as INNER JOIN syntax can use either the comma or the wo...
snowflake_docs/show-classes_5_0.txt
Examples ¶ Show all classes in the Snowflake database: SHOW CLASSES IN DATABASE SNOWFLAKE; +-------------------------------+-----------------------+---------------+-------------+---------+---------+-------+------------------+-----------------+ | created_on | name | dat...
snowflake_docs/continue_0_0.txt
/ snowflake-scripting) CONTINUE
snowflake_docs/variance_5_0.txt
Usage Notes ¶ * For single-record inputs, VAR_SAMP, VARIANCE, and VARIANCE_SAMP all return NULL. This is different from the Oracle behavior, where VAR_SAMP returns NULL for a single record and VARIANCE returns 0. * When passed a VARCHAR expression, this function implicitly casts the input to floating point valu...
snowflake_docs/drop-packages-policy_1_0.txt
DROP PACKAGES POLICY ¶ Removes a packages policy from the system.
snowflake_docs/st_pointn_6_0.txt
Examples ¶
snowflake_docs/functions-analytic_6_0.txt
Window Functions and NULL Values ¶ calculates the average of values ` 1 ` , ` 5 ` , and ` NULL ` to be ` 3 ` , based on the following formula: > ` (1 + 5) / 2 = 3 ` In both the numerator and the denominator, only the non-NULL values are used. If all of the values passed to the function are NULL, then the ...
snowflake_docs/add_regex_0_0.txt
/ 1. Commands 5. Methods
snowflake_docs/is_double-real_1_0.txt
IS_DOUBLE , IS_REAL ¶ Returns TRUE if its VARIANT argument contains a floating-point value, fixed- point decimal, or integer. These functions are synonymous. See also:
snowflake_docs/system_get_classification_result_3_0.txt
Arguments ¶ ` _ object_name _ ` The name of the table, external table, view, or materialized view containing the columns to be classified. If a database and schema are 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. If the name...
snowflake_docs/ilike_any_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/mod_4_0.txt
Returns ¶ Returns either an integer or a fixed-point decimal number.
snowflake_docs/create-warehouse_6_0.txt
label-query-acceleration-scale-factor) . Valid values : ` 0 ` to ` 100 ` Default : ` 8 `
snowflake_docs/create-table_3_0.txt
Variant Syntax ¶
snowflake_docs/octet_length_3_0.txt
Arguments ¶ ` _ string_or_binary _ ` The string or binary value for which the length is returned.
snowflake_docs/show-compute-pools_4_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/create-api-integration_16_0.txt
Usage Notes ¶ * Only Snowflake roles with OWNERSHIP or USAGE privileges on the API integration can use the API integration directly (e.g. by creating an external function that specifies that API integration). * An API integration object is tied to a specific cloud platform account and role within that account, ...
snowflake_docs/data-types-logical_7_0.txt
Implicit Conversion ¶ Boolean values can be implicitly converted from text string values to boolean values. String Conversion : * ‘true’ is converted to TRUE. * ‘false’ is converted to FALSE. The string values are not case-sensitive. Numeric Conversion : * Zero ( ` 0 ` ) is converted to FALSE. * Any no...
snowflake_docs/show-services_1_0.txt
SHOW SERVICES ¶ > services/overview) is available to all Snowflake accounts in AWS commercial > regions except for trial accounts. guide/snowpark-container-services/working-with-services) for which you have access privileges. See also:
snowflake_docs/index_columns_2_0.txt
Columns ¶ Column Name | Data Type | Description ---|---|--- TABLE_CATALOG | TEXT | Database to which the hybrid table belongs. TABLE_SCHEMA | TEXT | Schema to which the hybrd table belongs. TABLE_NAME | TEXT | Name of the hybrid table that the index is over. INDEX_NAME | TEXT | Name of the index on the hyb...
snowflake_docs/drop-session-policy_10_0.txt
Example ¶ DROP SESSION POLICY session_policy_production_1; Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Parameters 3. Access control requirements 4. Usage notes 5. Example Language : **English**
snowflake_docs/create-function_49_0.txt
Scala ¶ Here is a basic example of CREATE FUNCTION with an in-line handler: CREATE OR REPLACE FUNCTION echo_varchar(x VARCHAR) RETURNS VARCHAR LANGUAGE SCALA RUNTIME_VERSION = 2.12 HANDLER='Echo.echoVarchar' AS $$ class Echo { def echoVarchar(x : String): String ...
snowflake_docs/to_xml_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:
snowflake_docs/in_8_0.txt
Examples ¶
snowflake_docs/tanh_1_0.txt
TANH ¶ Computes the hyperbolic tangent of its argument.
snowflake_docs/desc-view_0_0.txt
/ 2. Table 13. Dynamic Table 19. Event Table 24. External Table 30. Hybrid Table 36. Iceberg Table 43. View 49. Materialized View 56. Sequence DESCRIBE VIEW
snowflake_docs/functions-file_1_0.txt
File Functions ¶ notes/preview-features) — Open Available to all accounts. File functions enable you to access files staged in cloud storage.
snowflake_docs/cosh_0_0.txt
/ 1. Arithmetic 4. Rounding and Truncation 13. Exponent and Root 21. Logarithmic 24. Trigonometric 42. Other numeric) COSH Categories:
snowflake_docs/array_construct_3_0.txt
Arguments ¶ The arguments are values (or expressions that evaluate to values). The arguments do not all need to be of the same data type.
snowflake_docs/create-view_10_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/show-warehouses_6_1.txt
------------+-----------+--------------+-----------+-------+-------------------------------+-------------------------------+-------------------------------+--------------+---------+---------------------------+-------------------------------------+------------------+---------+----------+--------+-----------+----------+-...
snowflake_docs/select_30_0.txt
Error Case: Specifying an Alias That Matches Another Column Name ¶ This example demonstrates why it is not recommended to use a column alias that matches the name of another column that is used in the query. This GROUP BY query results in a SQL compiler error, not an ambiguous column error. The alias ` prod_id ` th...
snowflake_docs/functions-analytic_22_0.txt
Cumulative Window Frame Examples ¶ Create and populate a table with values: CREATE OR REPLACE TABLE example_cumulative (p INT, o INT, i INT); INSERT INTO example_cumulative VALUES ( 0, 1, 10), (0, 2, 20), (0, 3, 30), (100, 1, 10),(100, 2, 30),(100, 2, 5),(100, 3, 11),(100, 3, 120), (...
snowflake_docs/create-task_0_0.txt
/ 1. Stream 7. Task
snowflake_docs/regr_sxx_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/show-shares-in-replication-group_1_0.txt
SHOW SHARES IN REPLICATION GROUP ¶ Lists shares in a replication group. See also:
snowflake_docs/system_get_privatelink_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$GET_PRIVATELINK Categories:
snowflake_docs/lag_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/from_1_0.txt
FROM ¶ Specifies the tables, views, or table functions to use in a [ SELECT See also:
snowflake_docs/external_tables_1_0.txt
EXTERNAL_TABLES View ¶ This Information Schema view displays a row for each external table in the specified (or current) database. See also:
snowflake_docs/drop-application-package_0_0.txt
/ 1. APPLICATION 7. APPLICATION PACKAGE 12. APPLICATION ROLE 19. Additional Commands DROP APPLICATION PACKAGE
snowflake_docs/system_get_tag_on_current_column_1_0.txt
SYSTEM$GET_TAG_ON_CURRENT_COLUMN ¶ Returns the tag string value assigned to the column based upon the specified tag or NULL if a tag is not assigned to the specified column. intro) conditions.
snowflake_docs/grant-privilege_12_0.txt
Examples ¶
snowflake_docs/transactions_17_0.txt
Isolation Level ¶ READ COMMITTED is the only isolation level currently supported for tables.
snowflake_docs/values_2_0.txt
Syntax ¶ SELECT ... FROM ( VALUES ( <expr> [ , <expr> [ , ... ] ] ) [ , ( ... ) ] ) [ [ AS ] <table_alias> [ ( <column_alias> [, ... ] ) ] ] [ ... ] Copy ` _ table_alias _ ` An optional alias can be used to give the set of rows a name, as though the set of rows were a table. ` _ column_alias _ ` Option...
snowflake_docs/boolxor_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/create-replication-group_17_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/show-external-volumes_10_0.txt
Examples ¶ Show all external volumes: > > SHOW EXTERNAL VOLUMES; > > > Copy Show all the external volumes whose name starts with ` aws ` that you have privileges to view: > > SHOW EXTERNAL VOLUMES LIKE 'aws%'; > > > Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Synta...
snowflake_docs/constraints-properties_3_0.txt
Properties for All Constraints ¶ The following constraint properties from the ANSI SQL standard apply to all constraints (unique, primary key, and foreign key): ` { ENFORCED | NOT ENFORCED } ` Specifies whether the constraint is enforced in a transaction. Note that ` NOT NULL ` is the only constraint enforc...
snowflake_docs/translate-snowflake-cortex_6_0.txt
Usage Notes ¶ The following languages are supported by the TRANSLATE function. Use the corresponding language code for the source and target language. Language | Code ---|--- English | ` 'en' ` French: | ` 'fr' ` German | ` 'de' ` Italian | ` 'it' ` Japanese | ` 'ja' ` Korean | ` 'ko' ` Polish ...
snowflake_docs/show-streams_6_0.txt
Examples ¶ Show all the streams whose name starts with ` line ` that you have privileges to view in the ` tpch.public ` schema: > > SHOW STREAMS LIKE 'line%' IN tpch.public; > > > Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Parameters 3. Usage Notes 4...
snowflake_docs/desc-search-optimization_6_0.txt
Usage Notes ¶
snowflake_docs/show-external-tables_2_0.txt
Syntax ¶ SHOW [ TERSE ] EXTERNAL TABLES [ LIKE '<pattern>' ] [ IN { ACCOUNT | DATABASE | ...
snowflake_docs/all_user_names_5_0.txt
Usage Notes ¶ * Users with any active role can retrieve the list of all usernames in the current account. However, simply knowing the usernames does not allow a role the ability to perform further actions on the users. User management requires a minimum set of privileges.
snowflake_docs/show-tags_5_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- USAGE | Schema | This privilege must match the schema containing the tag. APPLY TAG | Account | Note that operating on any object in a schema also requires the USAGE privilege on the parent database and schema. For in...
snowflake_docs/current_account_6_0.txt
Returns ¶ The data type of the returned value is ` VARCHAR ` .
snowflake_docs/alter-alert_13_0.txt
label-access-control-overview-privileges) at a minimum: * To resume an alert: * The role with the OWNERSHIP privilege on the alert must also have the global EXECUTE ALERT privilege. * The role executing ALTER ALERT must have either the OPERATE or OWNERSHIP privilege on the alert. * To suspend an alert, t...
snowflake_docs/copy-files_13_0.txt
Copy files using pattern matching ¶ Use pattern matching to load only compressed CSV files in any path on an existing stage ( ` src_stage ` ) to a different stage ( ` trg_stage ` ): COPY FILES INTO @trg_stage FROM @src_stage PATTERN='.*/.*/.*[.]csv[.]gz'; Copy The ` .* ` component represents...
snowflake_docs/infer_schema_6_0.txt
Examples ¶ Retrieve the column definitions for Parquet files in the ` mystage ` stage: -- Create a file format that sets the file type as Parquet. CREATE FILE FORMAT my_parquet_format TYPE = parquet; -- Query the INFER_SCHEMA function. SELECT * FROM TABLE( INFER_SCHEMA( ...
snowflake_docs/drop-catalog-integration_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the catalog integration to drop. If the identifier contains spaces, special characters, or mixed-case characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive (for example, ` "My Catalog" `...
snowflake_docs/create-stage_23_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/date-time-input-output_22_0.txt
AUTO Detection of Integer-stored Date, Time, and Timestamp Values ¶ For integers of seconds or milliseconds stored in a string, Snowflake attempts to determine the correct unit of measurement based on the length of the value. Note The use of quoted integers as inputs is deprecated. For example, to calculate the time...
snowflake_docs/snowpipe_streaming_client_history_3_0.txt
Usage notes ¶ * Latency for the view may be up to 120 minutes (2 hours).
snowflake_docs/percentile_disc_6_0.txt
Examples ¶ The following example shows the values at the 25th percentile (0.25) within various groups: > Create and populate a table with values: > >> >> create or replace table aggr(k int, v decimal(10,2)); >> insert into aggr (k, v) values >> (0, 0), >> (0, 10), >> (0, 20), >> ...
snowflake_docs/atan_4_0.txt
Returns ¶ Returns the arc tangent in radians (not degrees) in the range ` [-pi, pi] ` .
snowflake_docs/is_char-varchar_3_0.txt
Arguments ¶ ` _ variant_expr _ ` An expression that evaluates to a value of type VARIANT.
snowflake_docs/loop_1_0.txt
LOOP (Snowflake Scripting) ¶ A ` LOOP ` loop does not specify a number of iterations or a terminating guide/snowflake-scripting/loops) . Note construct is valid only within a [ Snowflake Scripting block See also :
snowflake_docs/st_intersection_2_0.txt
Syntax ¶ ST_INTERSECTION( <geography_expression_1> , <geography_expression_2> ) Copy