id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/show-masking-policies_6_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/rate_sheet_daily_0_0.txt
/ 24. Legacy Views Schema:
snowflake_docs/stage_directory_file_registration_history_6_0.txt
Examples ¶ Retrieve the metadata stored for all data files referenced by the ` mystage ` stage: > > SELECT * > FROM > TABLE(information_schema.stage_directory_file_registration_history( > STAGE_NAME=>'MYSTAGE')); > > > Copy Retrieve the registration events for the directory table on the ` mydb.pub...
snowflake_docs/show-image-repositories_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/alter-secret_11_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/st_geogpointfromgeohash_4_0.txt
Returns ¶ geospatial.html
snowflake_docs/timestampadd_2_0.txt
Syntax ¶ TIMESTAMPADD( <date_or_time_part> , <time_value> , <date_or_time_expr> ) Copy
snowflake_docs/st_xmax_3_0.txt
Arguments ¶ ` _ geography_or_geometry_expression _ ` The argument must be an expression of type GEOGRAPHY or GEOMETRY.
snowflake_docs/as_array_3_0.txt
Arguments ¶ ` _ variant_expr _ ` An expression that evaluates to a value of type VARIANT.
snowflake_docs/functions-all_8_0.txt
label-data-types-geography) object). | | Returns an ARRAY of hexadecimal IDs (as VARCHAR values) identifying the geospatial-h3) cells that completely cover a shape (specified by a [ GEOGRAPHY | | types-geospatial-h3) cell. | | data-types-geospatial-h3) cells that are within the k-distance from the specified cell. | | d...
snowflake_docs/st_endpoint_7_0.txt
GEOGRAPHY Examples ¶ The following query returns the last Point in a LineString: ALTER SESSION SET GEOGRAPHY_OUTPUT_FORMAT='WKT'; SELECT ST_ENDPOINT(TO_GEOGRAPHY('LINESTRING(1 1, 2 2, 3 3, 4 4)')); +-------------------------------------------------------------+ | ST_ENDPOINT(TO_GEOGRAPHY('LINESTRING(...
snowflake_docs/aggregate_query_history_0_0.txt
/ Schema:
snowflake_docs/minhash_combine_4_0.txt
Examples ¶ USE SCHEMA snowflake_sample_data.tpch_sf1; SELECT MINHASH_COMBINE(mh) FROM ( (SELECT MINHASH(5, c2) mh FROM orders WHERE c2 <= 10000) UNION (SELECT MINHASH(5, c2) mh FROM orders WHERE c2 > 10000 AND c2 <= 20000) UNION (SELECT MINHASH(5,...
snowflake_docs/array_contains_1_0.txt
ARRAY_CONTAINS ¶ Returns TRUE if the specified value is found in the specified ARRAY.
snowflake_docs/alter-security-integration-saml2_10_0.txt
Examples ¶ * The following example initiates operation of a suspended integration: ALTER SECURITY INTEGRATION myint SET ENABLED = TRUE; Copy * The following example rotates the private key and generates a new self-signed certificate for a SAML2 security integration named ` my_idp ` : Caution After run...
snowflake_docs/sql-all_7_0.txt
label-access-control-considerations-database-roles) or replace an existing database role in the system. | specified query. | setting-up) that captures events, including logged messages from functions and procedures. integration) | network-access/creating-using-external-network-access) for access to external netwo...
snowflake_docs/repeat_4_0.txt
Examples ¶ SELECT REPEAT('xy', 5); -----------------+ REPEAT('XY', 5) | -----------------+ xyxyxyxyxy | -----------------+ Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Arguments 3. Examples Language : **English**
snowflake_docs/st_x_1_0.txt
ST_X ¶ Returns the longitude (X coordinate) of a Point represented by a [ GEOGRAPHY
snowflake_docs/split_part_6_0.txt
label-manage-bcr-enable-bundle) . To enable this bundle in your account, execute the following statement: SELECT SYSTEM$ENABLE_BEHAVIOR_CHANGE_BUNDLE('2024_02'); Copy
snowflake_docs/st_y_6_0.txt
Examples ¶
snowflake_docs/st_perimeter_7_0.txt
GEOGRAPHY Examples ¶ This calculates the length of the perimeter of a polygon that is one degree of arc on each edge and has one edge on the equator: > > SELECT ST_PERIMETER(TO_GEOGRAPHY('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))')); > +------------------------------------------------------------------+ > | ST_...
snowflake_docs/width_bucket_4_0.txt
Example ¶ Create a four-bucket histogram on the ` price ` column for homes sold in the price range of $200 - 600k, ordered by sales date. The function returns the bucket number ( ` SALES GROUP ` ) for each value in the set. > Create and fill a table: > >> >> CREATE TABLE home_sales ( >> sale_date DATE...
snowflake_docs/array_to_string_5_0.txt
Usage Notes ¶ * A NULL argument returns NULL as a result. * To include a blank space between values, the ` _ separator_string _ ` must include both the separator character and the blank space (e.g. ` ', ' ` ). Seem the example(s) below.
snowflake_docs/drop-connection_4_0.txt
Usage Notes ¶ * Only account administrators (users with the ACCOUNTADMIN role) can execute this SQL command. * A primary connection cannot be dropped if it has one or more secondary connections. To drop the primary connection, first promote a secondary connection to serve as the primary connection, and then dro...
snowflake_docs/st_ymax_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_YMAX Categories:
snowflake_docs/get_query_operator_stats_15_0.txt
OPERATOR_ATTRIBUTES ¶ Each output row describes one operator in the query. The table below shows the possible types of operators (e.g. the Filter operator). For each type of operator, the table shows the possible attributes (e.g. the expression used to filter the rows). The operator attributes are stored in the ` OP...
snowflake_docs/to_json_2_0.txt
Syntax ¶ TO_JSON( <expr> ) Copy
snowflake_docs/create-function_4_0.txt
JavaScript Handler ¶ CREATE [ OR REPLACE ] [ { TEMP | TEMPORARY } ] [ SECURE ] FUNCTION <name> ( [ <arg_name> <arg_data_type> [ DEFAULT <default_value> ] ] [ , ... ] ) [ COPY GRANTS ] RETURNS { <result_data_type> | TABLE ( <col_name> <col_data_type> [ , ... ] ) } [ [ NOT ] NULL ] ...
snowflake_docs/indexes_2_0.txt
Columns ¶ Column Name | Data Type | Description ---|---|--- ID | NUMBER | ID of the index. NAME | TEXT | Name of the index. TABLE_ID | NUMBER | ID of the hybrid table. TABLE_NAME | TEXT | Name of the hybrid table. SCHEMA_ID | TEXT | ID of the schema to which the hybrid table belongs. SCHEMA_NAME | TEXT...
snowflake_docs/rtrim_4_0.txt
Usage Notes ¶ * The characters in ` _ characters _ ` can be specified in any order. * To remove whitespace, the characters must be explicitly included in the argument. For example, ` ' $.' ` removes all leading blank spaces, dollar signs, and periods from the input string. Note that this does not remove oth...
snowflake_docs/data-types-geospatial_31_0.txt
Conversion and Constructor Functions Handle Validation Differently ¶ When the input data is invalid, the GEOMETRY and GEOGRAPHY functions handle validation in different ways: If the function is successful in repairing the shape, the function returns a GEOGRAPHY object.
snowflake_docs/base64_decode_string_3_0.txt
Arguments ¶ **Required:** ` _ input _ ` A Base64-encoded string expression. **Optional:** ` _ alphabet _ ` A string consisting of up to three ASCII characters: * The first two characters in the string specify the last two characters (indexes 62 and 63) in the alphabet used to encode the input: * ` A ` to `...
snowflake_docs/call-with_0_0.txt
/ 1. User Defined Function 7. External Function 13. Stored Procedure 21. Snowflake Scripting function) CALL WITH
snowflake_docs/check_xml_3_0.txt
Arguments ¶ **Required:** ` _ string_containing_xml _ ` . OR . ` STR => _ string_containing_xml _ ` This expression should evaluate to a VARCHAR. The VARCHAR should contain valid XML. **Optional:** ` _ disable_auto_convert _ ` . OR . ` DISABLE_AUTO_CONVERT => _ disable_auto_convert _ ` function. Default:...
snowflake_docs/show-resource-monitors_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/execute-service_1_0.txt
EXECUTE SERVICE ¶ Support for this feature is currently not in production and is available only to selected accounts. Contact your Snowflake representative for more information. Important The Snowpark Container Services job feature is currently in private preview and is subject to Preview Terms at [ https://snowflak...
snowflake_docs/drop-database_0_0.txt
/ 1. Database 9. Schema 17. Share database) DROP DATABASE
snowflake_docs/array_sort_7_1.txt
| | 20, | | 10, | | 0, | | undefined ...
snowflake_docs/undrop-external-volume_6_0.txt
Examples ¶ Restore the most recent version of a dropped external volume named ` my_external_volume ` : UNDROP EXTERNAL VOLUME my_external_volume; 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 Language ...
snowflake_docs/forecast_13_0.txt
DROP SNOWFLAKE.ML.FORECAST ¶ Removes the specified model from the current or specified schema. Dropped models cannot be recovered; they must be recreated.
snowflake_docs/check_json_3_0.txt
Arguments ¶ ` _ string_or_variant_expr _ ` A ` VARIANT ` or string value (or expression) to check. If the expression is of type ` VARIANT ` , it should contain a string.
snowflake_docs/snowflake-db-roles_13_0.txt
Using SNOWFLAKE Database Roles ¶ to assign a SNOWFLAKE database role to another role, which can then be granted to a user. This would allow the user to access a specific subset of views in the SNOWFLAKE database. In this following example a role is created which can be used to view SNOWFLAKE database object metadata...
snowflake_docs/h3_latlng_to_cell_string_1_0.txt
H3_LATLNG_TO_CELL_STRING ¶ geospatial-h3) cell ID in hexadecimal format (as a VARCHAR value) for a given latitude, longitude, and resolution. See also:
snowflake_docs/cast_0_0.txt
/ 1. Any Data Type 4. Text, Character, Binary Data Types 9. Numeric Data Types 18. Boolean Data Types 21. Date and Time Data Types 36. Semi-Structured Data Types 40. Geospatial Data Types conversion) CAST, :: Categories:
snowflake_docs/parse_url_1_0.txt
PARSE_URL ¶ Returns a JSON object consisting of all the components (fragment, host, path, port, query, scheme) in a valid input URL/URI.
snowflake_docs/xmlget_1_0.txt
XMLGET ¶ Enabled for all accounts. Extracts an XML element object (often referred to as simply a _tag_ ) from the content of the outer XML element based on the name and instance number of the specified tag. (Note that an XML tag is not the same as a Snowflake [ data governance tag * If any argument of XMLGET is NU...
snowflake_docs/drop-table_2_0.txt
Syntax ¶ DROP TABLE [ IF EXISTS ] <name> [ CASCADE | RESTRICT ] Copy
snowflake_docs/time_slice_5_0.txt
Usage Notes ¶ * All slices are aligned relative to midnight January 1, 1970 (1970-01-01 00:00:00). Most slices start on an integer multiple of the slice length relative to January 1, 1970. For example, if you choose a slice length of 15 years, then each slice will start on one of the following boundaries: * J...
snowflake_docs/revoke-privilege_0_0.txt
/ 1. User Management 7. Database Role Management 16. Account-level Role Management 25. Privilege Management REVOKE <privileges> ... FROM ROLE
snowflake_docs/create-security-integration-saml2_11_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/typeof_6_0.txt
Usage Notes ¶ * The returned string might be DECIMAL even if the input is an exact integer, due to optimizations that change the physical storage type of the input.
snowflake_docs/system_show_oauth_client_secrets_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$SHOW_OAUTH_CLIENT_SECRETS Categories:
snowflake_docs/complete-snowflake-cortex_9_0.txt
Access Control ¶ Users must use a role that has been granted the [ SNOWFLAKE.CORTEX_USER functions.html
snowflake_docs/json_extract_path_text_5_0.txt
Usage Notes ¶ * The function returns NULL if the path name does not correspond to any element. * The path name syntax is standard JavaScript notation; it consists of a concatenation of field names (identifiers) preceded by periods (e.g. ` . ` ) and index operators (e.g. ` [<index>] ` ): * The first field...
snowflake_docs/functions-analytic_14_0.txt
Window Frame Syntax and Usage ¶
snowflake_docs/regr_avgx_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/count_if_5_0.txt
Usage Notes ¶ * When this function is called as a window function: > * If an ORDER BY sub-clause is used inside the OVER() clause, then a > window frame must be used. If no window frame is specified, then the default > is a cumulative window frame: > >> ` RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT RO...
snowflake_docs/create-database_9_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/max_by_3_0.txt
Arguments ¶ **Required:** ` _ col_to_return _ ` Column containing the value to return. ` _ col_containing_maximum _ ` Column containing the maximum value. **Optional:** ` _ maximum_number_of_values_to_return _ ` Constant integer specifying the maximum number of values to return. You must specify a positive number...
snowflake_docs/alter-table_11_0.txt
Search Optimization Actions ( ` searchOptimizationAction ` ) ¶ ` ADD SEARCH OPTIMIZATION ` for the entire table or, if you specify the optional ON clause, for specific columns. Note: * If you try to add search optimization on a materialized view, Snowflake returns an error message. ` ON _ search_method_with_...
snowflake_docs/functions-conversion_5_0.txt
Date and Time Formats in Conversion Functions ¶ The following functions allow you to specify the expected date, time, or timestamp format to parse or produce a string: You specify the format in an optional argument, using the following case- insensitive elements to describe the format: Format Element | Description ...
snowflake_docs/hybrid_tables_3_0.txt
Usage Notes ¶ * The view only displays objects for which the current role for the session has been granted access privileges. The view does not honor the MANAGE GRANTS privilege and consequently may show less information compared to a SHOW command when both are executed with a role that was granted the MANAGE GRAN...
snowflake_docs/create-security-integration-oauth-snowflake_9_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/st_symdifference_3_0.txt
Arguments ¶ ` _ geography_expression_1 _ ` A GEOGRAPHY object. ` _ geography_expression_2 _ ` A GEOGRAPHY object.
snowflake_docs/array_compact_5_0.txt
Examples ¶ This example shows how to use ` ARRAY_COMPACT() ` : > Create a simple table and data: > >> >> CREATE TABLE array_demo (ID INTEGER, array1 ARRAY, array2 ARRAY); >> >> >> Copy >> >> >> INSERT INTO array_demo (ID, array1, array2) >> SELECT 2, ARRAY_CONSTRUCT(10, NULL, 30), ARRAY_CONSTR...
snowflake_docs/drop-model_2_0.txt
Syntax ¶ DROP MODEL <name> Copy
snowflake_docs/alter-tag_7_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/create-network-policy_8_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/get_presigned_url_9_0.txt
Loading metadata for an image file and retrieving the pre-signed URL ¶ Use the API for your cloud storage service to generate a list of JSON documents that contain the metadata extracted from the images. For example, suppose the JSON document for one bitmap image file is as follows: { "file_url": "s3://pho...
snowflake_docs/identifiers-syntax_9_0.txt
Impact of changing the parameter ¶ identifiers-ignore-case) session parameter only affects new objects and queries: * With the default setting of FALSE, if an object is created using a double-quoted identifier with mixed case, Snowflake stores the identifier in mixed case. * If the parameter is later changed ...
snowflake_docs/alter-external-access-integration_3_0.txt
Parameters ¶ ` _ name _ ` Identifier for the external access integration to alter. 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. ` SET ... ` Specifies the properties to set for the integr...
snowflake_docs/copy-into-table_9_0.txt
TYPE = JSON ¶ ` COMPRESSION = AUTO | GZIP | BZ2 | BROTLI | ZSTD | DEFLATE | RAW_DEFLATE | NONE ` String (constant) that specifies the current compression algorithm for the data files to be loaded. Snowflake uses this option to detect how already- compressed data files were compressed so that the co...
snowflake_docs/classes_1_0.txt
CLASSES View ¶ classes) in the account.
snowflake_docs/st_makeline_8_0.txt
GEOMETRY Examples ¶ The examples in this section display output in WKT format: > > ALTER SESSION SET GEOMETRY_OUTPUT_FORMAT='WKT'; > > > Copy The first example constructs a line between two Points: > > SELECT ST_MAKELINE( > TO_GEOMETRY('POINT(1.0 2.0)'), > TO_GEOMETRY('POINT(3.5 4.5)')) AS line...
snowflake_docs/use_1_0.txt
USE _ <object> _ ¶ Specifies the role, warehouse, database, or schema to use for the current session: * The role for a session determines the objects that can be accessed in queries and other SQL statements executed in the session. * A warehouse is required for a session to execute queries and other DML statem...
snowflake_docs/regr_valy_2_0.txt
Syntax ¶ REGR_VALY( <y> , <x> ) Copy
snowflake_docs/flatten_6_1.txt
[ | > | | | | | | 77, | > | | | | | | 88 | > | | | | | | ], | > | | | | | | "c": { | > | | | | | | "d": "X...
snowflake_docs/create-procedure_16_0.txt
Java ¶ ` RUNTIME_VERSION = ' _ language_runtime_version _ ' ` The language runtime version to use. Currently, the supported versions are: * 11 ` PACKAGES = ( ' _ snowpark_package_name _ ' [, ' _ package_name _ ' ...] ) ` A comma-separated list of the names of packages deployed in Snowflake that sh...
snowflake_docs/summarize-snowflake-cortex_6_0.txt
Access Control ¶ Users must use a role that has been granted the [ SNOWFLAKE.CORTEX_USER functions.html
snowflake_docs/desc-compute-pool_7_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/jarowinkler_similarity_3_0.txt
Arguments ¶ **Required:** ` _ string_expr1 _ ` , . ` _ string_expr2 _ ` The input strings.
snowflake_docs/radians_1_0.txt
RADIANS ¶ Converts degrees to radians.
snowflake_docs/create-packages-policy_6_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- CREATE PACKAGES POLICY | Schema | 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 pri...
snowflake_docs/current_task_graphs_0_0.txt
/ 1. Data Loading 4. Data Generation 6. Data Conversion 9. ML-Powered Analysis 11. Object Modeling 13. Semi-Structured Queries 15. Query Results 17. Query Profile 19. User Login 22. Queries 26. Wareho...
snowflake_docs/pipes_2_0.txt
Columns ¶ Column Name | Data Type | Description ---|---|--- PIPE_ID | NUMBER | Internal/system-generated identifier for the pipe. PIPE_NAME | TEXT | Name of the pipe. PIPE_SCHEMA_ID | NUMBER | Internal/system-generated identifier for the schema that the pipe belongs to. PIPE_SCHEMA | TEXT | Schema that the...
snowflake_docs/system_enable_behavior_change_bundle_5_0.txt
Examples ¶ The following example enables the ` 2020_08 ` behavior change bundle for the current account. SELECT SYSTEM$ENABLE_BEHAVIOR_CHANGE_BUNDLE('2020_08'); Copy +-------------------------------------------------+ | SYSTEM$ENABLE_BEHAVIOR_CHANGE_BUNDLE('2020_08') | |-----------------------------...
snowflake_docs/desc-password-policy_3_0.txt
Syntax ¶ DESC[RIBE] PASSWORD POLICY <name> Copy
snowflake_docs/desc-network-rule_5_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/current_schema_1_0.txt
CURRENT_SCHEMA ¶ Returns the name of the schema in use by the current session. To specify a different schema for the session, execute the [ USE SCHEMA
snowflake_docs/st_asewkt_8_0.txt
GEOMETRY Examples ¶ The example below demonstrates how to use the ST_ASEWKT function. The example returns the EWKT representations of two geometries that have different SRIDs. > > CREATE OR REPLACE TABLE geometry_table (g GEOMETRY); > INSERT INTO geometry_table VALUES > ('SRID=4326;POINT(-122.35 37.55)...
snowflake_docs/create-alert_0_0.txt
/
snowflake_docs/forecast_10_0.txt
Syntax ¶ SHOW SNOWFLAKE.ML.FORECAST [ LIKE <pattern> ] [ IN { ACCOUNT | DATABASE | DATABASE <database_name> | SCHEMA | SCHEMA <schema_name> | <schema_name> } ...
snowflake_docs/create-database_10_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/system_allowlist_3_0.txt
Arguments ¶ None.
snowflake_docs/create-file-format_13_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- CREATE FILE FORMAT | Schema | OWNERSHIP | File format | A role must be granted or inherit the OWNERSHIP privilege on the object to create a temporary object that has the same name as the object that already exists in th...
snowflake_docs/drop-function_0_0.txt
/ 1. User Defined Function 7. External Function 13. Stored Procedure 21. Snowflake Scripting function) DROP FUNCTION
snowflake_docs/system_get_tag_allowed_values_2_0.txt
Syntax ¶ SYSTEM$GET_TAG_ALLOWED_VALUES('<name>') Copy
snowflake_docs/desc-stage_4_0.txt
Usage notes ¶
snowflake_docs/tag_references_with_lineage_4_0.txt
Usage notes ¶ * Results are only returned for the role that has access to the specified object. intro.html
snowflake_docs/tag_references_all_columns_1_0.txt
TAG_REFERENCES_ALL_COLUMNS ¶ Returns a table in which each row displays the tag name and tag value assigned to a specific column. This function returns every tag set on every column in a given table or view, whether the tag is directly assigned to a column or through tag lineage.