id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/time_slice_4_0.txt
Returns ¶ The data type of the return value is identical to the data type of the input ` _ date_or_time_expr _ ` (i.e. either TIMESTAMP_NTZ or DATE).
snowflake_docs/notification_history_2_0.txt
Syntax ¶ NOTIFICATION_HISTORY( [ START_TIME => <constant_expr> ] [, END_TIME => <constant_expr> ] [, INTEGRATION_NAME => '<string>' ] [, RESULT_LIMIT => <integer> ] ) ) Copy
snowflake_docs/array_size_3_0.txt
Returns ¶ The data type of the returned value is ` INTEGER ` .
snowflake_docs/try_decrypt_5_0.txt
Usage Notes and Examples ¶ Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Arguments 3. Returns 4. Usage Notes and Examples Language : **English**
snowflake_docs/drop-procedure_3_0.txt
Usage Notes ¶ **All Languages** For each argument defined for the procedure, the data type for the argument must be specified. This is required because overloading of procedure names is supported and the data type(s) for the argument(s) are required to identify the procedure. **Java, Python, and Scala** For procedur...
snowflake_docs/to_variant_1_0.txt
TO_VARIANT ¶ data-type-variant) value or NULL (if input is NULL).
snowflake_docs/desc-table_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 TABLE
snowflake_docs/create-external-access-integration_1_0.txt
CREATE EXTERNAL ACCESS INTEGRATION ¶ Available External access is not supported in the Gov region. network-access/creating-using-external-network-access) for access to external network locations from a UDF or procedure handler. See also:
snowflake_docs/create-external-table_17_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- CREATE EXTERNAL TABLE | Schema | CREATE STAGE | Schema | Required if creating a new stage. USAGE | Stage | Required if referencing an existing stage. USAGE | File format | Note that operating on any object in a sc...
snowflake_docs/system_get_privatelink_2_0.txt
Syntax ¶ **AWS:** > > SYSTEM$GET_PRIVATELINK( '<aws_id>' , '<federated_token>' ) > > > Copy **Azure:** > > SYSTEM$GET_PRIVATELINK( '<private-endpoint-resource-id>' , > '<federated_token>' ) > > > Copy
snowflake_docs/functions-date-time_6_0.txt
First Day of the Week ¶ Most week-related functions are controlled only by the [ WEEK_START results differ depending on how the parameter is set: Function | Param set to ` 0 ` (default / legacy behavior) | Param set to ` 1 ` \- ` 7 ` (Monday - Sunday) ---|---|--- | Returns ` 0 ` (Sunday) to ` 6 ` (Saturday)...
snowflake_docs/create-database-role_5_0.txt
Optional parameters ¶ ` COMMENT = ' _ string_literal _ ' ` Specifies a comment for the database role. Default: No value
snowflake_docs/alter-table-event-table_4_0.txt
Data Governance policy and tag actions ( ` dataGovnPolicyTagAction ` ) ¶ ` TAG _ tag_name _ = ' _ tag_value _ ' [ , _ tag_name _ = ' _ tag_value _ ' , ... ] ` string value. The tag value is always a string, and the maximum number of characters for the tag value is 256. For information about specifyi...
snowflake_docs/drop-function_5_0.txt
Examples ¶ This demonstrates the DROP FUNCTION command: > > DROP FUNCTION multiply(number, number); > > --------------------------------+ > status | > --------------------------------+ > MULTIPLY successfully dropped. | > --------------------------------+ > > > C...
snowflake_docs/get_query_operator_stats_14_0.txt
EXECUTION_TIME_BREAKDOWN ¶ The fields in the OBJECTs for the ` EXECUTION_TIME_BREAKDOWN ` column are shown below. Key | Data Type | Description ---|---|--- ` overall_percentage ` | DOUBLE | The percentage of the total query time spent by this operator. ` initialization ` | DOUBLE | Time spent setting up que...
snowflake_docs/show-objects_5_0.txt
Examples ¶ Show all tables and views whose names start with ` line ` that you have privileges to see in the ` public ` schema in the ` mydb ` database: > > SHOW OBJECTS LIKE 'line%' IN mydb.public; > > > Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Paramete...
snowflake_docs/alter-aggregation-policy_3_0.txt
Syntax ¶ ALTER AGGREGATION POLICY [ IF EXISTS ] <name> RENAME TO <new_name> ALTER AGGREGATION POLICY [ IF EXISTS ] <name> SET BODY -> <expression> ALTER AGGREGATION POLICY <name> SET TAG <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ... ] ALTER AGGREGATION POLICY <name> UNSET TAG <tag_nam...
snowflake_docs/set_spending_limit_3_0.txt
Arguments ¶ ` _ number _ ` : The number of credits allocated to the budget per month. When total usage for all objects assigned to the budget reaches this number for the current month, the budget is considered to be at 100% of the spending limit. guide/budgets.html
snowflake_docs/alter-sequence_2_0.txt
Syntax ¶ ALTER SEQUENCE [ IF EXISTS ] <name> RENAME TO <new_name> ALTER SEQUENCE [ IF EXISTS ] <name> [ SET ] [ INCREMENT [ BY ] [ = ] <sequence_interval> ] ALTER SEQUENCE [ IF EXISTS ] <name> SET [ { ORDER | NOORDER } ] [ COMMENT = '<string_literal>' ] Copy
snowflake_docs/drop-image-repository_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the repository to drop.
snowflake_docs/alter-secret_3_0.txt
OAuth with client credentials flow parameters ¶ ` _ name _ ` String that specifies the identifier (i.e. name) for the secret, must be unique in your schema. ` SET ... ` Specifies one (or more) parameters to set (separated by blank spaces, commas, or new lines). ` OAUTH_SCOPES = ( ' _ scope_1 _ ' [ , ' _ ...
snowflake_docs/alter-function_11_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/bitmap_bit_position_5_0.txt
Examples ¶ See [ Using Bitmaps to Compute Distinct Values for Hierarchical Aggregations Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Arguments 3. Returns 4. Examples Language : **English**
snowflake_docs/functions-file_2_0.txt
List of Functions ¶ Function Name | Notes ---|--- | Returns the URL for an external or internal named stage using the stage name as the input. | Extracts the path of a staged file relative to its location in the stage using the stage name and absolute file path in cloud storage as inputs. | Returns the absol...
snowflake_docs/position_2_0.txt
Syntax ¶ POSITION( <expr1>, <expr2> [ , <start_pos> ] ) POSITION( <expr1> IN <expr2> ) Copy
snowflake_docs/getdate_6_0.txt
Examples ¶ Show the current system timestamp: > > SELECT GETDATE(); > > > Copy > > > +-------------------------------+ > | GETDATE() | > |-------------------------------| > | 2024-01-08 12:50:00.756000000 | > +-------------------------------+ > Was this page helpfu...
snowflake_docs/create-database_3_0.txt
Required Parameters ¶ ` _ name _ ` Specifies the identifier for the database; 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" ` ...
snowflake_docs/create-security-integration-saml2_13_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/alter-service_5_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- OPERATE | Service | 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 privileges, confi...
snowflake_docs/regexp_substr_all_5_0.txt
Returns ¶ The function returns a value of type ARRAY. The ARRAY contains an element for each matching substring. If you specify ` _ group_num _ ` and the pattern does not specify a grouping with that number, the function returns NULL. For example, if the pattern specifies only one group (e.g. ` a(b)c ` ) and you u...
snowflake_docs/create-budget_10_0.txt
label-access-control-securable-objects) , see [ Overview .
snowflake_docs/users_3_0.txt
Usage notes ¶ * Latency for the view may be up to 120 minutes (2 hours).
snowflake_docs/show-columns_1_0.txt
SHOW COLUMNS ¶ Lists the columns in the tables or views for which you have access privileges. This command can be used to list the columns for a specified table/view/schema/database (or the current schema/database for the session), or your entire account. See also:
snowflake_docs/parameters_97_0.txt
TIMESTAMP_TYPE_MAPPING ¶ Type : Session — Can be set for Account » User » Session Data Type : String Description : Specifies the TIMESTAMP_* variation that the TIMESTAMP data type alias maps to. Values : ` TIMESTAMP_LTZ ` , ` TIMESTAMP_NTZ ` , or ` TIMESTAMP_TZ ` Default : ` TIMESTAMP_NTZ `
snowflake_docs/stages_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 by a user who holds the MANAGE GRANTS privil...
snowflake_docs/drop-projection-policy_6_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- OWNERSHIP | Projection 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 (or any role with the MANAGE GR...
snowflake_docs/h3_int_to_string_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) H3_INT_TO_STRING Categories:
snowflake_docs/create-pipe_2_0.txt
Syntax ¶ CREATE [ OR REPLACE ] PIPE [ IF NOT EXISTS ] <name> [ AUTO_INGEST = [ TRUE | FALSE ] ] [ ERROR_INTEGRATION = <integration_name> ] [ AWS_SNS_TOPIC = '<string>' ] [ INTEGRATION = '<string>' ] [ COMMENT = '<string_literal>' ] AS <copy_statement> Copy
snowflake_docs/system_create_billing_event_4_0.txt
Returns ¶ This function returns the following status messages: > Status Message > > | > > Description > > | > > Type of Value Returned > > ---|---|--- > > Success > > | > > Indicates that the billable event was successfully created. > > | > > Invalid parameter: ` <PARAM_NAME> ` . > > | > > Indicates that...
snowflake_docs/st_buffer_6_0.txt
Examples ¶ The following example returns a Polygon around a Point with a radius of one: SELECT ST_BUFFER(TO_GEOMETRY('POINT(0 0)'), 1); +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------...
snowflake_docs/show-applications_4_0.txt
Output ¶ The command output provides application object properties and metadata in the following columns: Column | Description ---|--- ` created_on ` | Date and time when the application object was created. ` name ` | The name of the application object. ` is_default ` | Specifies if the application object...
snowflake_docs/rate_sheet_daily_legacy_0_0.txt
/ 24. Legacy Views (Legacy)
snowflake_docs/regexp_substr_3_0.txt
Arguments ¶ **Required:** ` _ subject _ ` The string to search for matches. ` _ pattern _ ` Pattern to match. For guidelines on specifying patterns, see [ String Functions (Regular **Optional:** ` _ position _ ` Number of characters from the beginning of the string where the function starts searching for matches....
snowflake_docs/drop-role_1_0.txt
DROP ROLE ¶ Removes the specified role from the system. See also:
snowflake_docs/alter-alert_15_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/select_11_0.txt
Setting Up the Data for the Examples ¶ Some of the queries below use the following tables and data: > > CREATE TABLE employee_table ( > employee_ID INTEGER, > last_name VARCHAR, > first_name VARCHAR, > department_ID INTEGER > ); > > CREATE TABLE department_table ( > ...
snowflake_docs/complete-snowflake-cortex_3_0.txt
Syntax ¶ SNOWFLAKE.CORTEX.COMPLETE( <model>, <prompt_or_history> [ , <options> ] ) Copy
snowflake_docs/drop-table_5_0.txt
Examples ¶ Drop a table: > > SHOW TABLES LIKE 't2%'; > > > +---------------------------------+------+---------------+-------------+-----------+------------+------------+------+-------+--------------+----------------+ > | created_on | name | database_name | schema_name | > kind | c...
snowflake_docs/current_date_2_0.txt
Syntax ¶ CURRENT_DATE() CURRENT_DATE Copy
snowflake_docs/st_within_2_0.txt
Syntax ¶ ST_WITHIN( <geography_expression_1> , <geography_expression_2> ) ST_WITHIN( <geometry_expression_1> , <geometry_expression_2> ) Copy
snowflake_docs/system_classify_schema_7_0.txt
Examples ¶ Stage the classification of tables in the schema: > > CALL SYSTEM$CLASSIFY_SCHEMA('hr.tables', null); > > > Copy Stage the classification of the tables in the schema and specify the number of rows to sample: > > CALL SYSTEM$CLASSIFY_SCHEMA('hr.tables.empl_info', {'sample_count': > 1000}); > > ...
snowflake_docs/create-materialized-view_3_0.txt
Required Parameters ¶ ` _ name _ ` Specifies the identifier for the view; must be unique for the schema in which the view 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 double quotes (...
snowflake_docs/set_notification_mute_flag_0_0.txt
/ 1. Commands 4. Methods
snowflake_docs/system_get_job_status_6_0.txt
Usage notes ¶ Only the user who created the job can access the job status.
snowflake_docs/create-password-policy_10_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- CREATE PASSWORD 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/hybrid_table_usage_history_2_0.txt
Columns ¶ Column Name | Data Type | Description ---|---|--- OBJECT_TYPE | TEXT | Type of object referenced for scope of consumption. ` ACCOUNT ` by default for scope of consumption of hybrid tables in your account. OBJECT_ID | NUMBER | Internal identifier of object referenced for scope of consumption. ` NULL ...
snowflake_docs/concat_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/strtok_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/bit_length_2_0.txt
Syntax ¶ BIT_LENGTH(<string_or_binary>) Copy
snowflake_docs/ternary-logic_2_0.txt
Truth Tables ¶
snowflake_docs/show-databases-in-failover-group_2_0.txt
Syntax ¶ SHOW DATABASES IN FAILOVER GROUP <name> Copy
snowflake_docs/copy-into-table_25_0.txt
Purging files after loading ¶ Load files from a table’s stage into the table and purge files after loading. By default, COPY does not purge loaded files from the location. To purge the files after loading: * Set ` PURGE=TRUE ` for the table to specify that all files successfully loaded into the table are purged a...
snowflake_docs/identifier-literal_4_0.txt
Examples ¶ **String literals:** > > create or replace database identifier('my_db'); > > +--------------------------------------+ > | status | > +--------------------------------------+ > | Database MY_DB successfully created. | > +------------------------------...
snowflake_docs/regr_avgy_4_0.txt
Usage Notes ¶ * DISTINCT is not supported for this function. * In order for a row to be included in the average, BOTH the x and y values must be non-NULL. * When used as a window function: > * This function does not support: > >> * ORDER BY sub-clause in the OVER() clause. >> >> * Window fra...
snowflake_docs/localtime_0_0.txt
/ 1. General 14. Session 29. Session Object 41. Alert context) LOCALTIME Categories:
snowflake_docs/system_task_runtime_info_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$TASK_RUNTIME_INFO Categories:
snowflake_docs/drop-iceberg-table_8_0.txt
Usage notes ¶ * After a dropped table has been purged, it cannot be recovered; it must be recreated. * After dropping a table, creating a table with the same name creates a new version of the table. You can restore the dropped version of the previous table with the following steps: 1. Rename the current ve...
snowflake_docs/commands-database_1_0.txt
Database, Schema, and Share Commands ¶ Database, schema, and share commands enable you to manage your databases, schemas, and shares.
snowflake_docs/drop-secret_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the secret to drop. 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/create-iceberg-table_7_0.txt
label-create-table-copy-grants) in this document.
snowflake_docs/acosh_3_0.txt
Arguments ¶ ` _ real_expr _ ` This expression should evaluate to a ` FLOAT ` number greater than or equal to 1.0.
snowflake_docs/anomaly_detection_25_0.txt
Examples ¶ detection.html
snowflake_docs/try_hex_decode_binary_3_0.txt
Arguments ¶ ` _ input _ ` A string expression containing only hexadecimal digits. Typically, this input
snowflake_docs/desc-transaction_3_0.txt
Parameters ¶ ` _ transaction_id _ ` Specifies the identifier of the transaction to describe. ` _ transaction_id _ ` must be a literal, not a session variable.
snowflake_docs/call-with_12_1.txt
m.my_company.my_package.MyClass.myMethod Copy where: com.my_company.my_package Copy corresponds to the package containing the object or class: package com.my_company.my_package; Copy
snowflake_docs/create-packages-policy_3_0.txt
Required Parameters ¶ ` _ name _ ` Specifies the identifier (i.e. name) for the packages policy; must be unique for the schema in which the packages policy is created. In addition, the identifier must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier str...
snowflake_docs/comment_1_0.txt
COMMENT ¶ Adds a comment or overwrites an existing comment for an existing object. Comments can be added to all objects (users, roles, warehouses, databases, tables, etc.). Comments can be added to individual table columns as well.
snowflake_docs/array_distinct_2_0.txt
Syntax ¶ ARRAY_DISTINCT( <array> ) Copy
snowflake_docs/st_endpoint_1_0.txt
ST_ENDPOINT ¶ Returns the last Point in a LineString. See also:
snowflake_docs/st_pointn_4_0.txt
Returns ¶ The function returns a value of type GEOGRAPHY or GEOMETRY that contains the Point at the specified index of the LineString.
snowflake_docs/current_organization_name_2_0.txt
Syntax ¶ CURRENT_ORGANIZATION_NAME() Copy
snowflake_docs/replace_5_0.txt
Usage Notes ¶ * If ` _ replacement _ ` is not specified, ` _ subject _ ` is returned with all occurrences of ` _ pattern _ ` removed. * If ` _ replacement _ ` is specified, ` _ subject _ ` is returned with all occurrences of ` _ pattern _ ` replaced by ` _ replacement _ ` . * If any of the arguments i...
snowflake_docs/drop-share_2_0.txt
Syntax ¶ DROP SHARE <name> Copy
snowflake_docs/create-custom-classifier_3_0.txt
Syntax ¶ CREATE [ OR REPLACE ] SNOWFLAKE.DATA_PRIVACY.CUSTOM_CLASSIFIER [ IF NOT EXISTS ] <custom_classifier_name>() Copy
snowflake_docs/concat_4_0.txt
Returns ¶ The data type of the returned value is the same as the data type of the input value(s).
snowflake_docs/bitand_agg_3_0.txt
Arguments ¶ ` _ expr1 _ ` The input expression must be an expression that can be evaluated to a number or converted to a number. ` _ expr2 _ ` This expression is used to group the rows in partitions.
snowflake_docs/desc-integration_4_0.txt
Usage Notes ¶ * If the security integration has the ` TYPE ` property set to ` OAUTH ` (i.e. Snowflake OAuth), Snowflake returns two additional security integration properties in the query result that cannot be set with either a CREATE SECURITY INTEGRATION or an ALTER SECURITY INTEGRATION command: ` OAUTH_ALLOW...
snowflake_docs/system_create_billing_event_1_0.txt
SYSTEM$CREATE_BILLING_EVENT ¶ Available to all accounts. event-billing) that tracks consumer usage of an installed monetized application. This system function can only be called from an application installed in a consumer account.
snowflake_docs/name-resolution_0_0.txt
/
snowflake_docs/create-user_0_0.txt
/ 1. User Management 7. Database Role Management 16. Account-level Role Management 25. Privilege Management CREATE USER
snowflake_docs/h3_grid_path_6_0.txt
Usage Notes ¶ The two input cell IDs must use the same resolution.
snowflake_docs/system_block_internal_stages_public_access_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$BLOCK_INTERNAL_STAGES_PUBLIC_ACCESS Categories:
snowflake_docs/object_construct_keep_null_3_0.txt
Returns ¶ semistructured.html
snowflake_docs/functions-context_3_0.txt
Usage Notes ¶ * Context functions generally do not require arguments. * To comply with ANSI standards, the following context functions can be called without parentheses: * CURRENT_DATE * CURRENT_TIME * CURRENT_TIMESTAMP * CURRENT_USER * LOCALTIME * LOCALTIMESTAMP
snowflake_docs/data-types-geospatial_29_0.txt
Understanding the Differences in Input Data Validation ¶ To create a GEOMETRY or GEOGRAPHY object for an input shape, you must use a shape that is well-formed and valid, according to the [ OGC rules for Simple the validity of input data differs between GEOMETRY and GEOGRAPHY.
snowflake_docs/alter-security-integration-oauth-snowflake_1_0.txt
ALTER SECURITY INTEGRATION (Snowflake OAuth) ¶ Modifies the properties of an existing security integration created for a Snowflake OAuth client. For information about modifying other types of security integrations (e.g. External OAuth), see [ ALTER SECURITY INTEGRATION See also: integration)
snowflake_docs/arrays_overlap_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: semistructured) (Array/Object)
snowflake_docs/translate_2_0.txt
Syntax ¶ TRANSLATE( <subject>, <sourceAlphabet>, <targetAlphabet> ) Copy
snowflake_docs/create-session-policy_4_0.txt
Required 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 ...
snowflake_docs/functions-date-time_10_1.txt
17 | 2017 | > | 2017-12-31 | Sun | 53 | 52 | 2017 | 2017 | > +------------+-----+-----+-----------+------+-----------+ > > alter session set week_of_year_policy=1, week_start=3; > > SELECT d "Date", DAYNAME(d) "Day", > WEEK(d) "WOY", > WEEKISO(d) "WOY (ISO)", ...