id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/st_contains_1_0.txt
ST_CONTAINS ¶ types-geometry) object is completely inside another object of the same type. More strictly, object g1 contains object g2 if and only if no points of g2 lie in the exterior of g1, and at least one point of the interior of B lies in the interior of A. There are certain subtleties in this definition that ...
snowflake_docs/median_2_0.txt
Syntax ¶ **Aggregate function** MEDIAN( <expr> ) Copy **Window function** MEDIAN( <expr> ) OVER ( [ PARTITION BY <expr2> ] ) Copy
snowflake_docs/operators-query_9_0.txt
Syntax ¶ SELECT ... UNION [ ALL ] SELECT ... Copy
snowflake_docs/query_history_3_0.txt
Arguments ¶ All the arguments are optional. ` END_TIME_RANGE_START => _ constant_expr _ ` , . ` END_TIME_RANGE_END => _ constant_expr _ ` Time range (in TIMESTAMP_LTZ format), within the last 7 days, in which the query completed running: * If ` END_TIME_RANGE_END ` is not specified, the function returns all...
snowflake_docs/alter-secret_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/call_5_0.txt
Usage Notes ¶ * Procedure names are not necessarily unique within the schema; stored procedures are identified and resolved by their arguments types as well as their names (i.e. stored procedures can be overloaded). In a Snowflake Scripting block, you can specify ` INTO : _ snowflake_scripting_variable _ ` to ...
snowflake_docs/array_remove_at_1_0.txt
ARRAY_REMOVE_AT ¶ array) , returns an ARRAY with the element at the specified position removed. For example, ` ARRAY_REMOVE_AT([2, 5, 7], 0) ` returns an ARRAY with the element at position 0 removed ( ` [5, 7] ` ).
snowflake_docs/is-null_2_0.txt
Syntax ¶ <expr> IS [ NOT ] NULL Copy
snowflake_docs/desc-row-access-policy_0_0.txt
/ 1. Column-level Security 7. Row Access Policy 13. Tag DESCRIBE ROW ACCESS POLICY
snowflake_docs/copy-into-table_8_3.txt
` Boolean that specifies whether to replace invalid UTF-8 characters with the Unicode replacement character ( ` � ` ). The copy option performs a one-to- one character replacement. If set to ` TRUE ` , Snowflake replaces invalid UTF-8 characters with the Unicode replacement character. If set to ` FALSE ` , the load ...
snowflake_docs/drop-model_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the model 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. . If the model identifier is not fully-qualified (in the form of ` _ ...
snowflake_docs/to_timestamp_5_0.txt
Usage Notes ¶ * This family of functions returns timestamp values, specifically: * For NULL input, the result will be NULL. * For ` _ string_expr _ ` : timestamp represented by a given string. If the string does not have a time component, midnight will be used. * For ` _ date_expr _ ` : timestamp ...
snowflake_docs/show-endpoints_9_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/as_char-varchar_3_0.txt
Arguments ¶ ` _ variant_expr _ ` An expression that evaluates to a value of type VARIANT.
snowflake_docs/functions-data-generation_2_0.txt
List of Functions ¶ Function Name | Notes ---|--- **Random** | | Returns a pseudo-random 64-bit integer. | Returns a random string of specified length. | Returns a random RFC 4122-compliant UUID as a formatted string. **Controlled Distribution** | | Returns a normal-distributed floating point number, w...
snowflake_docs/execute-immediate_4_0.txt
label-initializing-session-variables) .
snowflake_docs/st_contains_8_0.txt
GEOMETRY Examples ¶ The query below shows several examples of using ST_CONTAINS. Note how ST_CONTAINS determines that: * The Polygon contains itself. * The Polygon does not contain the LineString that is on its border. SELECT ST_CONTAINS(poly, poly_inside), ST_CONTAINS(poly, poly), ...
snowflake_docs/operators-subquery_9_0.txt
Examples ¶ Use a correlated NOT EXISTS subquery to find the departments that have no employees: > > SELECT department_id > FROM departments d > WHERE NOT EXISTS (SELECT 1 > FROM employees e > WHERE e.department_id = d.department_id); > > > Copy
snowflake_docs/constraints-properties_2_0.txt
ANSI SQL Constraint Properties ¶
snowflake_docs/st_endpoint_3_0.txt
Arguments ¶ ` _ geography_or_geometry_expression _ ` The argument must be an expression of type GEOGRAPHY or GEOMETRY that represents a LineString.
snowflake_docs/drop-failover-group_4_0.txt
Usage Notes ¶ * Only an account administrator (user with the ACCOUNTADMIN role) or the group owner (role with the OWNERSHIP privilege on the group) can execute this SQL command. * A primary failover group can only be successfully dropped if no linked secondary failover groups exist. * A database that is incl...
snowflake_docs/grant-ownership_4_0.txt
Optional parameters ¶ ` [ REVOKE | COPY ] CURRENT GRANTS ` Specifies whether to remove or transfer all existing outbound privileges on the object when ownership is transferred to a new role: Note _Outbound_ privileges refer to any privileges granted on the individual object whose ownership is changing. When t...
snowflake_docs/approx_top_k_combine_1_0.txt
APPROX_TOP_K_COMBINE ¶ Combines (merges) input states into a single output state. This allows scenarios where [ APPROX_TOP_K_ACCUMULATE table, producing an algorithm state for each table partition. These states can later be combined using APPROX_TOP_K_COMBINE , producing the same output over the entire table. See ...
snowflake_docs/create-security-integration-scim_6_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- CREATE INTEGRATION | Account | Only the ACCOUNTADMIN role has this privilege by default. The privilege can be granted to additional roles as needed. For instructions on creating a custom role with a specified set of pri...
snowflake_docs/object_agg_2_0.txt
Syntax ¶ **Aggregate function** OBJECT_AGG(<key>, <value>) Copy **Window function** OBJECT_AGG(<key>, <value>) OVER ( [ PARTITION BY <expr2> ] ) Copy
snowflake_docs/create-user_7_0.txt
Optional Session Parameters ( ` sessionParams ` ) ¶ Specifies one (or more) session parameter defaults to set for the user (separated by blank spaces, commas, or new lines). These defaults are set each time the user logs into Snowflake and initiates session. The user can always change these defaults themselves with...
snowflake_docs/create-function_45_0.txt
Java ¶ Here is a basic example of CREATE FUNCTION with an in-line handler: create or replace function echo_varchar(x varchar) returns varchar language java called on null input handler='TestFunc.echoVarchar' target_path='@~/testfunc.jar' as 'class TestFunc { public static String...
snowflake_docs/undrop-tag_3_0.txt
Parameters ¶ ` _ name _ ` Identifier for the tag. 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 in double quotes are also case-sensitive.
snowflake_docs/set_notification_mute_flag_4_0.txt
Returns ¶ The notification mute flag has been updated to <true | false>.
snowflake_docs/as_boolean_2_0.txt
Syntax ¶ AS_BOOLEAN( <variant> ) Copy
snowflake_docs/data-types-structured_33_0.txt
Comparing Objects ¶ The following sections explain how to compare objects: * Comparing Structured Objects With Semi-Structured Objects * Comparing Structured Objects With Other Structured Objects * Determining if Two ARRAYs Overlap
snowflake_docs/system_wait_1_0.txt
SYSTEM$WAIT ¶ Waits for the specified amount of time before proceeding.
snowflake_docs/show-custom-classifiers_4_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-replication-group_18_0.txt
Examples ¶
snowflake_docs/unpivot_2_0.txt
Syntax ¶ SELECT ... FROM ... UNPIVOT ( <value_column> FOR <name_column> IN ( <column_list> ) ) [ ... ] Copy ` _ value_column _ ` The name to assign to the generated column that will be populated with the values from the columns in the column list. ` _ name_column _ ` The name to...
snowflake_docs/haversine_2_0.txt
Syntax ¶ HAVERSINE( lat1, lon1, lat2, lon2 ) Copy
snowflake_docs/null_3_0.txt
Syntax ¶ NULL; Copy
snowflake_docs/drop-failover-group_1_0.txt
DROP FAILOVER GROUP ¶ Requires Business Critical Edition (or higher). To inquire about upgrading, please contact [ Snowflake Support Snowflake-Lodge) . Removes a failover group from the account. See also:
snowflake_docs/st_asewkb_1_0.txt
ST_ASEWKB ¶ types-geometry) , return the binary representation of that value in [ EWKB ewkt-ewkb-handling) format. See also:
snowflake_docs/account-usage_8_0.txt
Account Usage Table Functions ¶ Currently, Snowflake supports one ACCOUNT_USAGE table function: Table Function | Data Retention | Notes ---|---|--- | N/A | Results are only returned for the role that has access to the specified object. Note Similar to the Account Usage views, please account for latency when ca...
snowflake_docs/commands-data-loading_5_0.txt
Pipe ¶
snowflake_docs/drop-replication-group_4_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the replication group.
snowflake_docs/approx_top_k_2_0.txt
Syntax ¶ **Aggregate function** APPROX_TOP_K( <expr> [ , <k> [ , <counters> ] ] ) Copy **Window function** APPROX_TOP_K( <expr> [ , <k> [ , <counters> ] ] ) OVER ( [ PARTITION BY <expr4> ] ) Copy
snowflake_docs/stage_directory_file_registration_history_4_0.txt
Usage Notes ¶ * Returns results for the stage owner (i.e. the role with the OWNERSHIP privilege on the stage), or a higher role, or a role that has the USAGE privilege on the database and schema that contain a stage with a directory table and any privilege on the stage. * The table function cannot retrieve me...
snowflake_docs/create-tag_3_0.txt
Required parameters ¶ ` _ name _ ` Identifier for the tag. Assign the tag string value on an [ object 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/join-lateral_5_0.txt
Basic Example ¶ This example shows a LATERAL JOIN with a subquery. > > SELECT * > FROM departments AS d, LATERAL (SELECT * FROM employees AS e WHERE > e.department_ID = d.department_ID) AS iv2 > ORDER BY employee_ID; > > +---------------+-------------+-------------+-----------+---------------+---...
snowflake_docs/array_flatten_4_0.txt
Returns ¶ This function returns an ARRAY that is constructed by concatenating the ARRAYs in ` _ array _ ` . If ` _ array _ ` is NULL or contains any elements that are NULL, the function returns NULL.
snowflake_docs/parameters_22_0.txt
CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX ¶ Type : Session — Can be set for User » Session Data Type : Boolean Clients : JDBC, ODBC Description : For specific ODBC functions and JDBC methods, this parameter can change the default search scope from all databases/schemas to the current database/schema. The narrow...
snowflake_docs/organization-usage_5_0.txt
label-access-control-considerations- database-roles) for the SNOWFLAKE database that grant access to a subset of ORGANIZATION_USAGE views. This allows you to grant access to users who are not the account administrator or organization administrator. The ORGANIZATION_USAGE_VIEWER, ORGANIZATION_BILLING_VIEWER, and ORGANIZ...
snowflake_docs/commands-class_0_0.txt
/ commands) Classes & Instances
snowflake_docs/create-password-policy_14_0.txt
Examples ¶ Create a password policy named ` password_policy_prod_1 ` for your current account: > > CREATE PASSWORD POLICY PASSWORD_POLICY_PROD_1 > PASSWORD_MIN_LENGTH = 12 > PASSWORD_MAX_LENGTH = 24 > PASSWORD_MIN_UPPER_CASE_CHARS = 2 > PASSWORD_MIN_LOWER_CASE_CHARS = 2 > ...
snowflake_docs/system_show_active_behavior_change_bundles_4_0.txt
Returns ¶ Returns a VARCHAR value that contains an array of objects that represent the currently available behavior change bundles. Each object contains the following keys, which describe the status of the bundle: Key | Description of value ---|--- ` name ` | Name of the behavior change bundle ` isDefault ` ...
snowflake_docs/system_cancel_all_queries_2_0.txt
Syntax ¶ SYSTEM$CANCEL_ALL_QUERIES( <session_id> ) Copy
snowflake_docs/sql-all_4_0.txt
label-replication-and-failover-groups) . | Modifies the properties and triggers for an existing [ resource monitor | guide/security-access-control-overview.html
snowflake_docs/ilike_8_0.txt
Examples ¶ > > CREATE OR REPLACE TABLE ilike_ex(name VARCHAR(20)); > INSERT INTO ilike_ex VALUES > ('John Dddoe'), > ('Joe Doe'), > ('John_down'), > ('Joe down'), > (null); > > > Copy > > > SELECT * > FROM ilike_ex > WHERE name IL...
snowflake_docs/select_27_0.txt
Selecting Multiple Columns by Name From Joined Tables ¶ This example lists each employee and the name of the department that each employee works in. The output is in order by department name, and within each department the employees are in order by name. This query uses a join to relate the information in one table ...
snowflake_docs/current_role_5_0.txt
Usage notes ¶
snowflake_docs/st_intersects_1_0.txt
ST_INTERSECTS ¶ geospatial.html
snowflake_docs/system_log_2_0.txt
Syntax ¶ SYSTEM$LOG('<level>', <message>); SYSTEM$LOG_TRACE(<message>); SYSTEM$LOG_DEBUG(<message>); SYSTEM$LOG_INFO(<message>); SYSTEM$LOG_WARN(<message>); SYSTEM$LOG_ERROR(<message>); SYSTEM$LOG_FATAL(<message>); Copy
snowflake_docs/execute-immediate-from_3_0.txt
Absolute file path ( ` absoluteFilePath ` ) ¶ ` _ namespace _ ` Database and/or schema in which the internal or external stage resides, in the form of ` _ database_name _ . _ schema_name _ ` or ` _ schema_name _ ` . The namespace is optional if a database and schema are currently in use for the user session;...
snowflake_docs/system_authorize_stage_privatelink_access_2_0.txt
Syntax ¶ -- Azure SYSTEM$AUTHORIZE_STAGE_PRIVATELINK_ACCESS( '<privateEndpointResourceID>' ) Copy
snowflake_docs/like_any_2_0.txt
Syntax ¶ <subject> LIKE ANY (<pattern1> [, <pattern2> ... ] ) [ ESCAPE <escape_char> ] Copy
snowflake_docs/st_geogpointfromgeohash_3_0.txt
Arguments ¶ ` _ geohash _ ` The argument must be a geohash.
snowflake_docs/commands-integration_3_0.txt
API ¶
snowflake_docs/drop-schema_4_0.txt
Usage Notes ¶ > 1. Within the Time Travel retention period, a dropped schema can be > > 2. When the Time Travel retention period ends, the next state for the > dropped schema depends on whether it is permanent or transient: > > failsafe) . In Fail-safe (7 days), a dropped schema can be recovered, but > only ...
snowflake_docs/intro-summary-operators-functions_6_0.txt
System Functions ¶ system) .
snowflake_docs/h3_cell_to_point_3_0.txt
Arguments ¶ ` _ cell_id _ ` An INTEGER that represents the H3 cell ID ( [ index represents the cell ID in hexadecimal format.
snowflake_docs/data-sharing-usage_2_0.txt
DATA_SHARING_USAGE Views ¶ The DATA_SHARING_USAGE schema contains the following views: View | Type | Latency [1] | Retention duration ---|---|---|--- | Current state | up to 10 minutes | Not applicable. | Historical | up to 2 days | Data retained for 1 year. usage/listing-auto-fulfillment-database-storage-d...
snowflake_docs/array_min_5_0.txt
Usage Notes ¶ * The function determines the element to return by comparing the elements in the array. The function supports comparing elements of the same data type or of the following data types: * Elements of the NUMBER and FLOAT data types. * Elements of the TIMESTAMP_LTZ and TIMESTAMP_TZ data types. ...
snowflake_docs/array_slice_2_0.txt
Syntax ¶ ARRAY_SLICE( <array> , <from> , <to> ) Copy
snowflake_docs/replication_groups_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/alter-row-access-policy_1_0.txt
ALTER ROW ACCESS POLICY ¶ This feature requires Enterprise Edition (or higher). To inquire about upgrading, please contact [ Snowflake Support Snowflake-Lodge) . Modifies the properties for an existing row access policy, including renaming the policy or replacing the policy rules. Any changes made to the policy rule...
snowflake_docs/create-function_25_0.txt
label-creating-using-external-access-integration-using-udf) .
snowflake_docs/create-projection-policy_8_0.txt
label-access-control-securable-objects) , see [ Overview of For additional details on projection policy DDL and privileges, see [ projection-policy-manage) .
snowflake_docs/st_npoints_4_0.txt
Arguments ¶ ` _ geography_or_geometry_expression _ ` The argument must be an expression of type GEOGRAPHY or GEOMETRY.
snowflake_docs/object_delete_5_0.txt
Examples ¶ > > SELECT OBJECT_DELETE(OBJECT_CONSTRUCT('a', 1, 'b', 2, 'c', 3), 'a', > 'b'); > > -------------------------------------------------------------------+ > OBJECT_DELETE(OBJECT_CONSTRUCT('A', 1, 'B', 2, 'C', 3), 'A', 'B') | > --------------------------------------------------------------...
snowflake_docs/create-alert_17_0.txt
Examples ¶ Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Variant Syntax 3. Required Parameters 4. Access Control Requirements 5. Usage Notes 6. Examples Related content Language : **English**
snowflake_docs/data-types-geospatial_30_0.txt
A Shape Can Be Valid GEOGRAPHY But Invalid GEOMETRY ¶ A given shape can be a valid GEOGRAPHY object but an invalid GEOMETRY object (and vice versa). For example, self-intersecting polygons are disallowed by the OGC rules. A given set of points may define edges that intersect in Cartesian domain but not on a sphere. ...
snowflake_docs/system_revoke_stage_privatelink_access_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$REVOKE_STAGE_PRIVATELINK_ACCESS Categories:
snowflake_docs/alter-authentication-policy_6_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/drop-external-volume_7_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/to_array_5_0.txt
Usage Notes ¶
snowflake_docs/copy-into-location_7_1.txt
date values in the unloaded data files. If a value is not specified or is set to ` AUTO ` , the value for the [ is used. Default: ` AUTO ` ` TIME_FORMAT = ' _ string _ ' | AUTO ` String that defines the format of time values in the unloaded data files. If a value is not specified or is set to ` AUTO ` , the v...
snowflake_docs/add_months_2_0.txt
Syntax ¶ ADD_MONTHS( <date_or_timestamp_expr> , <num_months_expr> ) Copy
snowflake_docs/create-file-format_8_0.txt
TYPE = AVRO ¶ ` COMPRESSION = AUTO | GZIP | BROTLI | ZSTD | DEFLATE | RAW_DEFLATE | NONE ` Use : Data loading only Definition : * When loading data, specifies the current compression algorithm for the data file. Snowflake uses this option to detect how an already-compressed data file was compress...
snowflake_docs/date-time-input-output_7_0.txt
File Format Options for Loading/Unloading Dates, Times, and Timestamps ¶ Separate from the input and output format parameters, Snowflake provides three file format options to use when loading data into or unloading data from Snowflake tables: * DATE_FORMAT * TIME_FORMAT * TIMESTAMP_FORMAT The options can be...
snowflake_docs/alter-service_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the service 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. . ` { SUSPEND | RESUME } ` Specifies whether to suspend or re...
snowflake_docs/create-function_24_0.txt
Python ¶ ` PACKAGES = ( ' _ package_name_and_version _ ' [ , ... ] ) ` The name and version number of packages required as dependencies. The value should be of the form ` _ package_name _ == _ version_number _ ` . If you omit the version number, Snowflake will use the latest package available on the sy...
snowflake_docs/query_acceleration_history_3_0.txt
Parameters ¶ All the arguments are optional. ` DATE_RANGE_START => _ constant_expr _ ` , . ` DATE_RANGE_END => _ constant_expr _ ` The date/time range to display the query acceleration history. For example, if you specify that the start date is 2019-05-03 and the end date 2019-05-05, you will get data for May ...
snowflake_docs/show-hybrid-tables_4_1.txt
full object name; partial names are supported. Default: No value (no limit is applied to the output) Note For SHOW commands that support both the ` FROM ' _ name_string _ ' ` and ` STARTS WITH ' _ name_string _ ' ` clauses, you can combine both of these clauses in the same statement. However, both conditions...
snowflake_docs/show_python_packages_dependencies_2_0.txt
Syntax ¶ SNOWFLAKE.SNOWPARK.SHOW_PYTHON_PACKAGES_DEPENDENCIES( '<Python_runtime_version>', '<packages_list>' ) Copy
snowflake_docs/undrop-external-volume_0_0.txt
/ 1. Stage 7. File Format 13. External Volume 20. Pipe 26. Snowpipe Streaming 28. Loading and Unloading loading) UNDROP EXTERNAL VOLUME
snowflake_docs/show-replication-databases_0_0.txt
/ 4. Replication 11. Failover/Failback 18. Client Redirect SHOW REPLICATION DATABASES
snowflake_docs/array_slice_4_0.txt
Returns ¶ The data type of the returned value is ` ARRAY ` .
snowflake_docs/sql-all_9_0.txt
label-tables-iceberg-external-volume-def) . | Describes the properties and their current values for a file format, as well as the default values for each property. | Describes the specified user-defined function (UDF) or external function, including the signature (i.e. arguments), return value, language, and body (...
snowflake_docs/policy_context_2_0.txt
Syntax ¶ EXECUTE USING POLICY_CONTEXT( <arg_1> => '<string_literal>' [ , <arg_2> => '<string_literal>' , ... , <arg_n> => '<string_literal>' ] ) AS SELECT <query> Copy
snowflake_docs/ilike_5_0.txt
Usage Notes ¶ * SQL wildcards are supported in ` _ pattern _ ` : * An underscore ( ` _ ` ) matches any single character. * A percent sign ( ` % ` ) matches any sequence of zero or more characters. * Wildcards in ` _ pattern _ ` include newline characters ( ` \n ` ) in ` _ subject _ ` as matches....
snowflake_docs/show_python_packages_dependencies_1_0.txt
SHOW_PYTHON_PACKAGES_DEPENDENCIES ¶ Returns a list of the dependencies and their versions for the Python packages that were specified. For more information, see [ Packages Policies
snowflake_docs/to_date_0_0.txt
/ 1. Construction 5. Extraction 29. Addition & Subtraction 38. Truncation 42. Conversion 57. Time Zone 59. Alerts date-time) TO_DATE Categories:
snowflake_docs/policy_references_1_0.txt
POLICY_REFERENCES ¶ Returns a row for each object that has the specified policy assigned to the object or returns a row for each policy assigned to the specified object. (Account Usage View)