id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
snowflake_docs/drop-materialized-view_3_0.txt
Usage Notes ¶ * Dropping a materialized view does not update references to that view. For example, if you create a view named “V1” on top of a materialized view, and then you drop the materialized view, the definition of view “V1” will become out of date. * Dropped materialized views cannot be recovered; they m...
snowflake_docs/alter-iceberg-table_2_0.txt
Syntax ¶ ALTER ICEBERG TABLE [ IF EXISTS ] <table_name> REFRESH [ '<metadata_file_relative_path>' ] ALTER ICEBERG TABLE [ IF EXISTS ] <table_name> CONVERT TO MANAGED [ BASE_LOCATION = '<file_path>' ] ALTER ICEBERG TABLE [ IF EXISTS ] <table_name> clusteringAction ALTER ICEBERG TABLE [ IF EXISTS ] <na...
snowflake_docs/to_binary_6_0.txt
Examples ¶ These examples show the output when ` TO_BINARY ` is called. This example shows how to convert a ` VARCHAR ` to ` BINARY ` and then get it back in its original form ( ` VARCHAR ` ). > Create and fill a table: > >> >> CREATE TABLE binary_test (v VARCHAR, b BINARY); >> INSERT INTO binary_test(v)...
snowflake_docs/system_cleanup_database_role_grants_3_0.txt
Arguments ¶ ` ' _ database_role_name _ ' ` The name of the database role. If the identifier is not fully qualified in the form of ` _ db_name _ . _ database_role_name _ ` , the command uses the database role in the current database for the session. ` ' _ share_name _ ' ` The name of the share.
snowflake_docs/cast_2_0.txt
Syntax ¶ CAST( <source_expr> AS <target_data_type> ) [ RENAME FIELDS | ADD FIELDS ] <source_expr> :: <target_data_type> Copy
snowflake_docs/alter-function_10_0.txt
label-access-control-overview-privileges) at a minimum: Privilege | Object | Notes ---|---|--- USAGE | Function | Enables calling a UDF or external function. APPLY | Tag | Enables setting a tag on the UDF or external function. Note that operating on any object in a schema also requires the USAGE privilege on th...
snowflake_docs/create-warehouse_4_0.txt
Optional Properties ( ` objectProperties ` ) ¶ ` WAREHOUSE_TYPE = { STANDARD | 'SNOWPARK-OPTIMIZED' } ` Specifies the warehouse type. Valid values : * ` STANDARD ` , ` 'STANDARD' ` * ` 'SNOWPARK-OPTIMIZED' ` Default : ` STANDARD ` Note To use a value that contains a hyphen ( ` 'SNOWPARK-OPTIMIZED' ...
snowflake_docs/drop-custom-classifier_5_0.txt
Arguments ¶ None.
snowflake_docs/upper_1_0.txt
UPPER ¶ Returns the input string ` _ expr _ ` with all characters converted to uppercase.
snowflake_docs/current_statement_1_0.txt
CURRENT_STATEMENT ¶ Returns the SQL text of the statement that is currently executing.
snowflake_docs/current_session_1_0.txt
CURRENT_SESSION ¶ Returns a unique system identifier for the Snowflake session corresponding to the present connection. This will generally be a system-generated alphanumeric string. It is NOT derived from the user name or user account.
snowflake_docs/alter-view_5_0.txt
label-security-column-intro-replace-policy) policies.html
snowflake_docs/alter-materialized-view_0_0.txt
/ 2. Table 13. Dynamic Table 19. Event Table 24. External Table 30. Hybrid Table 36. Iceberg Table 43. View 49. Materialized View 56. Sequence ALTER MATERIALIZED VIEW
snowflake_docs/create-notification-integration_13_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/functions-conversion_7_0.txt
Examples ¶ SELECT TO_DATE('3/4/2013', 'dd/mm/yyyy'); -----------------------------------+ to_date('3/4/2013', 'dd/mm/yyyy') | -----------------------------------+ 2013-04-03 | -----------------------------------+ Copy SELECT TO_VARCHAR('2013-04-05'::date, 'mon dd,...
snowflake_docs/system_whitelist_privatelink_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$WHITELIST_PRIVATELINK Categories:
snowflake_docs/from_8_0.txt
Usage Notes ¶ * Object names are SQL identifiers. They are case-insensitive by default. To preserve case, enclose them between double quotes ( ` " " ` ).
snowflake_docs/percentile_cont_5_0.txt
Usage Notes ¶ * The ` _ percentile _ ` argument to the function must be a constant. * DISTINCT is not supported for this function. * The function ` PERCENTILE_CONT ` interpolates between the two closest values, while the function ` PERCENTILE_DISC ` chooses the closest value rather than interpolating. ...
snowflake_docs/get_stage_location_3_0.txt
Arguments ¶ ` stage_name ` Name of an external or internal named stage. Note If the stage name includes spaces or special characters, it must be enclosed in single quotes (e.g. ` '@"my stage"' ` for a stage named ` "my stage" ` ).
snowflake_docs/decode_2_0.txt
Syntax ¶ DECODE( <expr> , <search1> , <result1> [ , <search2> , <result2> ... ] [ , <default> ] ) Copy
snowflake_docs/array_prepend_6_0.txt
Examples ¶ The example below shows that the prepended element is placed at the beginning of the array: > > SELECT ARRAY_PREPEND(ARRAY_CONSTRUCT(0,1,2,3),'hello'); > +-------------------------------------------------+ > | ARRAY_PREPEND(ARRAY_CONSTRUCT(0,1,2,3),'HELLO') | > |---------------------------...
snowflake_docs/create-table_10_2.txt
t, with the current timestamp when the statement was executed. > > * The operation to copy grants occurs atomically in the CREATE TABLE > command (i.e. within the same transaction). > > ` COMMENT = ' _ string_literal _ ' ` Specifies a comment for the table. Default: No value (Note that comments can be specified ...
snowflake_docs/build_stage_file_url_5_0.txt
Usage notes ¶ * The permissions required to call this SQL function differ depending on how it is called: SQL Operation | Permissions Required ---|--- Query | USAGE (external stage) or READ (internal stage) Stored procedure | The stored procedure owner (i.e. role that has the OWNERSHIP privilege on the store...
snowflake_docs/approximate_similarity_1_0.txt
APPROXIMATE_SIMILARITY ¶ Returns an estimation of the similarity (Jaccard index) of inputs based on their MinHash states. For more information about MinHash states, see [ approximate-similarity) . Aliases: See also:
snowflake_docs/join-lateral_7_0.txt
Examples Showing Both Join Syntaxes ¶ The following SQL statements are equivalent and produce the same output (the output is shown only once below). The first SQL statement below uses a comma before the keyword LATERAL while the second SQL statement uses the keywords INNER JOIN. > > SELECT * > FROM depar...
snowflake_docs/as_binary_2_0.txt
Syntax ¶ AS_BINARY( <variant_expr> ) Copy
snowflake_docs/variance_pop_4_0.txt
Returns ¶ The data type of the returned value is ` NUMBER(<precision>, <scale>) ` . The scale depends upon the values being processed.
snowflake_docs/bit_length_4_0.txt
Examples ¶ This shows use of the ` BIT_LENGTH ` function on both string and BINARY values: > > >> CREATE TABLE bl (v VARCHAR, b BINARY); >> INSERT INTO bl (v, b) VALUES >> ('abc', NULL), >> ('\u0394', X'A1B2'); >> >> >> Copy > > Query the data: > >> >> SELECT v, b, BIT_LENGTH(v), BIT_LEN...
snowflake_docs/getvariable_0_0.txt
/ 1. General 14. Session 29. Session Object 41. Alert context) GETVARIABLE Categories:
snowflake_docs/tables_0_0.txt
/
snowflake_docs/hybrid_tables_2_0.txt
Columns ¶ Column Name | Data Type | Description ---|---|--- CATALOG | TEXT | Database to which the hybrid table belongs. SCHEMA | TEXT | Schema to which the hybrd table belongs. NAME | TEXT | Name of the hybrid table. OWNER | TEXT | Owner of the hybrid table. ROW_COUNT | NUMBER | Approximate row count of...
snowflake_docs/desc-packages-policy_8_0.txt
Usage Notes ¶
snowflake_docs/get_query_operator_stats_2_0.txt
label-snowsight-query-profile) tab in Snowsight. The ` GET_QUERY_OPERATOR_STATS() ` function makes the same information available via a programmatic interface. For more information about finding problematic query operators, see [ Common activity.html
snowflake_docs/execute-alert_4_0.txt
Access Control Requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/show-user-functions_2_0.txt
Syntax ¶ SHOW USER FUNCTIONS [ LIKE '<pattern>' ] [ IN { ACCOUNT | DATABASE | DATABASE <database_name> | ...
snowflake_docs/intro-summary-data-types_0_0.txt
/ data-types) Summary
snowflake_docs/alter-database_1_0.txt
ALTER DATABASE ¶ Modifies the properties for an existing database. Database modifications include the following: * Changing the name of the database or changing the Time Travel data retention period (if you are using Snowflake Enterprise Edition or higher). * Enabling and managing database replication and failo...
snowflake_docs/system_finish_oauth_flow_5_0.txt
Examples ¶ SELECT SYSTEM$FINISH_OAUTH_FLOW('state=252462476&authz_code=54264262'); Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Arguments 3. Usage Notes 4. Examples Related content Language : **English**
snowflake_docs/parameters_109_0.txt
label-tasks-compute-resources) . The size is equivalent to the compute resources available when creating a warehouse. If the parameter is omitted, the first runs of the task are executed using a medium-sized ( ` MEDIUM ` ) warehouse. You can change the initial size for individual tasks (using [ ALTER TASK successfully...
snowflake_docs/class_instance_procedures_2_0.txt
Columns ¶ Column Name | Data Type | Description ---|---|--- PROCEDURE_NAME | TEXT | Name of the stored procedure. PROCEDURE_INSTANCE_NAME | TEXT | Name of the class instance to which the procedure belongs. PROCEDURE_INSTANCE_SCHEMA | TEXT | Name of the schema to which the class instance belongs. PROCEDURE_...
snowflake_docs/drop-compute-pool_7_0.txt
label-access-control-securable-objects) , see [ Overview of
snowflake_docs/listing-consumption-daily_1_0.txt
LISTING_CONSUMPTION_DAILY View ¶ This view in the DATA_SHARING_USAGE schema can be used to analyze consumption of a Snowflake Native App or shared data associated with listings in a data exchange, such as the Snowflake Marketplace. The view returns a record for each consumer account that queried data for a given dat...
snowflake_docs/date_trunc_1_0.txt
DATE_TRUNC ¶ Truncates a ` DATE ` , ` TIME ` , or ` TIMESTAMP ` to the specified precision. Note that truncation is not the same as extraction. For example: * Truncating a timestamp down to the quarter returns the timestamp corresponding to midnight of the first day of the quarter for the input timestamp. * ...
snowflake_docs/create-projection-policy_5_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/system_show_budgets_in_account_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$SHOW_BUDGETS_IN_ACCOUNT Categories:
snowflake_docs/data-types-geospatial_6_0.txt
Supported Standard Input and Output Formats ¶ The GEOGRAPHY and GEOMETRY data types support the following standard industry formats for input and output: You might also find the following references helpful: * Open Geospatial Consortium’s Simple Feature Access / Common Architecture and SQL Option: Any departure f...
snowflake_docs/desc-function_1_0.txt
DESCRIBE FUNCTION ¶ Describes the specified user-defined function (UDF) or external function, including the signature (i.e. arguments), return value, language, and body (i.e. definition). DESCRIBE can be abbreviated to DESC. See also:
snowflake_docs/st_asewkt_5_0.txt
Usage Notes ¶
snowflake_docs/accounts_7_0.txt
Usage Notes ¶ * Latency for the view may be up to 24 hours. * Deleted accounts are removed from the view after one year. Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Columns 2. Usage Notes Language : **English**
snowflake_docs/show-secrets_4_0.txt
Access control requirements ¶ access-control-overview-roles) used to execute this SQL command must have the overview.html
snowflake_docs/array_slice_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/alter-security-integration-scim_5_0.txt
Examples ¶ The following example initiates operation of a suspended integration: ALTER SECURITY INTEGRATION myint SET ENABLED = TRUE; Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Parameters 3. Usage notes 4. Examples Language : **English**
snowflake_docs/commands-account_3_0.txt
Managed Accounts ¶
snowflake_docs/hex_decode_string_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/next_day_2_0.txt
Syntax ¶ NEXT_DAY( <date_or_time_expr> , <dow_string> ) Copy
snowflake_docs/current_packages_policy_0_0.txt
/ CURRENT_PACKAGES_POLICY
snowflake_docs/current_role_4_0.txt
Arguments ¶ None.
snowflake_docs/h3_cell_to_boundary_2_0.txt
label-data-types-geospatial-h3) cell.
snowflake_docs/between_5_0.txt
Examples ¶ Here are a few simple examples of using BETWEEN with numeric and string values: > > SELECT 'true' WHERE 1 BETWEEN 0 AND 10; > +--------+ > | 'TRUE' | > |--------| > | true | > +--------+ > > > Copy > > > SELECT 'true' WHERE 1.35 BETWEEN 1 AND 2; > +--------+ > |...
snowflake_docs/parameters_81_0.txt
S3_STAGE_VPCE_DNS_NAME ¶ Type : Session — Can be set for Account » User » Session Data Type : String Description : Specifies the DNS name of an Amazon S3 interface endpoint. Requests sent to the internal stage of an account via [ AWS PrivateLink for Amazon S3 endpoints.html) use this endpoint to connect. For more...
snowflake_docs/is_decimal_2_0.txt
Syntax ¶ IS_DECIMAL( <variant_expr> ) Copy
snowflake_docs/drop-network-rule_1_0.txt
DROP NETWORK RULE ¶ Removes the specified network rule from the system. See also:
snowflake_docs/values_1_0.txt
VALUES ¶ In the SELECT statement, the VALUES sub-clause of the FROM clause allows the specification of a set of constants to be used to form a finite set of rows. (For information about the ` VALUES ` clause in the ` INSERT ` statement,
snowflake_docs/drop-masking-policy_1_0.txt
DROP MASKING POLICY ¶ This feature requires Enterprise Edition (or higher). To inquire about upgrading, please contact [ Snowflake Support Snowflake-Lodge) . Removes a masking policy from the system. See also: security-column-intro-ddl)
snowflake_docs/create-stage_2_1.txt
DELIMITER = '<character>' | NONE > FILE_EXTENSION = '<string>' > PARSE_HEADER = TRUE | FALSE > SKIP_HEADER = <integer> > SKIP_BLANK_LINES = TRUE | FALSE > DATE_FORMAT = '<string>' | AUTO > TIME_FORMAT = '<string>' | AUTO > TIMESTAMP_FORMAT = '<string>' | AU...
snowflake_docs/desc-pipe_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the pipe to describe. 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/typeof_1_0.txt
TYPEOF ¶ semistructured.html
snowflake_docs/complete-snowflake-cortex_4_0.txt
Arguments ¶ **Required:** ` _ model _ ` A string specifying the model to be used. This must be one of the following values. * ` 'mistral-large' ` * ` 'mixtral-8x7b' ` * ` 'llama2-70b-chat' ` * ` 'mistral-7b' ` * ` 'gemma-7b' ` cortex/llm-functions.html
snowflake_docs/base64_encode_5_0.txt
Usage Notes ¶ * The characters in the ` _ alphabet _ ` string are positionally parsed; to specify different characters in the second or third positions in the string, you must explicitly specify all preceding characters even if you wish to use the defaults. For example: > * ` +$ ` specifies the default ( ` ...
snowflake_docs/commands-file_1_0.txt
File staging commands ¶ File staging commands enable you to manage file staging. Was this page helpful? Yes No Inc. All Rights Reserved . Language : **English**
snowflake_docs/create-external-table_4_0.txt
CREATE EXTERNAL TABLE … USING TEMPLATE ¶ Creates a new external table with the column definitions derived from a set of staged files containing semi-structured data. This feature supports Apache Parquet, Apache Avro, ORC, JSON, and CSV files. The support for CSV and JSON files is currently in preview. > > CREATE...
snowflake_docs/create-database-role_3_0.txt
Syntax ¶ CREATE [ OR REPLACE ] DATABASE ROLE [ IF NOT EXISTS ] <name> [ COMMENT = '<string_literal>' ] Copy
snowflake_docs/data_transfer_history_3_0.txt
Arguments ¶ All the arguments are optional. ` DATE_RANGE_START => _ constant_expr _ ` , . ` DATE_RANGE_END => _ constant_expr _ ` The date/time range, within the last 2 weeks, for which to retrieve the data transfer history: History is displayed in increments of 5 minutes, 1 hour, or 24 hours (depending on the...
snowflake_docs/rtrimmed_length_1_0.txt
RTRIMMED_LENGTH ¶ Returns the length of its argument, minus trailing whitespace, but including leading whitespace.
snowflake_docs/parameters_23_0.txt
CLIENT_METADATA_USE_SESSION_DATABASE ¶ Type : Session — Can be set for Session Data Type : Boolean Clients : JDBC Description : This parameter applies to only the methods affected by CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX . This parameter applies only when both of the following conditions are met: * CLI...
snowflake_docs/bitxor_3_0.txt
Arguments ¶ ` _ expr1 _ ` This expression must evaluate to a data type that can be cast to ` INTEGER ` . ` _ expr2 _ ` This expression must evaluate to a data type that can be cast to ` INTEGER ` .
snowflake_docs/create-external-access-integration_7_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/drop-role_0_0.txt
/ 1. User Management 7. Database Role Management 16. Account-level Role Management 25. Privilege Management DROP ROLE
snowflake_docs/drop-network-rule_3_0.txt
Parameters ¶ ` _ name _ ` Specifies the identifier for the network rule 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 case-sensitive.
snowflake_docs/bitor_agg_4_0.txt
Returns ¶ The data type of the returned value is NUMERIC(38, 0).
snowflake_docs/alter-task_0_0.txt
/ 1. Stream 7. Task
snowflake_docs/is_granted_to_invoker_role_2_0.txt
Syntax ¶ IS_GRANTED_TO_INVOKER_ROLE( '<string_literal>' ) Copy
snowflake_docs/show-schemas_3_0.txt
Parameters ¶ ` TERSE ` Returns output containing only the following columns: * ` created_on ` * ` name ` * ` kind ` * ` database_name ` * ` schema_name ` Note that ` kind ` and ` schema_name ` always display ` NULL ` because ` kind ` is not applicable for schemas and ` schema_name ` is redundant...
snowflake_docs/drop-session-policy_7_0.txt
label-security-custom-role) . For general information about roles and privilege grants for performing SQL overview.html
snowflake_docs/set_spending_limit_0_0.txt
/ 1. Commands 4. Methods
snowflake_docs/use-database_5_0.txt
Examples ¶ > > USE DATABASE mydb; > > > Copy Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Syntax 2. Parameters 3. Usage Notes 4. Examples Language : **English**
snowflake_docs/try_to_geography_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) TRY_TO_GEOGRAPHY Categories:
snowflake_docs/show-grants_0_0.txt
/ 1. User Management 7. Database Role Management 16. Account-level Role Management 25. Privilege Management SHOW GRANTS
snowflake_docs/system_migrate_saml_idp_registration_1_0.txt
SYSTEM$MIGRATE_SAML_IDP_REGISTRATION ¶ Migrates an existing SAML identity provider (i.e. IdP) configuration as defined by the account parameter [ SAML_IDENTITY_PROVIDER If the account parameter SAML_IDENTITY_PROVIDER is present, SYSTEM$MIGRATE_SAML_IDP_REGISTRATION creates a new security integration using the data i...
snowflake_docs/serverless_task_history_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/budget_4_0.txt
Budget Methods ¶ Was this page helpful? Yes No Inc. All Rights Reserved . On this page 1. Budget Commands 2. Budget Functions 3. Budget Methods Related content Language : **English**
snowflake_docs/alter-view_6_0.txt
label-projection-policy-replace) .
snowflake_docs/system_allowlist_5_0.txt
Usage Notes ¶ * The output might include multiple entries for certain types (e.g. ` STAGE ` , ` OCSP_RESPONDER ` ). * Occasionally, Snowflake cannot resolve the socket connection from the client that calls the function, and the statement that calls the function fails with one of the following error messages: ...
snowflake_docs/system_clustering_ratio_0_0.txt
/ 1. Control 29. Information 90. Query Information SYSTEM$CLUSTERING_RATIO Categories:
snowflake_docs/sign_3_0.txt
Examples ¶ SELECT SIGN(5), SIGN(-1.35e-10), SIGN(0); ---------+-----------------+---------+ SIGN(5) | SIGN(-1.35E-10) | SIGN(0) | ---------+-----------------+---------+ 1 | -1 | 0 | ---------+-----------------+---------+ Copy Was this page helpful? Yes No Inc. All...
snowflake_docs/get_2_0.txt
label-data-load-overview-internal-stages) types to a local directory or folder on a client machine: * Named internal stage. * Internal stage for a specified table. * Internal stage for the current user. You can use this command to download data files after unloading data from a location) command. See also: fil...
snowflake_docs/create-stage_7_1.txt
d to delegate > authentication responsibility for external cloud storage to a Snowflake > identity and access management (IAM) entity. For more details, see [ CREATE > > Note > > * We highly recommend the use of storage integrations. This option avoids > the need to supply cloud storage credentials using the CREDENTI...
snowflake_docs/current_client_1_0.txt
CURRENT_CLIENT ¶ Returns the version of the client from which the function was called. If called from an application using the JDBC or ODBC driver to connect to Snowflake, returns the version of the driver.
snowflake_docs/parse_url_2_0.txt
Syntax ¶ PARSE_URL(<string>, [<permissive>]) Copy
snowflake_docs/ln_0_0.txt
/ 1. Arithmetic 4. Rounding and Truncation 13. Exponent and Root 21. Logarithmic 24. Trigonometric 42. Other numeric) LN Categories: