id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/desc-projection-policy_0_0.txt
/ 1. Aggregation Policy 7. Projection Policy POLICY
snowflake_docs/as_integer_1_0.txt
AS_INTEGER ¶ Casts a VARIANT value to an integer. Does not match non-integer values. See also:
snowflake_docs/create-event-table_6_0.txt
Examples ¶ Create an event table named ` my_events ` : > > CREATE EVENT TABLE my_events; > > > Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Required Parameters 3. Optional Parameters 4. Usage Notes 5. Examples Related content Language : **English*...
snowflake_docs/alter-external-table_12_0.txt
Add or remove files manually ¶ Add an explicit list of files to the external table metadata: ALTER EXTERNAL TABLE exttable1 ADD FILES ('path1/sales4.json.gz', 'path1/sales5.json.gz'); Copy Remove an explicit list of files from the external table metadata: ALTER EXTERNAL TABLE exttable1 REMOVE FILES ('path1/s...
snowflake_docs/storage_usage_3_0.txt
Usage Notes ¶ * Latency for the view may be up to 120 minutes (2 hours). Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Columns 2. Usage Notes Language : **English**
snowflake_docs/show-functions_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/system_get_privatelink_3_0.txt
Arguments ¶ ` ' _ aws_id _ ' ` The 12-digit identifier that uniquely identifies your Amazon Web Services (AWS) account, as a string. ` ' _ private-endpoint-resource-id _ ' ` The identifier that uniquely identifies the private endpoint in Microsoft Azure (Azure) as a string. ` ' _ federated_token _ ' ` The f...
snowflake_docs/snowpark_container_services_history_1_0.txt
SNOWPARK_CONTAINER_SERVICES_HISTORY View ¶ The SNOWPARK_CONTAINER_SERVICES_HISTORY view in the ACCOUNT_USAGE schema can container-services/working-with-compute-pool) credit usage for an account within the last 365 days (1 year).
snowflake_docs/h3_grid_distance_4_0.txt
Returns ¶ Returns the INTEGER value representing the distance in grid cells betweeen the two H3 cells.
snowflake_docs/get_notification_email_3_0.txt
Returns ¶ * An email address or comma-separated list of email addresses. * An empty string if the notification email address is not set.
snowflake_docs/unpivot_1_0.txt
UNPIVOT ¶ Rotates a table by transforming columns into rows. UNPIVOT is a relational operator that accepts two columns (from a table or subquery), along with a list of columns, and generates a row for each column specified in the list. In subquery. Note that UNPIVOT is not exactly the reverse of PIVOT as it cannot u...
snowflake_docs/desc-aggregation-policy_5_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have at control-overview.html
snowflake_docs/create-file-format_15_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/map_size_4_0.txt
Returns ¶ Returns the number of entries in the map.
snowflake_docs/percent_rank_1_0.txt
PERCENT_RANK ¶ Returns the relative rank of a value within a group of values, specified as a percentage ranging from 0.0 to 1.0.
snowflake_docs/show-session-policies_2_0.txt
label-session-policy-ddl-reference)
snowflake_docs/data-types-structured_54_0.txt
Using the SHOW COLUMNS Command to View Structured Type Information ¶ data_type ` column includes information about the types of elements, keys, and values.
snowflake_docs/st_aswkt_7_0.txt
GEOGRAPHY Examples ¶ The following example demonstrates the ST_ASWKT function: > > create table geospatial_table (id INTEGER, g GEOGRAPHY); > insert into geospatial_table values > (1, 'POINT(-122.35 37.55)'), (2, 'LINESTRING(-124.20 42.00, -120.01 > 41.99)'); > > > Copy > > > select st_aste...
snowflake_docs/system_get_job_status_7_0.txt
Examples ¶ The following function retrieves the status of the specified job: SELECT SYSTEM$GET_JOB_STATUS('01acc9da-0000-60e8-0000-0e9900201012'); Copy Sample output: [ { "status":"DONE", "message":"Container finished", "containerName":"main", "instanceId":"0", ...
snowflake_docs/create-authentication-policy_6_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- CREATE AUTHENTICATION POLICY | Schema | Only the SECURITYADMIN role, or a higher role, has this privilege by default. The privilege can be granted to additional roles as needed. Note that operating on any object in a sc...
snowflake_docs/case_3_0.txt
Usage Notes ¶ * If more than one branch of the ` CASE ` would match the expression, only the first is used.
snowflake_docs/sin_4_0.txt
Examples ¶ > > SELECT SIN(0), SIN(PI()/3), SIN(RADIANS(90)); > --------+--------------+------------------+ > SIN(0) | SIN(PI()/3) | SIN(RADIANS(90)) | > --------+--------------+------------------+ > 0 | 0.8660254038 | 1 | > --------+--------------+------------------+ > ...
snowflake_docs/alter-failover-group_16_0.txt
label-stage-pipe-load-history-replication-requirements) . ` ADD _ db_name _ [ , _ db_name _ , ... ] TO ALLOWED_DATABASES ` Specifies a comma-separated list of additional databases to enable for replication and failover. To add databases, DATABASES must be included in the list of specified object types. If the...
snowflake_docs/drop-custom-classifier_10_0.txt
label-access-control-securable-objects) , see [ Overview .
snowflake_docs/bitxor_1_0.txt
BITXOR ¶ Returns the bitwise XOR of two numeric expressions. Aliases: BIT_XOR See also:
snowflake_docs/alter-application-role_0_0.txt
/ 1. APPLICATION 7. APPLICATION PACKAGE 12. APPLICATION ROLE 19. Additional Commands ALTER APPLICATION ROLE
snowflake_docs/parameters_15_0.txt
AUTOCOMMIT ¶ Type : Session — Can be set for Account » User » Session Data Type : Boolean Description : Specifies whether autocommit is enabled for the session. Autocommit determines whether a DML statement, when executed without an active transaction, is automatically committed after the statement successfully c...
snowflake_docs/show-materialized-views_7_0.txt
Examples ¶ Show all materialized views: > > SHOW MATERIALIZED VIEWS; > > > Copy Show only materialized views with names matching the specified regular expression: > > SHOW MATERIALIZED VIEWS LIKE 'mv1%'; > > > +-------------------------------+------+----------+---------------+-------------+------------+-...
snowflake_docs/copy-files_11_0.txt
Examples ¶
snowflake_docs/kurtosis_5_0.txt
Usage Notes ¶ * For inputs with fewer than four records, KURTOSIS returns NULL. * When used as a window function, this function does not support: * ORDER BY sub-clause in the OVER() clause. * Window frames.
snowflake_docs/constraints-drop_3_0.txt
Dropping Columns ¶ Dropping columns using ALTER TABLE … DROP COLUMN … behaves similarly to dropping constraints: > > ALTER TABLE <table_name> DROP COLUMN <name> [ CASCADE | RESTRICT ] > > > Copy The default drop option is CASCADE, which means any constraint that contains the column being dropped is also droppe...
snowflake_docs/alter-iceberg-table_4_0.txt
Clustering actions ( ` clusteringAction ` ) ¶ Note Clustering is only supported for tables that use Snowflake as the Iceberg catalog. ` CLUSTER BY ( _ expr _ [ , _ expr _ , ... ] ) ` Specifies (or modifies) one or more table columns or column expressions as the clustering key for the table. These are the...
snowflake_docs/alter-packages-policy_1_0.txt
ALTER PACKAGES POLICY ¶ guide/udf/python/packages-policy) . Any changes made to the packages policy properties go into effect when the next SQL query that uses the packages policy runs.
snowflake_docs/desc-catalog-integration_2_0.txt
label-tables-iceberg-catalog-integration-def) . DESCRIBE can be abbreviated to DESC. See also:
snowflake_docs/system_show_oauth_client_secrets_3_0.txt
Arguments ¶ ` _ integration_name _ ` Name of the integration. Note that the integration name is case-sensitive and must be uppercase and enclosed in single quotes.
snowflake_docs/last_successful_scheduled_time_2_0.txt
label-alerts-history) , these are the alerts with the STATE CONDITION_FALSE or TRIGGERED.) Refer to [ Specifying Timestamps Based on Alert
snowflake_docs/uniform_5_0.txt
Usage Notes ¶ function. Both functions generate uniform distributions, but there are differences in the ranges of the values returned. * ` RANDOM ` generates pseudo-random 64-bit integers. It accepts an optional seed that allows sequences to be repeated. * ` UNIFORM ` generates random integer or floating-poin...
snowflake_docs/drop-session-policy_8_0.txt
label-access-control-securable-objects) , see [ Overview of For additional details on session policy DDL and privileges, see [ Managing policy-mgmt) .
snowflake_docs/create-hybrid-table_1_0.txt
CREATE HYBRID TABLE ¶ Currently available only to accounts in select AWS regions, excluding trial guide/tables-hybrid-limitations.html
snowflake_docs/ltrim_3_0.txt
Arguments ¶ ` _ expr _ ` The string expression to be trimmed. ` _ characters _ ` One or more characters to remove from the left side of ` _ expr _ ` . The default value is ` ' ' ` (a single blank space character), i.e. if no characters are specified, only blank spaces are removed.
snowflake_docs/copy-into-location_23_0.txt
000000955 > | 0 | sly final accounts boost. carefully regular ideas cajole carefully. > depos | > 4 | 136777 | O | 32151.78 | 1995-10-11 | 5-LOW | Clerk
snowflake_docs/create-application-package_7_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/undrop-iceberg-table_2_0.txt
Syntax ¶ UNDROP ICEBERG TABLE <name> Copy
snowflake_docs/skew_3_0.txt
Arguments ¶ ` _ expr _ ` This is an expression that evaluates to a numeric data type (INTEGER, FLOAT, DECIMAL, etc.).
snowflake_docs/grouping_id_3_0.txt
Usage Notes ¶ GROUPING_ID is not an aggregate function, but rather a utility function that can be used alongside aggregation, to determine the level of aggregation a row was generated for: * GROUPING_ID( ` _ expr _ ` ) returns 0 for a row that is grouped on ` _ expr _ ` , and 1 for a row that is not grouped on `...
snowflake_docs/copy-into-location_12_0.txt
Examples ¶
snowflake_docs/show-session-policies_5_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- APPLY SESSION POLICY | Account | OWNERSHIP | Session policy | OWNERSHIP is a special privilege on an object that is automatically granted to the role that created the object, but can also be transferred using the [ role...
snowflake_docs/alter-compute-pool_2_0.txt
Syntax ¶ ALTER COMPUTE POOL [ IF EXISTS ] <name> { SUSPEND | RESUME } ALTER COMPUTE POOL [ IF EXISTS ] <name> STOP ALL; ALTER COMPUTE POOL [ IF EXISTS ] <name> SET [ MIN_NODES = <num> ] [ MAX_NODES = <num> ] [...
snowflake_docs/get_ignore_case_1_0.txt
GET_IGNORE_CASE ¶ Extracts a field value from an object; returns NULL if either of the arguments is NULL. Note matching to field names. See also:
snowflake_docs/create-packages-policy_4_0.txt
Optional Parameters ¶ ` ALLOWLIST = ( [ ' _ packageSpec _ ' ] [ , ' _ packageSpec _ ' ... ] ) ` Specifies a list of package specs that are allowed. Default: ` ('*') ` (i.e. allow all packages). ` BLOCKLIST = ( [ ' _ packageSpec _ ' ] [ , ' _ packageSpec _ ' ... ] ) ` Specifies a list o...
snowflake_docs/is_object_2_0.txt
Syntax ¶ IS_OBJECT( <variant_expr> ) Copy
snowflake_docs/drop-materialized-view_4_0.txt
Examples ¶ > > DROP MATERIALIZED VIEW mv1; > > ---------------------------+ > status | > ---------------------------+ > MV1 successfully dropped. | > ---------------------------+ > > > Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. ...
snowflake_docs/top_insights_4_0.txt
Output ¶ The function returns the following columns: Column Name | Data Type | Description ---|---|--- ` contributor ` | | ARRAY of strings that define a segment or insight from the algorithm. For example: [ "not country = canada", "length_of_vertical <= 4.5", "vertical = finance" ] Co...
snowflake_docs/is_boolean_2_0.txt
Syntax ¶ IS_BOOLEAN( <variant_expr> ) Copy
snowflake_docs/create-view_9_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/current_account_name_5_0.txt
Returns ¶ Returns the name of the current account. The data type of the returned value is ` VARCHAR ` .
snowflake_docs/drop-index_3_0.txt
Syntax ¶ DROP INDEX [ IF EXISTS ] <table_name>.<index_name> Copy
snowflake_docs/to_decimal_3_0.txt
Arguments ¶ **Required:** ` _ expr _ ` An expression of a numeric, character, or variant type. **Optional:** ` _ format _ ` The SQL format model used to parse the input ` _ expr _ ` and return. For ` _ precision _ ` The maximal number of decimal digits in the resulting number; from 1 to 38. In Snowflake, precisi...
snowflake_docs/functions-system_1_0.txt
System Functions ¶ Snowflake provides the following types of system functions: * Control functions that allow you to execute actions in the system (e.g. aborting a query). * Information functions that return information about the system (e.g. calculating the clustering depth of a table). * Information functi...
snowflake_docs/snowpipe_streaming_file_migration_history_1_0.txt
SNOWPIPE_STREAMING_FILE_MIGRATION_HISTORY view ¶ This Account Usage view can be used to query the history of data migrated into snowpipe-streaming-overview) within the last 365 days (1 year). The view displays the number of rows and bytes migrated and credits used for migration billed for your entire Snowflake accou...
snowflake_docs/show-replication-databases_4_0.txt
label-account-identifier-for-replication) for details.
snowflake_docs/as_char-varchar_4_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/split_part_3_0.txt
Arguments ¶ ` _ string _ ` Text to be split into parts. ` _ delimiter _ ` Text representing the delimiter to split by. ` _ partNumber _ ` Requested part of the split (1-based). If the value is negative, the parts are counted backward from the end of the string.
snowflake_docs/functions-regexp_9_0.txt
label-dollar-quoted-string-constants) to avoid having to escape the backslash characters in the regular expression . (If you are using [ single- constants) , you need to escape the backslashes.) The content of a dollar-quoted string constant is always interpreted literally. For example, when escaping a metacharacter...
snowflake_docs/system_cancel_all_queries_1_0.txt
SYSTEM$CANCEL_ALL_QUERIES ¶ Cancels all active/running queries in the specified session. See also:
snowflake_docs/length_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/data-types-structured_16_0.txt
Example: Casting from One Type of ARRAY to Another ¶ The following example casts an ARRAY(NUMBER) to an ARRAY(VARCHAR): SELECT CAST( CAST([1,2,3] AS ARRAY(NUMBER)) AS ARRAY(VARCHAR) ); Copy
snowflake_docs/alter-projection-policy_9_0.txt
Usage notes ¶ * Regarding metadata: Attention Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see [
snowflake_docs/create-security-integration-api-auth_8_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/create-hybrid-table_5_0.txt
Required Parameters ¶ ` _ name _ ` Specifies the identifier (i.e. name) for the table; must be unique for the schema in which the table is created. 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 d...
snowflake_docs/alter-share_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the share 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. ` ADD | REMOVE ACCOUNTS = _ consumer_account _ [ , _ consume...
snowflake_docs/snowpipe_streaming_client_history_0_0.txt
/ Schema:
snowflake_docs/show-objects_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/system_get_service_status_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$GET_SERVICE_STATUS Categories:
snowflake_docs/access_history_3_0.txt
label-object-tag-supported-objects) and MASKING POLICY | ROW ACCESS POLICY | TAG . objectId | NUMBER | The identifier for the object, which is unique within a given account and domain, defined or modified by the DDL operation. objectName | TEXT | The fully qualified name of the object defined or modified by the D...
snowflake_docs/desc-password-policy_9_0.txt
Usage notes ¶
snowflake_docs/get_ignore_case_3_0.txt
Arguments ¶ ` _ variant _ ` semistructured.html
snowflake_docs/with_11_0.txt
Examples ¶
snowflake_docs/create-replication-group_22_0.txt
Executed on Target Account ¶ Create a replication group in the target account as a replica of the replication group ` myrg ` in the source account: CREATE REPLICATION GROUP myrg AS REPLICA OF myorg.myaccount1.myrg; Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax...
snowflake_docs/data-types-geospatial_17_0.txt
Using Geospatial Data with Java UDFs ¶ Java UDFs allow the GEOGRAPHY type as an argument and as a return value. See [ type-mapping.html
snowflake_docs/create-procedure_15_0.txt
label-stored-procedure-snowscript-call-sp-return-value) , [ the returned value cannot be used because the call cannot be part of an expression values) . ` LANGUAGE _ language _ ` Specifies the language of the stored procedure code. Note that this is optional for stored procedures written with [ Snowflake Scripting Cu...
snowflake_docs/show-tasks_6_0.txt
label-replication-and-tasks) , > the role that owns the task was not found on the secondary database. > > Displays NULL if the task has never been suspended, or if the task was last suspended before the column was introduced with [ 2023_08 Bundle (Generally task_relations | Alternative for ` predecessors ` column. Sho...
snowflake_docs/desc-session-policy_2_0.txt
label-session-policy-ddl-reference)
snowflake_docs/system_get_iceberg_table_information_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$GET_ICEBERG_TABLE_INFORMATION Categories:
snowflake_docs/create-task_12_2.txt
sks. * All tasks in a task graph must have the same task owner. A single role must have the OWNERSHIP privilege on all of the tasks in the task graph. * All tasks in a task graph must exist in the same schema. * The root task must be suspended before any task is recreated (using the CREATE OR REPLACE TASK sy...
snowflake_docs/account-usage_24_0.txt
Examples: Obtain a Query Count for Every Login Event ¶ Join columns from LOGIN_HISTORY, QUERY_HISTORY, and SESSIONS to obtain a query count for each user login event. > Note > > The SESSIONS view records information starting on July 20-21, 2020, > therefore the query result will only contain overlapping information ...
snowflake_docs/alter-database-role_7_0.txt
Examples ¶ Rename database role ` dr1 ` to ` dbr2 ` in database ` d1 ` : > > ALTER DATABASE ROLE d1.dr1 RENAME TO d1.dbr2; > > > Copy Add a comment for database role ` d1.dbr2 ` : > > ALTER DATABASE ROLE d1.dbr2 SET COMMENT = 'New comment for database > role'; > > > Copy Was this page helpful? Yes N...
snowflake_docs/right_2_0.txt
Syntax ¶ RIGHT( <expr> , <length_expr> ) Copy
snowflake_docs/create-sequence_9_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/drop-share_1_0.txt
DROP SHARE ¶ enabled for all accounts Provider sharing is enabled by default for most, but not all accounts. If you encounter errors when attempting to share data with consumers, the feature may not be enabled for your account. To inquire about enabling it, please contact [ Snowflake Support Snowflake-Lodge) . syste...
snowflake_docs/alter-sequence_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 ALTER SEQUENCE
snowflake_docs/parameters_86_0.txt
SIMULATED_DATA_SHARING_CONSUMER ¶ Type : Session — Can be set for Account » User » Session Data Type : String Description : Specifies the name of a consumer account to simulate for testing/validating shared data, particularly shared secure views. When this parameter is set in a session, shared views return rows a...
snowflake_docs/warehouse_metering_history_4_0.txt
Usage Notes ¶ * Latency for the view may be up to 180 minutes (3 hours), except for the CREDITS_USED_CLOUD_SERVICES column. Latency for CREDITS_USED_CLOUD_SERVICES may be up to 6 hours. > > ALTER SESSION SET TIMEZONE = UTC; > > > Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page ...
snowflake_docs/get_service_type_usage_0_0.txt
/ 1. Commands 4. Methods
snowflake_docs/functions-regexp_7_0.txt
Specifying an Empty Pattern ¶ In most regexp functions, an empty pattern (i.e. ` '' ` ) matches nothing, not even an empty subject. which the empty pattern matches the empty subject because the pattern is implicitly anchored at both ends (i.e. ` '' ` automatically becomes ` '^$' ` ). An empty group (i.e. sub-expr...
snowflake_docs/acosh_1_0.txt
ACOSH ¶ Computes the inverse (arc) hyperbolic cosine of its input.
snowflake_docs/h3_cell_to_children_string_1_0.txt
H3_CELL_TO_CHILDREN_STRING ¶ Returns an ARRAY of the VARCHARs containing the hexadecimal IDs of the geospatial-h3) cell for a given resolution. See also:
snowflake_docs/list_3_0.txt
Syntax ¶ SELECT <custom_classifier>!LIST() Copy
snowflake_docs/create-compute-pool_8_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/alter-dynamic-table_1_0.txt
ALTER DYNAMIC TABLE ¶ Available to accounts. tables-about) . See also: