Skip to content

Dialects

Sqruff currently supports the following SQL dialects:

Each dialect includes a collapsed list of segment types generated from its reachable grammar and lexer using the default dialect configuration. Use these names in [sqruff:layout:type:<type>] configuration section headings. Some types are internal or meta segments; run sqruff parse query.sql --dialect <dialect> to inspect the concrete syntax tree for a particular query.

Dialects Index

Details

ansi

Standard SQL syntax. The default dialect and base for all others.

Default Casing: UPPERCASE

Quotes: String literals: ''; identifiers: "".

Configuration:

[sqruff:dialect:ansi]

Segment types (204)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_statement
  • ampersand
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • collation_reference
  • colon
  • column_constraint_segment
  • column_definition
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • create_cast_statement
  • create_database_statement
  • create_function_statement
  • create_index_statement
  • create_model_statement
  • create_role_statement
  • create_schema_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • data_type
  • data_type_identifier
  • database_reference
  • date_constructor_literal
  • date_part
  • dedent
  • delete_statement
  • describe_statement
  • divide
  • dollar_quote
  • dot
  • double_quote
  • drop_cast_statement
  • drop_database_statement
  • drop_function_statement
  • drop_index_statement
  • drop_model_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • explain_statement
  • expression
  • fetch_clause
  • file
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • insert_statement
  • interval_expression
  • join_clause
  • join_on_condition
  • keyword
  • like_operator
  • limit_clause
  • local_alias
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partitionby_clause
  • percent
  • pipe
  • placeholder
  • plus
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • referenced_column_list
  • revoke_statement
  • role_reference
  • sample_expression
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • set_schema_statement
  • sign_indicator
  • single_quote
  • slice
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • table_constraint
  • table_end_clause
  • table_expression
  • table_reference
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • update_statement
  • use_statement
  • user_reference
  • values_clause
  • vertical_bar
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • word

athena

Amazon Athena SQL dialect for querying data in S3.

Default Casing: lowercase

Quotes: String literals: '', "", or backticks; identifiers: "" or backticks.

Documentation: https://docs.aws.amazon.com/athena/latest/ug/ddl-sql-reference.html

Configuration:

[sqruff:dialect:athena]

Segment types (213)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_statement
  • ampersand
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • collation_reference
  • colon
  • colon_delimiter
  • column_constraint_segment
  • column_definition
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • create_cast_statement
  • create_database_statement
  • create_function_statement
  • create_index_statement
  • create_role_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • data_type
  • database_reference
  • date_constructor_literal
  • date_part
  • dedent
  • delete_statement
  • describe_statement
  • divide
  • dollar_quote
  • dot
  • double_quote
  • drop_cast_statement
  • drop_database_statement
  • drop_function_statement
  • drop_index_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_angle_bracket
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • execute_statement
  • explain_statement
  • expression
  • fetch_clause
  • file
  • file_format
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • insert_statement
  • interval_expression
  • join_clause
  • join_on_condition
  • keyword
  • like_operator
  • limit_clause
  • local_alias
  • map_type
  • map_type_schema
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • msck_repair_table_statement
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partitionby_clause
  • percent
  • pipe
  • placeholder
  • plus
  • prepare_statement
  • primitive_type
  • property_name_identifier
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • referenced_column_list
  • revoke_statement
  • right_arrow
  • role_reference
  • row_format_clause
  • sample_expression
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • show_statement
  • sign_indicator
  • single_quote
  • slice
  • star
  • start_angle_bracket
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • struct_type_schema
  • table_constraint
  • table_expression
  • table_reference
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unload_statement
  • unparsable
  • update_statement
  • use_statement
  • user_reference
  • using_external_function_statement
  • values_clause
  • vertical_bar
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • word

bigquery

Google BigQuery SQL dialect for analytics and data warehousing.

Default Casing: BigQuery resolves unquoted column identifiers case-insensitively, and table and dataset identifiers case-sensitively by default. Columns retain the case used by each reference in result-set labels.

Quotes: String literals: '', "", @, or @@; quoted strings also support r/R raw or regex prefixes and b/B byte-string prefixes. Identifiers: "" or backticks.

Documentation: https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax

Configuration:

[sqruff:dialect:bigquery]

Segment types (302)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • aggregate_clause
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_bi_capacity_statement
  • alter_capacity_statement
  • alter_materialized_view_set_options_statement
  • alter_organization_statement
  • alter_project_statement
  • alter_reservation_statement
  • alter_schema_statement
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_statement
  • alter_view_statement
  • ampersand
  • array_accessor
  • array_expression
  • array_literal
  • assert_statement
  • at_sign_literal
  • back_quote
  • bare_function
  • begin_statement
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • break_statement
  • call_operator
  • call_statement
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • chained_function_call
  • cluster_by_segment
  • collation_reference
  • colon
  • column_constraint_segment
  • column_definition
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • continue_statement
  • create_assignment_statement
  • create_capacity_statement
  • create_cast_statement
  • create_database_statement
  • create_external_table_statement
  • create_function_statement
  • create_index_statement
  • create_materialized_view_as_replica_of_statement
  • create_materialized_view_statement
  • create_model_statement
  • create_procedure_statement
  • create_reservation_statement
  • create_role_statement
  • create_row_access_policy_statement
  • create_schema_statement
  • create_search_index_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_snapshot_table_statement
  • create_table_function_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_vector_index_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • dash
  • data_type
  • data_type_identifier
  • database_reference
  • date_constructor_literal
  • date_part
  • date_part_week
  • declare_segment
  • dedent
  • default_collate
  • delete_statement
  • describe_statement
  • divide
  • dollar_quote
  • dot
  • double_at_sign_literal
  • double_quote
  • drop_assignment_statement
  • drop_capacity_statement
  • drop_cast_statement
  • drop_column_clause
  • drop_database_statement
  • drop_function_statement
  • drop_index_statement
  • drop_materialized_view_statement
  • drop_model_statement
  • drop_procedure_statement
  • drop_reservation_statement
  • drop_role_statement
  • drop_row_access_policy_statement
  • drop_schema_statement
  • drop_search_index_statement
  • drop_sequence_statement
  • drop_table_function_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_vector_index_statement
  • drop_view_statement
  • else_clause
  • end_angle_bracket
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • execute_immediate
  • explain_statement
  • export_option
  • export_statement
  • export_table_metadata_statement
  • expression
  • extend_clause
  • file
  • for_in_statement
  • for_in_statements
  • for_system_time_as_of_segment
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • from_pivot_expression
  • from_unpivot_expression
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_statement
  • grant_to_segment
  • group_and_orderby_clause
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • identifier_list
  • if_statement
  • if_statements
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • insert_statement
  • interval_expression
  • join_clause
  • join_on_condition
  • keyword
  • leave_statement
  • like_operator
  • limit_clause
  • load_data_statement
  • local_alias
  • loop_statement
  • loop_statements
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • minus
  • multi_statement_segment
  • naked_identifier
  • naked_identifier_all
  • named_argument
  • named_window
  • named_window_expression
  • newline
  • not_matched_by_target_clause
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • options_segment
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • parameterized_expression
  • partition_by_segment
  • partitionby_clause
  • percent
  • pipe
  • pipe_operator
  • pipe_operator_clause
  • pipe_statement
  • pivot_for_clause
  • pivot_operator
  • placeholder
  • plus
  • procedure_name
  • procedure_name_identifier
  • procedure_parameter_list
  • qualify_clause
  • question
  • question_mark
  • quoted_identifier
  • quoted_literal
  • raise_statement
  • raw_comparison_operator
  • referenced_column_list
  • rename_column_clause
  • repeat_statement
  • repeat_statements
  • return_statement
  • revoke_statement
  • right_arrow
  • role_reference
  • sample_expression
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_except_clause
  • select_replace_clause
  • select_statement
  • semi_structured_expression
  • semicolon
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • set_operator_clause
  • set_schema_statement
  • set_segment
  • sign_indicator
  • single_quote
  • slice
  • star
  • start_angle_bracket
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • storing_segment
  • struct_literal
  • struct_type_schema
  • system_variable
  • table_constraint
  • table_expression
  • table_reference
  • table_type_schema
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • tuple
  • typed_array_literal
  • typed_struct_literal
  • udf_body
  • undrop_schema_statement
  • unlexable
  • unparsable
  • unpivot_operator
  • update_statement
  • use_statement
  • user_reference
  • values_clause
  • vertical_bar
  • when_clause
  • where_clause
  • while_statement
  • while_statements
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • word

clickhouse

ClickHouse SQL dialect for real-time analytics.

Default Casing: ClickHouse is case-sensitive throughout, regardless of quoting. An unquoted reference using the wrong case raises an UNKNOWN_IDENTIFIER error.

Quotes: String literals: ''; identifiers: "" or backticks. Because identifiers are always resolved case-sensitively, quoting is only needed for invalid characters or reserved keywords.

Documentation: https://clickhouse.com/docs/en/sql-reference/

Configuration:

[sqruff:dialect:clickhouse]

Segment types (245)
  • access_object
  • access_permission
  • access_permissions
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_statement
  • ampersand
  • array_accessor
  • array_expression
  • array_join_clause
  • array_literal
  • array_type
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • colon
  • column_constraint_segment
  • column_definition
  • column_reference
  • column_ttl_segment
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • create_cast_statement
  • create_database_statement
  • create_dictionary_statement
  • create_function_statement
  • create_index_statement
  • create_materialized_view_statement
  • create_model_statement
  • create_role_statement
  • create_schema_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • data_type
  • data_type_identifier
  • database_engine
  • database_reference
  • date_constructor_literal
  • date_part
  • dedent
  • delete_statement
  • describe_statement
  • divide
  • dollar_quote
  • dot
  • double_quote
  • drop_cast_statement
  • drop_database_statement
  • drop_dictionary_statement
  • drop_function_statement
  • drop_index_statement
  • drop_model_statement
  • drop_quota_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_setting_profile_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • engine
  • engine_function
  • exchange_dictionaries_statement
  • exchange_tables_statement
  • explain_statement
  • expression
  • fetch_clause
  • file
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • insert_statement
  • interval_expression
  • join_clause
  • join_on_condition
  • json_path
  • keyword
  • lambda
  • like_operator
  • limit_clause
  • local_alias
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_tree_order_by_clause
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • on_cluster_clause
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partitionby_clause
  • path_segment
  • percent
  • pipe
  • placeholder
  • plus
  • pre_where_clause
  • projection_definition
  • qualify_clause
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • rename_table_statement
  • revoke_statement
  • role_reference
  • sample_expression
  • select_apply_clause
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_except_clause
  • select_statement
  • semicolon
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • set_schema_statement
  • settings_clause
  • sign_indicator
  • single_quote
  • slash
  • slice
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • system_distributed_segment
  • system_fetches_segment
  • system_file_segment
  • system_filesystem_segment
  • system_merges_segment
  • system_model_segment
  • system_moves_segment
  • system_replica_segment
  • system_replicated_segment
  • system_replication_segment
  • system_statement
  • system_ttl_merges_segment
  • system_unfreeze_segment
  • table_constraint
  • table_end_clause
  • table_engine_function
  • table_expression
  • table_reference
  • table_ttl_segment
  • template_loop
  • ternary_colon
  • tilde
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_database
  • truncate_table
  • truncate_tables
  • tuple
  • tuple_element_access
  • tuple_type_schema
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • update_statement
  • use_statement
  • user_reference
  • values_clause
  • vertical_bar
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • word

databricks

Databricks SQL dialect for lakehouse analytics.

Documentation: https://docs.databricks.com/en/sql/language-manual/index.html

Configuration:

[sqruff:dialect:databricks]

Segment types (311)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • add_file_statement
  • add_jar_statement
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_database_statement
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_statement
  • alter_view_statement
  • alter_volume_statement
  • ampersand
  • analyze_table_statement
  • apply_changes_into_statement
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • at_sign_literal
  • back_quote
  • bare_function
  • bare_magic_cell
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • bytes_double_quote
  • bytes_quoted_literal
  • bytes_single_quote
  • cache_table
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • catalog_reference
  • cdc_specification_segment
  • clear_cache
  • cluster_by_clause
  • collation_reference
  • colon
  • column_constraint_segment
  • column_definition
  • column_properties_segment
  • column_reference
  • comma
  • command
  • command_cell
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • constraint_statement
  • convert_to_delta_statement
  • create_cast_statement
  • create_database_statement
  • create_flow_statement
  • create_function_statement
  • create_index_statement
  • create_materialized_view_statement
  • create_role_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_table_clone_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • create_volume_statement
  • create_widget_statement
  • cte_column_list
  • cube_rollup_clause
  • dash
  • data_source_format
  • data_type
  • database_reference
  • date_constructor_literal
  • date_part
  • dedent
  • delete_statement
  • describe_detail_statement
  • describe_history_statement
  • describe_statement
  • distribute_by_clause
  • divide
  • dollar_quote
  • dot
  • double_quote
  • drop_cast_statement
  • drop_database_statement
  • drop_function_statement
  • drop_index_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • drop_volume_statement
  • else_clause
  • end_angle_bracket
  • end_bracket
  • end_curly_bracket
  • end_hint
  • end_of_file
  • end_square_bracket
  • explain_statement
  • expression
  • fetch_clause
  • file
  • file_format
  • file_keyword
  • file_literal
  • file_reference
  • flow_reference
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • from_insert_clause
  • from_insert_source_clause
  • from_insert_statement
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • function_parameter_list_with_comments
  • generate_manifest_file_statement
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • hint_function
  • iceberg_transformation
  • identifier_clause_segment
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • insert_overwrite_directory_hive_fmt_statement
  • insert_overwrite_directory_statement
  • insert_statement
  • interval_expression
  • interval_literal
  • join_clause
  • join_on_condition
  • keyword
  • lateral_view_clause
  • like_operator
  • limit_clause
  • list_file_statement
  • list_jar_statement
  • literal
  • load_data_statement
  • local_alias
  • magic_cell_segment
  • magic_line
  • magic_single_line
  • magic_start
  • map_type
  • mask_statement
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_by_source_clause
  • merge_when_not_matched_clause
  • minus
  • msck_repair_table_statement
  • naked_identifier
  • named_argument
  • named_window
  • named_window_expression
  • newline
  • not_operator
  • notebook_start
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • parameterized_expression
  • partitionby_clause
  • path_segment
  • percent
  • pipe
  • pipeline_parameter
  • pivot_clause
  • placeholder
  • plus
  • primitive_type
  • properties_naked_identifier
  • property_name_identifier
  • qualify_clause
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • raw_double_quote
  • raw_file_literal
  • raw_quoted_literal
  • raw_single_quote
  • refresh_statement
  • remove_widget_statement
  • replace_table_statement
  • reset_statement
  • restore_table_statement
  • revoke_statement
  • right_arrow
  • role_reference
  • row_format_clause
  • sample_expression
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_except_clause
  • select_hint
  • select_statement
  • semi_structured_element
  • semi_structured_expression
  • semicolon
  • set_clause
  • set_clause_list
  • set_config_value
  • set_expression
  • set_operator
  • set_statement
  • set_variable_statement
  • show_statement
  • sign_indicator
  • signed_quoted_literal
  • single_quote
  • slash
  • slice
  • sort_by_clause
  • sql_conf_option
  • star
  • start_angle_bracket
  • start_bracket
  • start_curly_bracket
  • start_hint
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • struct_type_schema
  • symlink_format_manifest
  • table_cluster_by_clause
  • table_constraint
  • table_expression
  • table_reference
  • tag_statement
  • template_loop
  • tilde
  • time_zone_grammar
  • transform_clause
  • trigger_reference
  • truncate_statement
  • try_casting_operator
  • typed_array_literal
  • typed_struct_literal
  • udf_body
  • uncache_table
  • unlexable
  • unparsable
  • unpivot_clause
  • unpivot_multi_column
  • unpivot_single_column
  • update_statement
  • use_statement
  • user_reference
  • using_clause
  • vacuum_statement
  • values_clause
  • vertical_bar
  • volume_reference
  • when_clause
  • where_clause
  • whitespace
  • widget_name_identifier
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_cube_rollup_clause
  • with_data_clause
  • with_no_schema_binding_clause
  • withingroup_clause
  • word

db2

IBM Db2 SQL dialect.

Documentation: https://www.ibm.com/docs/en/i/7.4?topic=overview-db2-i

Configuration:

[sqruff:dialect:db2]

Segment types (217)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_statement
  • ampersand
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • call_segment
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • check_option_clause
  • collation_reference
  • colon
  • column_constraint_segment
  • column_definition
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • copy_options
  • create_cast_statement
  • create_database_statement
  • create_function_statement
  • create_index_statement
  • create_model_statement
  • create_role_statement
  • create_schema_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • data_type
  • data_type_identifier
  • database_reference
  • date_constructor_literal
  • date_part
  • declare_segment
  • dedent
  • delete_statement
  • describe_statement
  • distribution_segment
  • divide
  • dollar_quote
  • dot
  • double_quote
  • drop_cast_statement
  • drop_database_statement
  • drop_function_statement
  • drop_index_statement
  • drop_model_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • explain_statement
  • expression
  • fetch_clause
  • file
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • insert_statement
  • interval_expression
  • isolation_clause
  • join_clause
  • join_on_condition
  • keyword
  • like_operator
  • limit_clause
  • local_alias
  • lock_clause
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • naked_identifier
  • named_argument
  • named_window
  • named_window_expression
  • newline
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partitionby_clause
  • percent
  • pipe
  • placeholder
  • plus
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • read_only_clause
  • referenced_column_list
  • revoke_statement
  • right_arrow
  • role_reference
  • row_movement_clause
  • sample_expression
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • set_schema_statement
  • sign_indicator
  • single_quote
  • slice
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • table_constraint
  • table_end_clause
  • table_expression
  • table_reference
  • tablespace_reference
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • update_statement
  • use_statement
  • user_reference
  • values_clause
  • vertical_bar
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • withingroup_clause
  • word

doris

Apache Doris SQL dialect, based on MySQL.

Default Casing: lowercase

Quotes: String literals: '', ""; identifiers: backticks.

Documentation: https://doris.apache.org/

Configuration:

[sqruff:dialect:doris]

Segment types (274)
  • access_object
  • access_permission
  • access_permissions
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_database_statement
  • alter_event_statement
  • alter_option_segment
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_online_ddl_option
  • alter_table_statement
  • alter_view_statement
  • ampersand
  • analyze_table_statement
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • assignment_operator
  • at_sign_literal
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • call_statement
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • character_set
  • characteristic_statement
  • check_table_statement
  • checksum_table_statement
  • collation_reference
  • colon
  • column_constraint_segment
  • column_definition
  • column_path_operator
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • create_cast_statement
  • create_database_statement
  • create_event_statement
  • create_function_statement
  • create_index_statement
  • create_model_statement
  • create_option_segment
  • create_procedure_statement
  • create_role_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • cursor_fetch_segment
  • cursor_open_close_segment
  • data_type
  • data_type_identifier
  • database_reference
  • date_constructor_literal
  • date_part
  • deallocate_segment
  • declare_statement
  • dedent
  • definer_segment
  • delete_statement
  • delete_target_table
  • delimiter_statement
  • describe_statement
  • distribution_segment
  • divide
  • do_statement
  • dollar_quote
  • dot
  • double_ampersand
  • double_quote
  • double_vertical_bar
  • drop_cast_statement
  • drop_database_statement
  • drop_event_statement
  • drop_function_statement
  • drop_index_statement
  • drop_model_statement
  • drop_procedure_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • engine_type
  • execute_segment
  • explain_statement
  • expression
  • file
  • flush_statement
  • for_clause
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • get_diagnostics_segment
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • help_statement
  • identifier_list
  • if_statement_list
  • if_then_statement
  • implicit
  • indent
  • index_column_definition
  • index_definition
  • index_hint_clause
  • inline_comment
  • inline_path_operator
  • insert_row_alias
  • insert_statement
  • interval_expression
  • into_clause
  • iterate_statement
  • join_clause
  • join_on_condition
  • json_table_columns_clause
  • keyword
  • kill_statement
  • like_operator
  • limit_clause
  • list_partition_definition
  • load_data_statement
  • local_alias
  • loop_statement
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • not_operator
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • optimize_table_statement
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • parameter_direction
  • partition_clause
  • partition_segment
  • partitionby_clause
  • percent
  • pipe
  • placeholder
  • plus
  • prepare_segment
  • procedure_parameter_list
  • purge_binary_logs_statement
  • question
  • quoted_identifier
  • quoted_literal
  • range_partition_definition
  • range_partition_interval
  • raw_comparison_operator
  • referenced_column_list
  • rename_table_statement
  • repair_table_statement
  • repeat_statement
  • replace_statement
  • reset_master_statement
  • resignal_segment
  • return_statement
  • revoke_statement
  • role_reference
  • rollup_segment
  • sample_expression
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • set_clause
  • set_clause_list
  • set_default_role_statement
  • set_expression
  • set_names_statement
  • set_operator
  • set_schema_statement
  • set_statement
  • set_transaction_statement
  • sign_indicator
  • single_quote
  • slice
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • system_variable
  • table_constraint
  • table_expression
  • table_options
  • table_reference
  • template_loop
  • temporal_query
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • update_statement
  • upsert_clause_list
  • use_statement
  • values_clause
  • variable
  • vertical_bar
  • walrus_operator
  • when_clause
  • where_clause
  • while_statement
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_check_option
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • word

duckdb

DuckDB SQL dialect for in-process analytical database.

Default Casing: DuckDB stores all identifiers in the case they were defined, but resolves both quoted and unquoted identifiers case-insensitively. See the DuckDB identifiers documentation.

Quotes: String literals: ''; identifiers: "" or ''.

Documentation: https://duckdb.org/docs/sql/introduction

Configuration:

[sqruff:dialect:duckdb]

Segment types (367)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_aggregate_statement
  • alter_database_statement
  • alter_default_privileges_grant
  • alter_default_privileges_object_privilege
  • alter_default_privileges_revoke
  • alter_default_privileges_schema_object
  • alter_default_privileges_statement
  • alter_default_privileges_to_from_roles
  • alter_domain_statement
  • alter_extension_statement
  • alter_foreign_table_action_segment
  • alter_foreign_table_statement
  • alter_function_action_segment
  • alter_function_statement
  • alter_index_statement
  • alter_materialized_view_action_segment
  • alter_materialized_view_statement
  • alter_policy_statement
  • alter_procedure_action_segment
  • alter_procedure_statement
  • alter_publication_statement
  • alter_role_statement
  • alter_schema_statement
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_subscription
  • alter_system_statement
  • alter_table_action_segment
  • alter_table_statement
  • alter_text_search_configuration_statement
  • alter_trigger
  • alter_type_statement
  • alter_view_statement
  • ampersand
  • analyze_statement
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • array_type_suffix
  • assignment_operator
  • at
  • back_quote
  • bare_function
  • binary_operator
  • bit_string_literal
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • call_statement
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • cluster_statement
  • collation_reference
  • colon
  • column_constraint_segment
  • column_index
  • column_reference
  • column_type_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • commutator
  • comparison_operator
  • composite_value_expansion
  • conflict_action
  • conflict_target
  • copy_statement
  • create_aggregate_statement
  • create_cast_statement
  • create_collation_statement
  • create_database_statement
  • create_domain_statement
  • create_extension_statement
  • create_foreign_data_wrapper
  • create_foreign_table_statement
  • create_function_statement
  • create_index_statement
  • create_materialized_view_statement
  • create_model_statement
  • create_operator_statement
  • create_policy_statement
  • create_procedure_statement
  • create_publication_statement
  • create_role_statement
  • create_schema_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_server_statement
  • create_subscription
  • create_table_statement
  • create_text_search_configuration_statement
  • create_trigger_statement
  • create_type_statement
  • create_user_mapping_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • data_type
  • data_type_identifier
  • database_reference
  • date_part
  • datetime_literal
  • datetime_type_identifier
  • deallocate_statement
  • dedent
  • definition_parameter
  • definition_parameters
  • delete_statement
  • discard_statement
  • divide
  • do_statement
  • dollar_literal
  • dollar_numeric_literal
  • dollar_quote
  • dot
  • double_divide
  • double_quote
  • drop_aggregate_statement
  • drop_cast_statement
  • drop_collation_statement
  • drop_database_statement
  • drop_domain_statement
  • drop_extension_statement
  • drop_foreign_table_statement
  • drop_function_statement
  • drop_index_statement
  • drop_materialized_view_statement
  • drop_model_statement
  • drop_owned_statement
  • drop_policy_statement
  • drop_procedure_statement
  • drop_publication_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_subscription
  • drop_table_statement
  • drop_text_search_configuration_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • escaped_single_quote
  • exclusion_constraint_element
  • execute_statement
  • explain_option
  • explain_statement
  • expression
  • extension_reference
  • factorial_operator
  • fetch_clause
  • file
  • for_clause
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • from_pivot_expression
  • from_unpivot_expression
  • full_text_search_operator
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_statement
  • groupby_clause
  • having_clause
  • identifier_list
  • implicit
  • import_foreign_schema_statement
  • indent
  • index_access_method
  • index_column_definition
  • index_element
  • index_element_options
  • index_parameters
  • inline_comment
  • insert_statement
  • interval_expression
  • join_clause
  • join_on_condition
  • json_operator
  • keyword
  • lambda_arrow
  • lambda_function
  • language_clause
  • like_operator
  • limit_clause
  • list_comprehension
  • listen_statement
  • local_alias
  • lock_table_statement
  • map_literal
  • map_literal_element
  • map_type
  • map_type_schema
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_by_source_clause
  • merge_when_not_matched_clause
  • meta_command
  • meta_command_query_buffer
  • meta_command_statement
  • minus
  • naked_identifier
  • named_argument
  • named_window
  • named_window_expression
  • negator
  • newline
  • notify_statement
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • operation_class_reference
  • operator_class_reference
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partition_bound_spec
  • partitionby_clause
  • percent
  • pgvector_operator
  • pipe
  • placeholder
  • plus
  • postgis_operator
  • postgres_copy_stdin_data_statement
  • power_operator
  • prepare_statement
  • properties_naked_identifier
  • psql_copy_command
  • psql_copy_meta_command_statement
  • psql_set_command
  • psql_set_meta_command_statement
  • psql_variable
  • psql_variable_colon
  • publication_objects
  • publication_reference
  • publication_table
  • qualify_clause
  • question
  • quoted_identifier
  • quoted_literal
  • raw_column_index
  • raw_comparison_operator
  • reassign_owned_statement
  • referenced_column_list
  • refresh_materialized_view_statement
  • reindex_statement_segment
  • relation_option
  • relation_options
  • reset_session_authorization_statement
  • reset_statement
  • revoke_statement
  • right_arrow
  • role_reference
  • sample_expression
  • security_label_statement
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semi_structured_expression
  • semicolon
  • server_reference
  • set_clause
  • set_clause_list
  • set_constraint_statement
  • set_expression
  • set_operator
  • set_schema_statement
  • set_session_authorization_statement
  • set_statement
  • show_statement
  • sign_indicator
  • simplified_pivot
  • simplified_unpivot
  • single_quote
  • sized_array_type
  • slice
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • struct_type_schema
  • subscription_reference
  • table_constraint
  • table_expression
  • table_reference
  • tablespace_reference
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unicode_double_quote
  • unicode_escape_value
  • unicode_single_quote
  • unlexable
  • unlisten_statement
  • unpacking_operator
  • unparsable
  • update_statement
  • use_statement
  • user_reference
  • vacuum_statement
  • values_clause
  • version_identifier
  • vertical_bar
  • walrus_operator
  • when_clause
  • where_clause
  • whitespace
  • wildcard_exclude
  • wildcard_expression
  • wildcard_identifier
  • wildcard_pattern_matching
  • wildcard_rename
  • wildcard_replace
  • window_specification
  • with_check_option
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • withingroup_clause
  • wkt_geometry_type
  • word

exasol

Exasol SQL dialect for the Exasol analytics database.

Documentation: https://docs.exasol.com/db/latest/sql_references.htm

Configuration:

[sqruff:dialect:exasol]

Segment types (266)
  • access_object
  • access_permission
  • access_permissions
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_connection
  • alter_consumer_group_statement
  • alter_role_statement
  • alter_schema_statement
  • alter_session_statement
  • alter_system_statement
  • alter_table_add_column
  • alter_table_alter_column
  • alter_table_column_statement
  • alter_table_constraint_statement
  • alter_table_distribute_partition_statement
  • alter_table_drop_column
  • alter_table_modify_column
  • alter_table_rename_column
  • alter_table_statement
  • alter_user_statement
  • alter_virtual_schema_statement
  • ampersand
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • assignment_operator
  • at_sign_literal
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • close_schema_statement
  • code
  • colon
  • column_constraint_segment
  • column_datatype_definition
  • column_definition
  • column_reference
  • comma
  • comment
  • comment_clause
  • comment_statement
  • common_table_expression
  • comparison_operator
  • connect_by_clause
  • connection_definition
  • consumer_group_parameter
  • create_adapter_script
  • create_connection
  • create_consumer_group_statement
  • create_function_statement
  • create_role_statement
  • create_schema_statement
  • create_scripting_lua_script
  • create_table_statement
  • create_udf_script
  • create_user_statement
  • create_view_statement
  • create_virtual_schema_statement
  • csv_cols
  • cte_column_list
  • cube_rollup_clause
  • data_type
  • date_constructor_literal
  • date_part
  • dedent
  • delete_statement
  • divide
  • dollar_literal
  • dollar_quote
  • dot
  • double_quote
  • drop_connection_statement
  • drop_consumer_group_statement
  • drop_function_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_script_statement
  • drop_table_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • emits_segment
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • escaped_identifier
  • execute_script_statement
  • explain_virtual_statement
  • export_into_clause
  • export_statement
  • expression
  • fbv_cols
  • file
  • file_opts
  • flush_statistics_statement
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • function
  • function_assignment
  • function_body
  • function_contents
  • function_for_loop
  • function_if_branch
  • function_name
  • function_name_identifier
  • function_reference
  • function_script_terminator
  • function_while_loop
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • identifier
  • identifier_list
  • impersonate_statement
  • implicit
  • import_columns
  • import_error_destination
  • import_errors_clause
  • import_export_dbsrc
  • import_file
  • import_from_clause
  • import_script
  • import_statement
  • indent
  • index_column_definition
  • inline_comment
  • insert_statement
  • interval_expression
  • into_table_clause
  • join_clause
  • join_on_condition
  • kerberos_auth
  • keyword
  • kill_statement
  • ldap_auth
  • like_operator
  • limit_clause
  • local_alias_segment
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • open_schema_statement
  • openid_auth
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partitionby_clause
  • password_auth
  • password_literal
  • percent
  • pipe
  • placeholder
  • plus
  • plus_prior_inverse
  • preference_term
  • preferring_clause
  • preload_statement
  • qualify_clause
  • question
  • quoted_identifier
  • quoted_literal
  • range_operator
  • raw_comparison_operator
  • recompress_reorganize_statement
  • reject_clause
  • rename_statement
  • revoke_statement
  • role_reference
  • sample_expression
  • script_content
  • script_reference
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • session_parameter
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • sign_indicator
  • single_quote
  • slice
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • system_parameter
  • table_constraint_definition
  • table_content_definition
  • table_distribution_partition_clause
  • table_expression
  • table_like_clause
  • table_reference
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • transaction_statement
  • truncate_audit_logs_statement
  • truncate_table
  • typed_array_literal
  • typed_struct_literal
  • udf_param_dot_syntax
  • unlexable
  • unparsable
  • update_statement
  • user_reference
  • values_clause
  • values_clause_elements
  • values_range_clause
  • variable
  • vertical_bar
  • view_reference
  • walrus_operator
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_invalid_foreign_key_clause
  • with_invalid_unique_pk_clause
  • word

Apache Flink SQL dialect for stream processing and table operations.

Default Casing: Case insensitive for quoted and unquoted identifiers.

Quotes: String literals: single quotes; identifiers: backticks.

Documentation: https://nightlies.apache.org/flink/flink-docs-release-1.18/docs/dev/table/sql/

Configuration:

[sqruff:dialect:flink]

Segment types (209)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_statement
  • ampersand
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • collation_reference
  • colon
  • column_constraint_segment
  • column_definition
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • create_cast_statement
  • create_catalog_statement
  • create_database_statement
  • create_function_statement
  • create_index_statement
  • create_model_statement
  • create_role_statement
  • create_schema_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • data_type
  • data_type_identifier
  • database_reference
  • date_constructor_literal
  • date_part
  • dedent
  • delete_statement
  • describe_statement
  • divide
  • dollar_quote
  • dot
  • double_equals
  • double_quote
  • drop_cast_statement
  • drop_database_statement
  • drop_function_statement
  • drop_index_statement
  • drop_model_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_angle_bracket
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • explain_statement
  • expression
  • fetch_clause
  • file
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • insert_statement
  • interval_expression
  • join_clause
  • join_on_condition
  • keyword
  • like_operator
  • limit_clause
  • local_alias
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partitionby_clause
  • percent
  • pipe
  • placeholder
  • plus
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • referenced_column_list
  • revoke_statement
  • role_reference
  • row_data_type
  • sample_expression
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • set_schema_statement
  • set_statement
  • show_statement
  • sign_indicator
  • single_quote
  • slice
  • star
  • start_angle_bracket
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • table_expression
  • table_reference
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • update_statement
  • use_statement
  • user_reference
  • values_clause
  • vertical_bar
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • word

greenplum

Greenplum SQL dialect, a massively parallel Postgres.

Documentation: https://docs.vmware.com/en/VMware-Greenplum/index.html

Configuration:

[sqruff:dialect:greenplum]

Segment types (360)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_aggregate_statement
  • alter_database_statement
  • alter_default_privileges_grant
  • alter_default_privileges_object_privilege
  • alter_default_privileges_revoke
  • alter_default_privileges_schema_object
  • alter_default_privileges_statement
  • alter_default_privileges_to_from_roles
  • alter_domain_statement
  • alter_extension_statement
  • alter_foreign_table_action_segment
  • alter_foreign_table_statement
  • alter_function_action_segment
  • alter_function_statement
  • alter_index_statement
  • alter_materialized_view_action_segment
  • alter_materialized_view_statement
  • alter_policy_statement
  • alter_procedure_action_segment
  • alter_procedure_statement
  • alter_publication_statement
  • alter_role_statement
  • alter_schema_statement
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_subscription
  • alter_system_statement
  • alter_table_action_segment
  • alter_table_statement
  • alter_text_search_configuration_statement
  • alter_trigger
  • alter_type_statement
  • alter_view_statement
  • ampersand
  • analyze_statement
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • array_type_suffix
  • assignment_operator
  • at
  • back_quote
  • bare_function
  • binary_operator
  • bit_string_literal
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • call_statement
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • close_statement
  • cluster_statement
  • collation_reference
  • colon
  • column_constraint_segment
  • column_reference
  • column_type_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • commutator
  • comparison_operator
  • composite_value_expansion
  • conflict_action
  • conflict_target
  • copy_statement
  • create_aggregate_statement
  • create_cast_statement
  • create_collation_statement
  • create_database_statement
  • create_domain_statement
  • create_extension_statement
  • create_external_table_statement
  • create_foreign_data_wrapper
  • create_foreign_table_statement
  • create_function_statement
  • create_index_statement
  • create_materialized_view_statement
  • create_model_statement
  • create_operator_statement
  • create_policy_statement
  • create_procedure_statement
  • create_publication_statement
  • create_role_statement
  • create_schema_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_server_statement
  • create_subscription
  • create_table_as_statement
  • create_table_statement
  • create_text_search_configuration_statement
  • create_trigger_statement
  • create_type_statement
  • create_user_mapping_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • data_type
  • data_type_identifier
  • database_reference
  • date_part
  • datetime_literal
  • datetime_type_identifier
  • deallocate_statement
  • declare_statement
  • dedent
  • definition_parameter
  • definition_parameters
  • delete_statement
  • describe_statement
  • discard_statement
  • distributed_by
  • divide
  • do_statement
  • dollar_numeric_literal
  • dollar_quote
  • dot
  • double_quote
  • drop_aggregate_statement
  • drop_cast_statement
  • drop_collation_statement
  • drop_database_statement
  • drop_domain_statement
  • drop_extension_statement
  • drop_external_table_statement
  • drop_foreign_table_statement
  • drop_function_statement
  • drop_index_statement
  • drop_materialized_view_statement
  • drop_model_statement
  • drop_owned_statement
  • drop_policy_statement
  • drop_procedure_statement
  • drop_publication_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_subscription
  • drop_table_statement
  • drop_text_search_configuration_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • escaped_single_quote
  • exclusion_constraint_element
  • execute_statement
  • explain_option
  • explain_statement
  • expression
  • extension_reference
  • fetch_clause
  • fetch_statement
  • file
  • for_clause
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • full_text_search_operator
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • identifier_list
  • implicit
  • import_foreign_schema_statement
  • indent
  • index_access_method
  • index_column_definition
  • index_element
  • index_element_options
  • index_parameters
  • inline_comment
  • insert_statement
  • interval_expression
  • into_clause
  • join_clause
  • join_on_condition
  • json_operator
  • keyword
  • language_clause
  • like_operator
  • like_option_segment
  • limit_clause
  • listen_statement
  • load_statement
  • local_alias
  • lock_table_statement
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_by_source_clause
  • merge_when_not_matched_clause
  • meta_command
  • meta_command_query_buffer
  • meta_command_statement
  • minus
  • naked_identifier
  • named_argument
  • named_window
  • named_window_expression
  • negator
  • newline
  • notify_statement
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • operation_class_reference
  • operator
  • operator_class_reference
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partition_bound_spec
  • partitionby_clause
  • percent
  • pgvector_operator
  • pipe
  • placeholder
  • plus
  • postgis_operator
  • postgres_copy_stdin_data_statement
  • prepare_statement
  • properties_naked_identifier
  • psql_copy_command
  • psql_copy_meta_command_statement
  • psql_set_command
  • psql_set_meta_command_statement
  • psql_variable
  • psql_variable_colon
  • publication_objects
  • publication_reference
  • publication_table
  • qualified_operator
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • reassign_owned_statement
  • referenced_column_list
  • refresh_materialized_view_statement
  • reindex_statement_segment
  • relation_option
  • relation_options
  • reset_session_authorization_statement
  • reset_statement
  • revoke_statement
  • right_arrow
  • role_reference
  • sample_expression
  • security_label_statement
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semi_structured_expression
  • semicolon
  • server_reference
  • set_clause
  • set_clause_list
  • set_constraint_statement
  • set_expression
  • set_operator
  • set_schema_statement
  • set_session_authorization_statement
  • set_statement
  • show_statement
  • sign_indicator
  • single_quote
  • sized_array_type
  • slice
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • subscription_reference
  • table_constraint
  • table_expression
  • table_reference
  • tablespace_reference
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unicode_double_quote
  • unicode_escape_value
  • unicode_single_quote
  • unlexable
  • unlisten_statement
  • unparsable
  • update_statement
  • use_statement
  • user_reference
  • vacuum_statement
  • values_clause
  • version_identifier
  • vertical_bar
  • walrus_operator
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_check_option
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • withingroup_clause
  • wkt_geometry_type
  • word

hive

Apache Hive SQL dialect for data warehousing.

Documentation: https://hive.apache.org/docs/latest/language/

Configuration:

[sqruff:dialect:hive]

Segment types (226)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_database_statement
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_statement
  • alter_view_statement
  • ampersand
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • byte_length_literal
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • cluster_by_clause
  • collation_reference
  • colon
  • colon_delimiter
  • column_constraint_segment
  • column_definition
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • create_cast_statement
  • create_database_statement
  • create_function_statement
  • create_index_statement
  • create_model_statement
  • create_role_statement
  • create_schema_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • data_type
  • database_reference
  • date_constructor_literal
  • date_part
  • dedent
  • delete_statement
  • describe_statement
  • distribute_by_clause
  • divide
  • dollar_quote
  • dot
  • double_quote
  • drop_cast_statement
  • drop_database_statement
  • drop_function_statement
  • drop_index_statement
  • drop_model_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_angle_bracket
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • explain_statement
  • expression
  • fetch_clause
  • file
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • from_insert_clause
  • from_insert_source_clause
  • from_insert_statement
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • hive_variable
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • insert_statement
  • interval_expression
  • join_clause
  • join_on_condition
  • keyword
  • lateral_view_clause
  • like_operator
  • limit_clause
  • local_alias
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • msck_repair_table_statement
  • msck_table_statement
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • option
  • option_indicator
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partitionby_clause
  • percent
  • pipe
  • placeholder
  • plus
  • primitive_type
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • referenced_column_list
  • revoke_statement
  • role_reference
  • row_format_clause
  • sample_expression
  • schema_reference
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • set_schema_statement
  • set_statement
  • sign_indicator
  • single_quote
  • sized_array_type
  • skewed_by_clause
  • slice
  • sort_by_clause
  • star
  • start_angle_bracket
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • struct_type_schema
  • table_constraint
  • table_expression
  • table_reference
  • template_loop
  • tilde
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • update_statement
  • use_statement
  • user_reference
  • values_clause
  • vertical_bar
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • word

impala

Apache Impala SQL dialect for distributed SQL queries.

Documentation: https://impala.apache.org/docs/build/html/topics/impala_langref.html

Configuration:

[sqruff:dialect:impala]

Segment types (225)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_database_statement
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_statement
  • ampersand
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • byte_length_literal
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • cluster_by_clause
  • collation_reference
  • colon
  • colon_delimiter
  • column_constraint_segment
  • column_definition
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • compute_stats_statement
  • create_cast_statement
  • create_database_statement
  • create_function_statement
  • create_index_statement
  • create_model_statement
  • create_role_statement
  • create_schema_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_table_as_select_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • data_type
  • database_reference
  • date_constructor_literal
  • date_part
  • dedent
  • delete_statement
  • describe_statement
  • distribute_by_clause
  • divide
  • dollar_quote
  • dot
  • double_quote
  • drop_cast_statement
  • drop_database_statement
  • drop_function_statement
  • drop_index_statement
  • drop_model_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_angle_bracket
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • explain_statement
  • expression
  • fetch_clause
  • file
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • hive_variable
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • insert_statement
  • interval_expression
  • invalidate_metadata_statement
  • join_clause
  • join_on_condition
  • keyword
  • lateral_view_clause
  • like_operator
  • limit_clause
  • local_alias
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • msck_repair_table_statement
  • msck_table_statement
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • option
  • option_indicator
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partitionby_clause
  • percent
  • pipe
  • placeholder
  • plus
  • primitive_type
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • referenced_column_list
  • refresh_statement
  • revoke_statement
  • role_reference
  • row_format_clause
  • sample_expression
  • schema_reference
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • set_schema_statement
  • set_statement
  • sign_indicator
  • single_quote
  • sized_array_type
  • slice
  • sort_by_clause
  • star
  • start_angle_bracket
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • struct_type_schema
  • table_constraint
  • table_expression
  • table_reference
  • template_loop
  • tilde
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • update_statement
  • use_statement
  • user_reference
  • values_clause
  • vertical_bar
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • word

mariadb

MariaDB SQL dialect, a community-developed fork of MySQL.

Default Casing: lowercase

Quotes: String literals: '', "", or @; identifiers: backticks.

Documentation: https://mariadb.com/kb/en/sql-statements-structure/

Configuration:

[sqruff:dialect:mariadb]

Segment types (275)
  • access_object
  • access_permission
  • access_permissions
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • algorithm_option
  • alias_expression
  • alias_operator
  • alter_database_statement
  • alter_event_statement
  • alter_option_segment
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_online_ddl_option
  • alter_table_statement
  • alter_view_statement
  • ampersand
  • analyze_table_statement
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • assignment_operator
  • at_sign_literal
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • call_statement
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • character_set
  • characteristic_statement
  • check_table_statement
  • checksum_table_statement
  • collation_reference
  • colon
  • column_constraint_segment
  • column_definition
  • column_path_operator
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • create_cast_statement
  • create_database_statement
  • create_event_statement
  • create_function_statement
  • create_index_statement
  • create_model_statement
  • create_option_segment
  • create_procedure_statement
  • create_role_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cursor_fetch_segment
  • cursor_open_close_segment
  • data_type
  • data_type_identifier
  • database_reference
  • date_constructor_literal
  • date_part
  • deallocate_segment
  • declare_statement
  • dedent
  • definer_segment
  • delete_statement
  • delete_target_table
  • delimiter_statement
  • describe_statement
  • divide
  • do_statement
  • dollar_quote
  • dot
  • double_ampersand
  • double_quote
  • double_vertical_bar
  • drop_cast_statement
  • drop_database_statement
  • drop_event_statement
  • drop_function_statement
  • drop_index_statement
  • drop_model_statement
  • drop_procedure_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • execute_segment
  • explain_statement
  • expression
  • file
  • flush_statement
  • for_clause
  • for_portion_of_clause
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • get_diagnostics_segment
  • glob_operator
  • grant_statement
  • groupby_clause
  • having_clause
  • help_statement
  • identifier_list
  • if_statement_list
  • if_then_statement
  • implicit
  • indent
  • index_column_definition
  • index_hint_clause
  • index_option
  • index_type
  • inline_comment
  • inline_path_operator
  • insert_row_alias
  • insert_statement
  • interval_expression
  • into_clause
  • iterate_statement
  • join_clause
  • join_on_condition
  • json_table_columns_clause
  • keyword
  • kill_statement
  • like_operator
  • limit_clause
  • load_data_statement
  • local_alias
  • lock_option
  • loop_statement
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • not_operator
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • optimize_table_statement
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • parameter_direction
  • partition_clause
  • partitionby_clause
  • percent
  • period_segment
  • pipe
  • placeholder
  • plus
  • prepare_segment
  • procedure_parameter_list
  • purge_binary_logs_statement
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • referenced_column_list
  • rename_table_statement
  • repair_table_statement
  • repeat_statement
  • replace_statement
  • reset_master_statement
  • resignal_segment
  • return_statement
  • returning_clause
  • revoke_statement
  • role_reference
  • sample_expression
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • sequence_value_for_expression
  • set_clause
  • set_clause_list
  • set_default_role_statement
  • set_expression
  • set_names_statement
  • set_operator
  • set_schema_statement
  • set_statement
  • set_transaction_statement
  • sign_indicator
  • single_quote
  • slice
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • system_time_partition
  • system_variable
  • table_constraint
  • table_end_clause
  • table_expression
  • table_options
  • table_reference
  • template_loop
  • temporal_query
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • update_statement
  • upsert_clause_list
  • use_statement
  • values_clause
  • variable
  • vertical_bar
  • wait_option
  • walrus_operator
  • when_clause
  • where_clause
  • while_statement
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_check_option
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • with_rollup_clause
  • word

materialize

Materialize SQL dialect for the streaming data warehouse.

Documentation: https://materialize.com/docs/sql/

Configuration:

[sqruff:dialect:materialize]

Segment types (289)
  • access_object
  • access_permission
  • access_permissions
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_connection_rotate_keys
  • alter_default_privileges_statement
  • alter_index_statement
  • alter_owner_statement
  • alter_rename_statement
  • alter_secret_statement
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_set_cluster_statement
  • alter_source_sink_size_statement
  • alter_table_action_segment
  • alter_table_statement
  • ampersand
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • array_type_suffix
  • assignment_operator
  • at
  • back_quote
  • bare_function
  • binary_operator
  • bit_string_literal
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • close_statement
  • collation_reference
  • colon
  • column_constraint_segment
  • column_definition
  • column_reference
  • column_type_reference
  • comma
  • comment
  • common_table_expression
  • comparison_operator
  • composite_value_expansion
  • compression_type
  • conflict_action
  • conflict_target
  • copy_from_statement
  • copy_to_statement
  • create_cast_statement
  • create_cluster_replica_statement
  • create_cluster_statement
  • create_connection_statement
  • create_database_statement
  • create_function_statement
  • create_index_statement
  • create_materialized_view_statement
  • create_model_statement
  • create_role_statement
  • create_schema_statement
  • create_secret_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_sink_kafka_statement
  • create_source_kafka_statement
  • create_source_load_generator_statement
  • create_source_postgres_statement
  • create_source_webhook_statement
  • create_table_statement
  • create_trigger_statement
  • create_type_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • data_type
  • data_type_identifier
  • database_reference
  • date_part
  • datetime_literal
  • datetime_type_identifier
  • declare_statement
  • dedent
  • definition_parameter
  • definition_parameters
  • delete_statement
  • describe_statement
  • divide
  • dollar_numeric_literal
  • dollar_quote
  • dot
  • double_quote
  • drop_cast_statement
  • drop_database_statement
  • drop_function_statement
  • drop_index_statement
  • drop_model_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • escaped_single_quote
  • exclusion_constraint_element
  • explain_option
  • explain_statement
  • expression
  • fetch_clause
  • fetch_statement
  • file
  • for_clause
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • full_text_search_operator
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • identifier_list
  • implicit
  • indent
  • index_access_method
  • index_column_definition
  • index_element
  • index_element_options
  • index_parameters
  • inline_comment
  • insert_statement
  • interval_expression
  • into_clause
  • join_clause
  • join_on_condition
  • json_operator
  • keyword
  • language_clause
  • like_operator
  • like_option_segment
  • limit_clause
  • local_alias
  • map_type
  • materialize_size
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_by_source_clause
  • merge_when_not_matched_clause
  • meta_command
  • meta_command_query_buffer
  • minus
  • naked_identifier
  • named_argument
  • named_window
  • named_window_expression
  • newline
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • operation_class_reference
  • operator
  • operator_class_reference
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partition_bound_spec
  • partitionby_clause
  • percent
  • pgvector_operator
  • pipe
  • placeholder
  • plus
  • postgis_operator
  • postgres_copy_stdin_data_statement
  • properties_naked_identifier
  • psql_copy_command
  • psql_copy_meta_command_statement
  • psql_set_command
  • psql_set_meta_command_statement
  • psql_variable
  • psql_variable_colon
  • qualified_operator
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • referenced_column_list
  • relation_option
  • relation_options
  • revoke_statement
  • right_arrow
  • role_reference
  • sample_expression
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semi_structured_expression
  • semicolon
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • set_schema_statement
  • show_create_statement
  • show_indexes_statement
  • show_materialized_views_statement
  • show_statement
  • sign_indicator
  • single_quote
  • sized_array_type
  • slice
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • table_constraint
  • table_expression
  • table_reference
  • tablespace_reference
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unicode_double_quote
  • unicode_escape_value
  • unicode_single_quote
  • unlexable
  • unparsable
  • update_statement
  • use_statement
  • user_reference
  • values_clause
  • vertical_bar
  • walrus_operator
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_check_option
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • withingroup_clause
  • wkt_geometry_type
  • word

mysql

MySQL SQL dialect for the popular open-source database.

Default Casing: lowercase

Quotes: String literals: '', "", or @; identifiers: backticks.

Documentation: https://dev.mysql.com/doc/

Configuration:

[sqruff:dialect:mysql]

Segment types (267)
  • access_object
  • access_permission
  • access_permissions
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_database_statement
  • alter_event_statement
  • alter_option_segment
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_online_ddl_option
  • alter_table_statement
  • alter_view_statement
  • ampersand
  • analyze_table_statement
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • assignment_operator
  • at_sign_literal
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • call_statement
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • character_set
  • characteristic_statement
  • check_table_statement
  • checksum_table_statement
  • collation_reference
  • colon
  • column_constraint_segment
  • column_definition
  • column_path_operator
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • create_cast_statement
  • create_database_statement
  • create_event_statement
  • create_function_statement
  • create_index_statement
  • create_model_statement
  • create_option_segment
  • create_procedure_statement
  • create_role_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • cursor_fetch_segment
  • cursor_open_close_segment
  • data_type
  • data_type_identifier
  • database_reference
  • date_constructor_literal
  • date_part
  • deallocate_segment
  • declare_statement
  • dedent
  • definer_segment
  • delete_statement
  • delete_target_table
  • delimiter_statement
  • describe_statement
  • divide
  • do_statement
  • dollar_quote
  • dot
  • double_ampersand
  • double_quote
  • double_vertical_bar
  • drop_cast_statement
  • drop_database_statement
  • drop_event_statement
  • drop_function_statement
  • drop_index_statement
  • drop_model_statement
  • drop_procedure_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • execute_segment
  • explain_statement
  • expression
  • file
  • flush_statement
  • for_clause
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • get_diagnostics_segment
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • help_statement
  • identifier_list
  • if_statement_list
  • if_then_statement
  • implicit
  • indent
  • index_column_definition
  • index_hint_clause
  • inline_comment
  • inline_path_operator
  • insert_row_alias
  • insert_statement
  • interval_expression
  • into_clause
  • iterate_statement
  • join_clause
  • join_on_condition
  • json_table_columns_clause
  • keyword
  • kill_statement
  • like_operator
  • limit_clause
  • load_data_statement
  • local_alias
  • loop_statement
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • not_operator
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • optimize_table_statement
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • parameter_direction
  • partition_clause
  • partitionby_clause
  • percent
  • pipe
  • placeholder
  • plus
  • prepare_segment
  • procedure_parameter_list
  • purge_binary_logs_statement
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • referenced_column_list
  • rename_table_statement
  • repair_table_statement
  • repeat_statement
  • replace_statement
  • reset_master_statement
  • resignal_segment
  • return_statement
  • revoke_statement
  • role_reference
  • sample_expression
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • set_clause
  • set_clause_list
  • set_default_role_statement
  • set_expression
  • set_names_statement
  • set_operator
  • set_schema_statement
  • set_statement
  • set_transaction_statement
  • sign_indicator
  • single_quote
  • slice
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • system_variable
  • table_constraint
  • table_end_clause
  • table_expression
  • table_options
  • table_reference
  • template_loop
  • temporal_query
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • update_statement
  • upsert_clause_list
  • use_statement
  • values_clause
  • variable
  • vertical_bar
  • walrus_operator
  • when_clause
  • where_clause
  • while_statement
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_check_option
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • word

oracle

Oracle SQL dialect for Oracle Database.

Documentation: https://www.oracle.com/database/technologies/appdev/sql.html

Configuration:

[sqruff:dialect:oracle]

Segment types (292)
  • access_object
  • access_permission
  • access_permissions
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_column_clauses
  • alter_table_constraint_clauses
  • alter_table_properties
  • ampersand
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • assignment_segment_statement
  • at_sign
  • attribute_indicator
  • back_quote
  • bare_function
  • binary_operator
  • bind_colon
  • bind_variable
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • bulk_collect_into_clause
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • close_statement
  • collation_reference
  • collection_type
  • colon
  • column_constraint_segment
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • compound_trigger_statement
  • connectby_clause
  • continue_statement
  • create_cast_statement
  • create_database_statement
  • create_index_statement
  • create_model_statement
  • create_role_statement
  • create_schema_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • cte_column_list
  • cube_rollup_clause
  • data_type
  • data_type_identifier
  • database_link_reference
  • database_reference
  • date_constructor_literal
  • date_part
  • declare_cursor_variable
  • dedent
  • describe_statement
  • divide
  • dml_event_clause
  • dollar_quote
  • dot
  • double_quote
  • drop_cast_statement
  • drop_cluster_statement
  • drop_database_statement
  • drop_function_statement
  • drop_index_statement
  • drop_model_statement
  • drop_profile_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • execute_file_statement
  • explain_statement
  • expression
  • fetch_clause
  • file
  • for_loop_statement
  • forall_statement
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • function
  • function_contents
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • hierarchical_query_clause
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • interval_data_type
  • interval_expression
  • join_clause
  • join_on_condition
  • json_table_column_definition
  • json_table_columns_clause
  • json_table_function_contents
  • keyword
  • like_operator
  • limit_clause
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • oracle_alter_database_link_statement
  • oracle_alter_function_statement
  • oracle_alter_index_statement
  • oracle_alter_package_statement
  • oracle_alter_session_statement
  • oracle_alter_synonym_statement
  • oracle_alter_table_statement
  • oracle_alter_trigger_statement
  • oracle_assignment_operator
  • oracle_batch
  • oracle_begin_end_block
  • oracle_column_definition
  • oracle_column_type_reference
  • oracle_comment_statement
  • oracle_create_database_link_statement
  • oracle_create_function_statement
  • oracle_create_package_body_statement
  • oracle_create_package_statement
  • oracle_create_procedure_statement
  • oracle_create_synonym_statement
  • oracle_create_table_statement
  • oracle_create_trigger_statement
  • oracle_create_type_body_statement
  • oracle_create_type_statement
  • oracle_create_user_statement
  • oracle_create_view_statement
  • oracle_declare_segment
  • oracle_delete_statement
  • oracle_drop_database_link_statement
  • oracle_drop_package_statement
  • oracle_drop_procedure_statement
  • oracle_drop_synonym_statement
  • oracle_execute_immediate_statement
  • oracle_exit_statement
  • oracle_fetch_statement
  • oracle_function_name
  • oracle_if_clause
  • oracle_if_then_statement
  • oracle_index_physical_attributes
  • oracle_insert_statement
  • oracle_into_clause
  • oracle_keep_clause
  • oracle_listagg_overflow_clause
  • oracle_loop_statement
  • oracle_named_argument
  • oracle_null_statement
  • oracle_open_for_statement
  • oracle_open_statement
  • oracle_order_by_clause
  • oracle_physical_attributes
  • oracle_power_operator
  • oracle_procedure_call_statement
  • oracle_referencing_clause
  • oracle_return_statement
  • oracle_returning_clause
  • oracle_row_type_reference
  • oracle_table_reference
  • oracle_transaction_statement
  • oracle_update_statement
  • oracle_values_clause
  • oracle_within_group_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partitionby_clause
  • percent
  • pipe
  • pivot_segment
  • placeholder
  • plus
  • plus_join_symbol
  • positional_substitution_variable
  • question
  • quoted_identifier
  • quoted_literal
  • raise_statement
  • raw_comparison_operator
  • record_type
  • ref_cursor_type
  • referenced_column_list
  • revoke_statement
  • right_arrow
  • role_reference
  • sample_expression
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • set_schema_statement
  • sign_indicator
  • single_quote
  • size_prefix
  • slash
  • slash_buffer_executor
  • slice
  • sqlplus_set_statement
  • sqlplus_show_statement
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • startwith_clause
  • statement
  • statement_terminator
  • storage_clause
  • struct_literal
  • struct_type
  • substitution_variable
  • table_constraint
  • table_end_clause
  • table_expression
  • table_reference
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • timing_point_section
  • trigger_correlation_name
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • unpivot_segment
  • use_statement
  • using_index_clause
  • vertical_bar
  • when_clause
  • where_clause
  • while_loop_statement
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • word

postgres

PostgreSQL SQL dialect for the advanced open-source database.

Default Casing: lowercase

Quotes: String literals: ''; identifiers: "".

Documentation: https://www.postgresql.org/docs/current/sql.html

Configuration:

[sqruff:dialect:postgres]

Options:

Option Description Default
pg_trgm Enable parsing of pg_trgm trigram operators (%, <%, %>, <->, etc.) false
pgvector Enable parsing of pgvector data types (VECTOR, HALFVEC, SPARSEVEC). false

Example:

[sqruff:dialect:postgres]
pg_trgm = true
pgvector = true

Segment types (355)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_aggregate_statement
  • alter_database_statement
  • alter_default_privileges_grant
  • alter_default_privileges_object_privilege
  • alter_default_privileges_revoke
  • alter_default_privileges_schema_object
  • alter_default_privileges_statement
  • alter_default_privileges_to_from_roles
  • alter_domain_statement
  • alter_extension_statement
  • alter_foreign_table_action_segment
  • alter_foreign_table_statement
  • alter_function_action_segment
  • alter_function_statement
  • alter_index_statement
  • alter_materialized_view_action_segment
  • alter_materialized_view_statement
  • alter_policy_statement
  • alter_procedure_action_segment
  • alter_procedure_statement
  • alter_publication_statement
  • alter_role_statement
  • alter_schema_statement
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_subscription
  • alter_system_statement
  • alter_table_action_segment
  • alter_table_statement
  • alter_text_search_configuration_statement
  • alter_trigger
  • alter_type_statement
  • alter_view_statement
  • ampersand
  • analyze_statement
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • array_type_suffix
  • assignment_operator
  • at
  • back_quote
  • bare_function
  • binary_operator
  • bit_string_literal
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • call_statement
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • cluster_statement
  • collation_reference
  • colon
  • column_constraint_segment
  • column_definition
  • column_reference
  • column_type_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • commutator
  • comparison_operator
  • composite_value_expansion
  • conflict_action
  • conflict_target
  • copy_statement
  • create_aggregate_statement
  • create_cast_statement
  • create_collation_statement
  • create_database_statement
  • create_domain_statement
  • create_extension_statement
  • create_foreign_data_wrapper
  • create_foreign_table_statement
  • create_function_statement
  • create_index_statement
  • create_materialized_view_statement
  • create_model_statement
  • create_operator_statement
  • create_policy_statement
  • create_procedure_statement
  • create_publication_statement
  • create_role_statement
  • create_schema_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_server_statement
  • create_subscription
  • create_table_as_statement
  • create_table_statement
  • create_text_search_configuration_statement
  • create_trigger_statement
  • create_type_statement
  • create_user_mapping_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • data_type
  • data_type_identifier
  • database_reference
  • date_part
  • datetime_literal
  • datetime_type_identifier
  • deallocate_statement
  • dedent
  • definition_parameter
  • definition_parameters
  • delete_statement
  • describe_statement
  • discard_statement
  • divide
  • do_statement
  • dollar_numeric_literal
  • dollar_quote
  • dot
  • double_quote
  • drop_aggregate_statement
  • drop_cast_statement
  • drop_collation_statement
  • drop_database_statement
  • drop_domain_statement
  • drop_extension_statement
  • drop_foreign_table_statement
  • drop_function_statement
  • drop_index_statement
  • drop_materialized_view_statement
  • drop_model_statement
  • drop_owned_statement
  • drop_policy_statement
  • drop_procedure_statement
  • drop_publication_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_subscription
  • drop_table_statement
  • drop_text_search_configuration_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • escaped_single_quote
  • exclusion_constraint_element
  • execute_statement
  • explain_option
  • explain_statement
  • expression
  • extension_reference
  • fetch_clause
  • file
  • for_clause
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • full_text_search_operator
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • identifier_list
  • implicit
  • import_foreign_schema_statement
  • indent
  • index_access_method
  • index_column_definition
  • index_element
  • index_element_options
  • index_parameters
  • inline_comment
  • insert_statement
  • interval_expression
  • into_clause
  • join_clause
  • join_on_condition
  • json_operator
  • keyword
  • language_clause
  • like_operator
  • like_option_segment
  • limit_clause
  • listen_statement
  • load_statement
  • local_alias
  • lock_table_statement
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_by_source_clause
  • merge_when_not_matched_clause
  • meta_command
  • meta_command_query_buffer
  • meta_command_statement
  • minus
  • naked_identifier
  • named_argument
  • named_window
  • named_window_expression
  • negator
  • newline
  • notify_statement
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • operation_class_reference
  • operator
  • operator_class_reference
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partition_bound_spec
  • partitionby_clause
  • percent
  • pgvector_operator
  • pipe
  • placeholder
  • plus
  • postgis_operator
  • postgres_copy_stdin_data_statement
  • prepare_statement
  • properties_naked_identifier
  • psql_copy_command
  • psql_copy_meta_command_statement
  • psql_set_command
  • psql_set_meta_command_statement
  • psql_variable
  • psql_variable_colon
  • publication_objects
  • publication_reference
  • publication_table
  • qualified_operator
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • reassign_owned_statement
  • referenced_column_list
  • refresh_materialized_view_statement
  • reindex_statement_segment
  • relation_option
  • relation_options
  • reset_session_authorization_statement
  • reset_statement
  • revoke_statement
  • right_arrow
  • role_reference
  • sample_expression
  • security_label_statement
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semi_structured_expression
  • semicolon
  • server_reference
  • set_clause
  • set_clause_list
  • set_constraint_statement
  • set_expression
  • set_operator
  • set_schema_statement
  • set_session_authorization_statement
  • set_statement
  • show_statement
  • sign_indicator
  • single_quote
  • sized_array_type
  • slice
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • subscription_reference
  • table_constraint
  • table_expression
  • table_reference
  • tablespace_reference
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unicode_double_quote
  • unicode_escape_value
  • unicode_single_quote
  • unlexable
  • unlisten_statement
  • unparsable
  • update_statement
  • use_statement
  • user_reference
  • vacuum_statement
  • values_clause
  • version_identifier
  • vertical_bar
  • walrus_operator
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_check_option
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • withingroup_clause
  • wkt_geometry_type
  • word

redshift

Amazon Redshift SQL dialect for cloud data warehousing.

Default Casing: lowercase, unless case-sensitive identifiers are enabled and all identifiers use the enable_case_sensitive_identifier configuration value. See the Redshift names and identifiers documentation.

Quotes: String literals: ''; identifiers: "".

Documentation: https://docs.aws.amazon.com/redshift/latest/dg/cm_chap_SQLCommandRef.html

Configuration:

[sqruff:dialect:redshift]

Segment types (380)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_aggregate_statement
  • alter_database_statement
  • alter_default_privileges_grant
  • alter_default_privileges_object_privilege
  • alter_default_privileges_revoke
  • alter_default_privileges_schema_object
  • alter_default_privileges_statement
  • alter_default_privileges_to_from_roles
  • alter_domain_statement
  • alter_extension_statement
  • alter_foreign_table_action_segment
  • alter_foreign_table_statement
  • alter_function_action_segment
  • alter_function_statement
  • alter_group
  • alter_index_statement
  • alter_materialized_view_action_segment
  • alter_materialized_view_statement
  • alter_policy_statement
  • alter_procedure_statement
  • alter_publication_statement
  • alter_role_statement
  • alter_schema_statement
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_subscription
  • alter_system_statement
  • alter_table_action_segment
  • alter_table_statement
  • alter_text_search_configuration_statement
  • alter_trigger
  • alter_type_statement
  • alter_user_statement
  • alter_view_statement
  • ampersand
  • analyze_compression_statement
  • analyze_statement
  • arn_catalog_schema_segment
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • array_unnesting
  • assignment_operator
  • at
  • authorization_segment
  • back_quote
  • bare_function
  • binary_operator
  • bit_string_literal
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • call_statement
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • close_statement
  • cluster_statement
  • collation_clause
  • collation_reference
  • colon
  • column_attribute_segment
  • column_constraint_segment
  • column_reference
  • column_type_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • commutator
  • comparison_operator
  • composite_value_expansion
  • connection_limit_segment
  • copy_statement
  • create_aggregate_statement
  • create_cast_statement
  • create_collation_statement
  • create_database_statement
  • create_database_with_options
  • create_datashare_statement
  • create_domain_statement
  • create_extension_statement
  • create_external_function_statement
  • create_external_schema_statement
  • create_external_table_statement
  • create_foreign_data_wrapper
  • create_function_statement
  • create_group
  • create_index_statement
  • create_library_statement
  • create_materialized_view_statement
  • create_model_statement
  • create_operator_statement
  • create_policy_statement
  • create_procedure_statement
  • create_publication_statement
  • create_rls_policy_statement
  • create_role_statement
  • create_schema_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_server_statement
  • create_subscription
  • create_table_as_statement
  • create_table_statement
  • create_text_search_configuration_statement
  • create_trigger_statement
  • create_type_statement
  • create_user_mapping_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • data_format_segment
  • data_type
  • data_type_identifier
  • database_reference
  • date_part
  • datetime_literal
  • datetime_type_identifier
  • deallocate_statement
  • declare_statement
  • dedent
  • definition_parameter
  • definition_parameters
  • delete_statement
  • desc_datashare_statement
  • describe_statement
  • discard_statement
  • divide
  • do_statement
  • dollar_numeric_literal
  • dollar_quote
  • dot
  • double_quote
  • drop_aggregate_statement
  • drop_cast_statement
  • drop_collation_statement
  • drop_database_statement
  • drop_datashare_statement
  • drop_domain_statement
  • drop_extension_statement
  • drop_foreign_table_statement
  • drop_function_statement
  • drop_index_statement
  • drop_materialized_view_statement
  • drop_model_statement
  • drop_owned_statement
  • drop_policy_statement
  • drop_procedure_statement
  • drop_publication_statement
  • drop_rls_policy_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_subscription
  • drop_table_statement
  • drop_text_search_configuration_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • escaped_single_quote
  • execute_statement
  • explain_option
  • explain_statement
  • expression
  • extension_reference
  • fetch_clause
  • fetch_statement
  • file
  • for_clause
  • frame_clause
  • from_clause
  • from_datashare_clause
  • from_expression
  • from_expression_element
  • from_integration_clause
  • from_pivot_expression
  • from_unpivot_expression
  • full_text_search_operator
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_datashare_statement
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • iam_role_clause
  • identifier_list
  • implicit
  • import_foreign_schema_statement
  • indent
  • index_access_method
  • index_column_definition
  • index_element
  • index_element_options
  • inline_comment
  • insert_statement
  • interval_expression
  • into_clause
  • isolation_level_clause
  • join_clause
  • join_on_condition
  • json_operator
  • keyword
  • language_clause
  • like_operator
  • like_option_segment
  • limit_clause
  • listen_statement
  • load_statement
  • local_alias
  • lock_table_statement
  • manage_rls_policy_statement
  • map_type
  • max_literal
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • meta_command
  • meta_command_query_buffer
  • meta_command_statement
  • minus
  • naked_identifier
  • named_argument
  • named_window
  • named_window_expression
  • negator
  • newline
  • notify_statement
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • object_unpivoting
  • offset_clause
  • operator
  • operator_class_reference
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partition_bound_spec
  • partitionby_clause
  • partitioned_by_segment
  • percent
  • pgvector_operator
  • pipe
  • placeholder
  • plus
  • postgis_operator
  • postgres_copy_stdin_data_statement
  • prepare_statement
  • procedure_parameter_list
  • properties_naked_identifier
  • psql_copy_command
  • psql_copy_meta_command_statement
  • psql_set_command
  • psql_set_meta_command_statement
  • publication_objects
  • publication_reference
  • publication_table
  • qualified_operator
  • qualify_clause
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • reassign_owned_statement
  • refresh_materialized_view_statement
  • reindex_statement_segment
  • relation_option
  • relation_options
  • reset_session_authorization_statement
  • reset_statement
  • revoke_statement
  • right_arrow
  • role_reference
  • row_format_delimited_segment
  • sample_expression
  • security_label_statement
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_exclude_clause
  • select_statement
  • semi_structured_expression
  • semicolon
  • server_reference
  • set_clause
  • set_clause_list
  • set_constraint_statement
  • set_expression
  • set_operator
  • set_schema_statement
  • set_session_authorization_statement
  • set_statement
  • show_datashares_statement
  • show_model_statement
  • sign_indicator
  • single_quote
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • subscription_reference
  • table_constraint
  • table_expression
  • table_reference
  • tablespace_reference
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unicode_double_quote
  • unicode_escape_value
  • unicode_single_quote
  • unlexable
  • unlisten_statement
  • unload_statement
  • unparsable
  • update_statement
  • use_statement
  • user_reference
  • vacuum_statement
  • values_clause
  • version_identifier
  • vertical_bar
  • walrus_operator
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_check_option
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • withingroup_clause
  • word

snowflake

Snowflake SQL dialect for cloud data platform.

Default Casing: UPPERCASE

Quotes: String literals: ''; identifiers: "".

Documentation: https://docs.snowflake.com/en/sql-reference.html

Configuration:

[sqruff:dialect:snowflake]

Segment types (412)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alert_condition
  • alias_expression
  • alias_operator
  • alter_alert_statement
  • alter_cortex_search_service_statement
  • alter_database_statement
  • alter_dynamic_table_column_action
  • alter_dynamic_table_statement
  • alter_external_table_statement
  • alter_external_volume_statement
  • alter_file_format_segment
  • alter_function_statement
  • alter_materialized_view_statement
  • alter_password_policy_statement
  • alter_pipe_segment
  • alter_procedure_statement
  • alter_role_statement
  • alter_row_access_policy_statement
  • alter_schema_statement
  • alter_sequence_statement
  • alter_session_policy_statement
  • alter_session_set_statement
  • alter_session_statement
  • alter_session_unset_clause
  • alter_share_statement
  • alter_stage_statement
  • alter_storage_integration_statement
  • alter_stream_statement
  • alter_streamlit_statement
  • alter_table_clustering_action
  • alter_table_constraint_action
  • alter_table_statement
  • alter_table_table_column_action
  • alter_tag_statement
  • alter_task_set_clause
  • alter_task_special_set_clause
  • alter_task_statement
  • alter_task_unset_clause
  • alter_user_statement
  • alter_view_statement
  • alter_warehouse_statement
  • ampersand
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • array_type_schema
  • assignment_operator
  • auto_event_logging_equals
  • avro_file_format_type_parameters
  • azure_blob_storage_external_stage_parameters
  • back_quote
  • bare_function
  • binary_operator
  • bind_variable
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • bucket_path
  • call_segment
  • call_statement
  • call_with_anonymous_procedure
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • catalog_sync_namespace_flatten_delimeter
  • changes_clause
  • collation_reference
  • colon
  • colon_prefix
  • column_constraint_segment
  • column_definition
  • column_index_identifier_segment
  • column_reference
  • column_selector
  • comma
  • comment
  • comment_clause
  • comment_equals_clause
  • comment_statement
  • common_table_expression
  • comparison_operator
  • compression_type
  • connectby_clause
  • constraint_properties_segment
  • copy_files_into_location_statement
  • copy_into_location_statement
  • copy_into_table_statement
  • copy_on_error_option
  • copy_options
  • create_alert_statement
  • create_authentication_policy_segment
  • create_cast_statement
  • create_clone_statement
  • create_cortex_search_service_statement
  • create_data_metric_function_statement
  • create_database_role_statement
  • create_database_statement
  • create_dbt_project_statement
  • create_dcm_project_statement
  • create_event_table_statement
  • create_external_function_statement
  • create_external_table_statement
  • create_external_volume_statement
  • create_file_format_segment
  • create_function_statement
  • create_mcp_server_statement
  • create_model_statement
  • create_password_policy_statement
  • create_procedure_statement
  • create_role_statement
  • create_row_access_policy_statement
  • create_schema_statement
  • create_sequence_statement
  • create_session_policy_statement
  • create_stage_statement
  • create_statement
  • create_stream_statement
  • create_streamlit_statement
  • create_table_statement
  • create_task_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • csv_file_format_type_parameters
  • cte_column_list
  • cube_rollup_clause
  • data_governance_policy_tag_action_segment
  • data_type
  • data_type_identifier
  • database_reference
  • database_role_reference
  • date_constructor_literal
  • date_part
  • dedent
  • define_pipe_statement
  • define_stage_statement
  • define_statement
  • delete_statement
  • describe_statement
  • divide
  • dollar
  • dollar_literal
  • dollar_quote
  • dollar_quoted_literal
  • dot
  • double_quote
  • drop_cast_statement
  • drop_database_statement
  • drop_dynamic_table_segment
  • drop_external_table_statement
  • drop_external_volume_statement
  • drop_function_statement
  • drop_iceberg_table_statement
  • drop_materialized_view_statement
  • drop_model_statement
  • drop_object_statement
  • drop_password_policy_statement
  • drop_procedure_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • dynamic_table_lag_interval_segment
  • dynamic_table_options
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_exclude_bracket
  • end_of_file
  • end_square_bracket
  • exception_block_statement
  • exception_code
  • exclude_bracket_close
  • exclude_bracket_open
  • execute_dbt_project_statement
  • execute_immediate_clause
  • execute_task_clause
  • explain_statement
  • expression
  • external_access_integration_equals
  • external_volume_reference
  • fetch_clause
  • file
  • file_format_segment
  • file_type
  • for_in_statement
  • format_type_options
  • frame_clause
  • from_at_expression
  • from_before_expression
  • from_clause
  • from_expression
  • from_expression_element
  • from_pivot_expression
  • from_unpivot_expression
  • function
  • function_assigner
  • function_contents
  • function_name
  • function_name_identifier
  • function_parameter_list
  • gcs_external_stage_parameters
  • get_statement
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • iceberg_table_options
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • index_properties_segment
  • initialize_type
  • inline_comment
  • insert_statement
  • integer_literal
  • interval_expression
  • into_clause
  • join_clause
  • join_on_condition
  • json_file_format_type_parameters
  • keyword
  • lambda_arrow
  • lambda_function
  • like_operator
  • limit_clause
  • list_statement
  • literal
  • local_alias
  • log_level_equals
  • loop_statement
  • map_type
  • match_condition_clause
  • match_recognize_clause
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • metric_level_equals
  • minus
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • object_type
  • object_type_schema
  • offset_clause
  • orc_file_format_type_parameters
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • parameter_assigner
  • parquet_file_format_type_parameters
  • partition_by_segment
  • partitionby_clause
  • password_policy_options
  • password_policy_reference
  • pattern_expression
  • percent
  • pipe
  • placeholder
  • plus
  • put_statement
  • qualify_clause
  • question
  • question_mark
  • quoted_identifier
  • quoted_literal
  • quoted_star
  • raw
  • raw_comparison_operator
  • remove_statement
  • repeat_loop_statement
  • resource_constraint
  • return_statement
  • revoke_statement
  • right_arrow
  • role_reference
  • s3_external_stage_parameters
  • sample_expression
  • scaling_policy
  • schema_object_properties
  • scripting_block_statement
  • scripting_break_statement
  • scripting_case_statement
  • scripting_declare_statement
  • scripting_if_statement
  • scripting_let_statement
  • scripting_raise_statement
  • search_optimization_action
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_exclude_clause
  • select_ilike_clause
  • select_rename_clause
  • select_replace_clause
  • select_statement
  • semantic_view
  • semantic_view_dimension
  • semantic_view_dimensions_clause
  • semantic_view_expression
  • semantic_view_fact
  • semantic_view_facts_clause
  • semantic_view_field_reference
  • semantic_view_metric
  • semantic_view_metrics_clause
  • semantic_view_object_reference
  • semantic_view_where_clause
  • semi_structured_element
  • semi_structured_expression
  • semicolon
  • session_policy_options
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • set_schema_statement
  • set_statement
  • share_reference
  • show_statement
  • sign_indicator
  • single_quote
  • slice
  • snowflake_keyword_expression
  • snowflake_task_expression_segment
  • stage_encryption_option
  • stage_parameters
  • stage_path
  • star
  • start_bracket
  • start_curly_bracket
  • start_exclude_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • storage_location
  • struct_literal
  • struct_type
  • system_function_name
  • table_column_comment_action
  • table_expression
  • table_reference
  • tag_bracketed_equals
  • tag_equals
  • tag_reference
  • template_loop
  • tilde
  • time_zone_grammar
  • trace_level_equals
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • udf_body
  • undrop_statement
  • unlexable
  • unparsable
  • unquoted_file_path
  • unset_statement
  • update_statement
  • use_statement
  • user_reference
  • validation_mode_option
  • values_clause
  • variable
  • vertical_bar
  • walrus_operator
  • warehouse_generation
  • warehouse_object_properties
  • warehouse_size
  • when_clause
  • where_clause
  • while_loop_statement
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • withingroup_clause
  • word
  • xml_file_format_type_parameters

sparksql

Apache Spark SQL dialect for big data processing.

Default Casing: Spark SQL resolves both quoted and unquoted (delimited) identifiers case-insensitively. See the Spark identifiers documentation.

Quotes: String literals: '' or ""; identifiers: backticks.

Documentation: https://spark.apache.org/sql/

Configuration:

[sqruff:dialect:sparksql]

Segment types (281)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • add_file_statement
  • add_jar_statement
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_database_statement
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_statement
  • alter_view_statement
  • ampersand
  • analyze_table_statement
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • at_sign_literal
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • bytes_double_quote
  • bytes_quoted_literal
  • bytes_single_quote
  • cache_table
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • clear_cache
  • cluster_by_clause
  • collation_reference
  • colon
  • column_constraint_segment
  • column_definition
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • constraint_statement
  • convert_to_delta_statement
  • create_cast_statement
  • create_database_statement
  • create_function_statement
  • create_index_statement
  • create_role_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • create_widget_statement
  • cte_column_list
  • cube_rollup_clause
  • dash
  • data_source_format
  • data_type
  • database_reference
  • date_constructor_literal
  • date_part
  • dedent
  • delete_statement
  • describe_detail_statement
  • describe_history_statement
  • describe_statement
  • distribute_by_clause
  • divide
  • dollar_quote
  • dot
  • double_quote
  • drop_cast_statement
  • drop_database_statement
  • drop_function_statement
  • drop_index_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_angle_bracket
  • end_bracket
  • end_curly_bracket
  • end_hint
  • end_of_file
  • end_square_bracket
  • explain_statement
  • expression
  • fetch_clause
  • file
  • file_format
  • file_keyword
  • file_literal
  • file_reference
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • from_insert_clause
  • from_insert_source_clause
  • from_insert_statement
  • function
  • function_contents
  • function_name
  • function_name_identifier
  • function_parameter_list
  • generate_manifest_file_statement
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • hint_function
  • iceberg_transformation
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • insert_overwrite_directory_hive_fmt_statement
  • insert_overwrite_directory_statement
  • insert_statement
  • interval_expression
  • interval_literal
  • join_clause
  • join_on_condition
  • keyword
  • lateral_view_clause
  • like_operator
  • limit_clause
  • list_file_statement
  • list_jar_statement
  • literal
  • load_data_statement
  • local_alias
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_by_source_clause
  • merge_when_not_matched_clause
  • minus
  • msck_repair_table_statement
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • not_operator
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partitionby_clause
  • path_segment
  • percent
  • pipe
  • pivot_clause
  • placeholder
  • plus
  • primitive_type
  • properties_naked_identifier
  • property_name_identifier
  • qualify_clause
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • raw_double_quote
  • raw_file_literal
  • raw_quoted_literal
  • raw_single_quote
  • referenced_column_list
  • refresh_statement
  • remove_widget_statement
  • replace_table_statement
  • reset_statement
  • restore_table_statement
  • revoke_statement
  • right_arrow
  • role_reference
  • row_format_clause
  • sample_expression
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_except_clause
  • select_hint
  • select_statement
  • semi_structured_element
  • semi_structured_expression
  • semicolon
  • set_clause
  • set_clause_list
  • set_config_value
  • set_expression
  • set_operator
  • set_statement
  • show_statement
  • sign_indicator
  • signed_quoted_literal
  • single_quote
  • slash
  • slice
  • sort_by_clause
  • sql_conf_option
  • star
  • start_angle_bracket
  • start_bracket
  • start_curly_bracket
  • start_hint
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • struct_type_schema
  • symlink_format_manifest
  • table_cluster_by_clause
  • table_constraint
  • table_expression
  • table_reference
  • template_loop
  • tilde
  • time_zone_grammar
  • transform_clause
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • uncache_table
  • unlexable
  • unparsable
  • unpivot_clause
  • unpivot_multi_column
  • unpivot_single_column
  • update_statement
  • use_database_statement
  • use_statement
  • user_reference
  • using_clause
  • vacuum_statement
  • values_clause
  • vertical_bar
  • when_clause
  • where_clause
  • whitespace
  • widget_name_identifier
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_cube_rollup_clause
  • with_data_clause
  • with_no_schema_binding_clause
  • word

sqlite

SQLite SQL dialect for embedded database.

Default Casing: SQLite does not specify a default in its documentation. Testing indicates that it stores column names in their declared case but resolves them case-insensitively.

Quotes: String literals: '' (or "" when not resolved as an identifier); identifiers: "", [], or backticks. See the SQLite keywords documentation.

Documentation: https://www.sqlite.org/lang.html

Configuration:

[sqruff:dialect:sqlite]

Segment types (179)
  • alias_expression
  • alias_operator
  • alter_table_statement
  • ampersand
  • analyze_statement
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • at_sign_literal
  • attach_statement
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • bytes_quoted_literal
  • bytes_single_quote
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • collation_reference
  • colon
  • colon_literal
  • column_constraint_segment
  • column_definition
  • column_path_operator
  • column_reference
  • comma
  • comment
  • common_table_expression
  • comparison_operator
  • conflict_clause
  • conflict_target
  • create_index_statement
  • create_table_statement
  • create_trigger_statement
  • create_view_statement
  • create_virtual_table_statement
  • cte_column_list
  • cube_rollup_clause
  • data_type
  • data_type_identifier
  • database_reference
  • date_constructor_literal
  • date_part
  • dedent
  • delete_statement
  • detach_statement
  • divide
  • dollar_literal
  • dollar_quote
  • dot
  • double_quote
  • drop_index_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_view_statement
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • explain_statement
  • expression
  • file
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • function
  • function_contents
  • function_name
  • function_name_identifier
  • glob_operator
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • inline_path_operator
  • insert_statement
  • join_clause
  • join_on_condition
  • keyword
  • like_operator
  • limit_clause
  • local_alias
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • orderby_clause
  • over_clause
  • parameterized_expression
  • partitionby_clause
  • percent
  • pipe
  • placeholder
  • plus
  • pragma_reference
  • pragma_statement
  • question
  • question_literal
  • question_mark
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • referenced_column_list
  • reindex_statement
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • sign_indicator
  • single_quote
  • slice
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • table_constraint
  • table_end_clause_segment
  • table_expression
  • table_reference
  • template_loop
  • temporal_query
  • tilde
  • transaction_statement
  • trigger_reference
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • update_statement
  • upsert_clause
  • vacuum_statement
  • values_clause
  • vertical_bar
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • word

starrocks

StarRocks SQL dialect for real-time analytical workloads.

Documentation: https://docs.starrocks.io/docs/sql-reference/

Configuration:

[sqruff:dialect:starrocks]

Segment types (283)
  • access_object
  • access_permission
  • access_permissions
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_database_statement
  • alter_event_statement
  • alter_option_segment
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_online_ddl_option
  • alter_table_statement
  • alter_view_statement
  • ampersand
  • analyze_table_statement
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • assignment_operator
  • at_sign_literal
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • call_statement
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • character_set
  • characteristic_statement
  • check_table_statement
  • checksum_table_statement
  • collation_reference
  • colon
  • column_constraint_segment
  • column_definition
  • column_path_operator
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • create_cast_statement
  • create_database_statement
  • create_event_statement
  • create_function_statement
  • create_index_statement
  • create_model_statement
  • create_option_segment
  • create_procedure_statement
  • create_role_statement
  • create_routine_load_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • cursor_fetch_segment
  • cursor_open_close_segment
  • data_type
  • data_type_identifier
  • database_reference
  • date_constructor_literal
  • date_part
  • deallocate_segment
  • declare_statement
  • dedent
  • definer_segment
  • delete_statement
  • delete_target_table
  • delimiter_statement
  • describe_statement
  • distribution_segment
  • divide
  • do_statement
  • dollar_quote
  • dot
  • double_ampersand
  • double_quote
  • double_vertical_bar
  • drop_cast_statement
  • drop_database_statement
  • drop_event_statement
  • drop_function_statement
  • drop_index_statement
  • drop_model_statement
  • drop_procedure_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_angle_bracket
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • engine_type
  • execute_segment
  • explain_statement
  • expression
  • file
  • flush_statement
  • for_clause
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • get_diagnostics_segment
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • help_statement
  • identifier_list
  • if_statement_list
  • if_then_statement
  • implicit
  • indent
  • index_column_definition
  • index_definition
  • index_hint_clause
  • inline_comment
  • inline_path_operator
  • insert_overwrite_statement
  • insert_row_alias
  • insert_statement
  • interval_expression
  • into_clause
  • iterate_statement
  • join_clause
  • join_on_condition
  • json_table_columns_clause
  • keyword
  • kill_statement
  • like_operator
  • limit_clause
  • load_data_desc
  • load_data_statement
  • load_label_property
  • load_label_statement
  • local_alias
  • loop_statement
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • not_operator
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • optimize_table_statement
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • parameter_direction
  • partition_clause
  • partition_segment
  • partitionby_clause
  • pause_routine_load_statement
  • percent
  • pipe
  • placeholder
  • plus
  • prepare_segment
  • procedure_parameter_list
  • purge_binary_logs_statement
  • qualify_clause
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • referenced_column_list
  • rename_table_statement
  • repair_table_statement
  • repeat_statement
  • replace_statement
  • reset_master_statement
  • resignal_segment
  • resume_routine_load_statement
  • return_statement
  • revoke_statement
  • role_reference
  • routine_load_data_source_properties
  • routine_load_properties
  • sample_expression
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • set_clause
  • set_clause_list
  • set_default_role_statement
  • set_expression
  • set_names_statement
  • set_operator
  • set_schema_statement
  • set_statement
  • set_transaction_statement
  • sign_indicator
  • single_quote
  • slice
  • star
  • start_angle_bracket
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • stop_routine_load_statement
  • struct_literal
  • struct_type
  • system_variable
  • table_constraint
  • table_expression
  • table_options
  • table_reference
  • template_loop
  • temporal_query
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • update_statement
  • upsert_clause_list
  • use_statement
  • values_clause
  • variable
  • vertical_bar
  • walrus_operator
  • when_clause
  • where_clause
  • while_statement
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_check_option
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • word

teradata

Teradata SQL dialect for the Teradata analytics platform.

Documentation: https://docs.teradata.com/

Configuration:

[sqruff:dialect:teradata]

Segment types (220)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_statement
  • ampersand
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • bteq_file_path
  • bteq_key_word_segment
  • bteq_statement
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • collation_reference
  • collect_stat_using_option_clause
  • collect_statistics_statement
  • colon
  • column_constraint_segment
  • column_definition
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • create_cast_statement
  • create_database_statement
  • create_function_statement
  • create_index_statement
  • create_model_statement
  • create_role_statement
  • create_schema_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_table_options_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • data_type
  • data_type_identifier
  • database_reference
  • database_statement
  • date_constructor_literal
  • date_part
  • dedent
  • delete_statement
  • describe_statement
  • divide
  • dollar_quote
  • dot
  • double_quote
  • drop_cast_statement
  • drop_database_statement
  • drop_function_statement
  • drop_index_statement
  • drop_model_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • explain_statement
  • expression
  • fetch_clause
  • file
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • from_in_update_clause
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_statement
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • insert_statement
  • interval_expression
  • join_clause
  • join_on_condition
  • keyword
  • like_operator
  • limit_clause
  • local_alias
  • locking_clause
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partitionby_clause
  • percent
  • pipe
  • placeholder
  • plus
  • qualify_clause
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • referenced_column_list
  • rename_table_statement
  • revoke_statement
  • role_reference
  • sample_expression
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • set_query_band_statement
  • set_schema_statement
  • set_session_statement
  • sign_indicator
  • single_quote
  • slash
  • slice
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • table_constraint
  • table_expression
  • table_reference
  • td_column_attribute_constraint
  • td_partitioning_level
  • td_table_constraint
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • update_statement
  • use_statement
  • user_reference
  • values_clause
  • vertical_bar
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • word

trino

Trino (formerly PrestoSQL) dialect for distributed SQL queries.

Default Casing: lowercase, although the case of a reference is used in its result-set column label.

Quotes: String literals: ''; identifiers: "".

Documentation: https://trino.io/docs/current/sql.html

Configuration:

[sqruff:dialect:trino]

Segment types (180)
  • alias_expression
  • alias_operator
  • alter_table_statement
  • ampersand
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • array_type_schema
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • colon
  • colon_delimiter
  • column_definition
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • create_function_statement
  • create_role_statement
  • create_schema_statement
  • create_table_statement
  • create_view_statement
  • cte_column_list
  • cube_rollup_clause
  • data_type
  • database_reference
  • date_constructor_literal
  • date_part
  • dedent
  • delete_statement
  • describe_statement
  • divide
  • dollar_quote
  • dot
  • double_quote
  • drop_function_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_table_statement
  • drop_view_statement
  • else_clause
  • end_angle_bracket
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • execute_arrow
  • explain_statement
  • expression
  • fat_right_arrow
  • fetch_clause
  • file
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • groupby_clause
  • grouping_expression_list
  • grouping_sets_clause
  • having_clause
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • insert_statement
  • interval_expression
  • join_clause
  • join_on_condition
  • keyword
  • lambda_arrow
  • lambda_function
  • like_operator
  • limit_clause
  • local_alias
  • map_type
  • map_type_schema
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • offset_clause
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partitionby_clause
  • percent
  • pipe
  • placeholder
  • plus
  • primitive_type
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • right_arrow
  • role_reference
  • sample_expression
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • set_schema_statement
  • set_session_statement
  • show_statement
  • sign_indicator
  • single_quote
  • slice
  • star
  • start_angle_bracket
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • table_expression
  • table_reference
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • transaction_statement
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • update_statement
  • use_statement
  • values_clause
  • vertical_bar
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • word

tsql

T-SQL dialect for Microsoft SQL Server and Azure SQL.

Documentation: https://learn.microsoft.com/en-us/sql/t-sql/language-reference

Configuration:

[sqruff:dialect:tsql]

Segment types (332)
  • action_parameter
  • aggregate_order_by_clause
  • alias_column_list
  • alias_expression
  • alias_operator
  • allow_connections
  • alter_authorization_statement
  • alter_credential_statement
  • alter_database_scoped_configuration_statement
  • alter_database_statement
  • alter_fulltext_index_statement
  • alter_master_key_statement
  • alter_partition_function_statement
  • alter_partition_scheme_statement
  • alter_role_statement
  • alter_security_policy_statement
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_table_statement
  • alter_table_switch_statement
  • alter_user_statement
  • alter_xml_schema_collection_statement
  • ampersand
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • assignment_operator
  • auto_option
  • back_quote
  • backup_storage_redundancy
  • bare_function
  • batch
  • binary_literal
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • bracketed_index_column_list_grammar
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • check_constraint_grammar
  • close_cursor_statement
  • collation_reference
  • colon
  • colon_delimiter
  • column_constraint_segment
  • column_definition
  • column_reference
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • compatibility_level
  • computed_column_definition
  • connection_constraint_grammar
  • containstable_segment
  • copy_into_table_statement
  • create_columnstore_index_statement
  • create_credential_statement
  • create_database_scoped_credential_statement
  • create_database_statement
  • create_external_data_source_statement
  • create_external_file_format
  • create_external_table_as_select_statement
  • create_external_table_statement
  • create_fulltext_catalog_statement
  • create_fulltext_index_statement
  • create_fulltext_stoplist_statement
  • create_function_statement
  • create_index_statement
  • create_login_statement
  • create_master_key_statement
  • create_partition_function_statement
  • create_partition_scheme_statement
  • create_procedure_statement
  • create_role_statement
  • create_schema_statement
  • create_security_policy_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_server_role_statement
  • create_table_graph_statement
  • create_table_statement
  • create_trigger
  • create_trigger_statement
  • create_type_statement
  • create_user_statement
  • create_view_statement
  • create_xml_schema_collection_statement
  • cte_column_list
  • cursor_definition
  • data_type
  • data_type_identifier
  • database_reference
  • datatype_method
  • datatype_method_name_identifier
  • date_constructor_literal
  • date_format
  • date_part
  • dbcc_statement
  • deallocate_cursor_statement
  • declare_segment
  • dedent
  • delete_statement
  • deny_statement
  • divide
  • dollar_quote
  • dot
  • double_quote
  • drop_credential_statement
  • drop_database_statement
  • drop_external_table_statement
  • drop_fulltext_index_statement
  • drop_function_statement
  • drop_index_statement
  • drop_master_key_statement
  • drop_procedure_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_security_policy
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • drop_xml_schema_collection_statement
  • edition
  • else_clause
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • execute_option
  • execute_script_statement
  • expression
  • external_file_delimited_text_clause
  • external_file_delimited_text_format_options_clause
  • external_file_delta_clause
  • external_file_json_clause
  • external_file_orc_clause
  • external_file_parquet_clause
  • external_file_rc_clause
  • external_location
  • fetch_clause
  • fetch_cursor_statement
  • file
  • file_compression
  • file_encoding
  • file_spec
  • file_spec_file_growth
  • file_spec_file_name
  • file_spec_max_size
  • file_spec_new_name
  • file_spec_size
  • file_spec_without_bracket
  • filegroup_clause
  • filegroup_name
  • filestream_on_option_statement
  • for_clause
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • from_pivot_expression
  • function
  • function_contents
  • function_name
  • function_name_identifier
  • function_option_segment
  • function_parameter_list
  • glob_operator
  • go_statement
  • grant_statement
  • graph_table_constraint
  • groupby_clause
  • hash_identifier
  • having_clause
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • insert_statement
  • integer_literal
  • interval_expression
  • into_table_clause
  • join_clause
  • join_on_condition
  • keyword
  • leading_dot
  • like_operator
  • limit_clause
  • local_alias
  • logical_file_name
  • login_user_segment
  • map_type
  • master_key_encryption_option
  • max_duration
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • ml_table_expression
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • null_literal
  • numeric_literal
  • object_reference
  • offset_clause
  • on_partition_or_filegroup_statement
  • on_partitions_clause
  • open_cursor_statement
  • open_symmetric_key_statement
  • openjson_segment
  • openjson_with_clause
  • openquery_segment
  • openrowset_segment
  • openrowset_with_clause
  • openxml_segment
  • option_clause
  • orderby_clause
  • output_clause
  • over_clause
  • overlaps_clause
  • parameterized_expression
  • partition_scheme_clause
  • partition_scheme_name
  • partitionby_clause
  • percent
  • period_segment
  • permissions_segment
  • pipe
  • pivot_column_reference
  • placeholder
  • plus
  • procedure_statement
  • query_hint_segment
  • question
  • quoted_identifier
  • quoted_literal
  • raiserror_statement
  • raw_comparison_operator
  • reconfigure_statement
  • references_constraint_grammar
  • relational_index_options
  • restore_database_statement
  • return_segment
  • revoke_statement
  • role_reference
  • sample_expression
  • securable_segment
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • select_variable_assignment
  • semicolon
  • sequence_next_value
  • serde_method
  • service_objective
  • set_clause
  • set_clause_list
  • set_context_info_statement
  • set_expression
  • set_language_statement
  • set_local_variable_segment
  • set_operator
  • set_schema_statement
  • set_segment
  • sign_indicator
  • single_quote
  • single_quote_with_n
  • size_literal
  • slice
  • sqlcmd_command_segment
  • sqlcmd_operator
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • storage_location
  • struct_literal
  • struct_type
  • table_constraint
  • table_expression
  • table_index_segment
  • table_location_clause
  • table_reference
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • transaction_statement
  • trigger_reference
  • truncate_statement
  • tsql_variable
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • unquoted_relative_sql_file_path
  • update_statement
  • values_clause
  • vertical_bar
  • waitfor_statement
  • when_clause
  • where_clause
  • where_current_of_cursor_segment
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • with_rollup_clause
  • withingroup_clause
  • word

vertica

Vertica SQL dialect for the columnar analytics database.

Documentation: https://docs.vertica.com/latest/en/

Configuration:

[sqruff:dialect:vertica]

Segment types (232)
  • access_object
  • access_permission
  • access_permissions
  • access_schema_object
  • access_schema_plural_object
  • access_statement
  • access_target
  • aggregate_order_by_clause
  • alias_expression
  • alias_operator
  • alter_default_privileges_grant
  • alter_default_privileges_object_privilege
  • alter_schema_statement
  • alter_sequence_options_segment
  • alter_sequence_statement
  • alter_session_statement
  • alter_table_action_segment
  • alter_table_statement
  • alter_view_statement
  • ampersand
  • array_accessor
  • array_expression
  • array_literal
  • array_type
  • back_quote
  • bare_function
  • binary_operator
  • block_comment
  • boolean_literal
  • bracketed
  • bracketed_arguments
  • caret
  • case_expression
  • cast_expression
  • casting_operator
  • colon
  • column_constraint_segment
  • column_encoding
  • column_reference
  • column_set_segment
  • comma
  • comment
  • comment_clause
  • common_table_expression
  • comparison_operator
  • compression_type
  • copy_column_options
  • copy_options
  • copy_options_for_columns
  • copy_statement
  • create_cast_statement
  • create_database_statement
  • create_external_table_statement
  • create_function_statement
  • create_index_statement
  • create_model_statement
  • create_projection_statement
  • create_role_statement
  • create_schema_statement
  • create_sequence_options_segment
  • create_sequence_statement
  • create_table_as_statement
  • create_table_like_statement
  • create_table_statement
  • create_trigger_statement
  • create_user_statement
  • create_view_statement
  • cte_column_list
  • data_type
  • data_type_identifier
  • database_reference
  • date_constructor_literal
  • date_part
  • dedent
  • delete_statement
  • describe_statement
  • disk_quota_segment
  • divide
  • dollar_quote
  • dot
  • double_quote
  • drop_cast_statement
  • drop_database_statement
  • drop_function_statement
  • drop_index_statement
  • drop_model_statement
  • drop_projection_statement
  • drop_role_statement
  • drop_schema_statement
  • drop_sequence_statement
  • drop_table_statement
  • drop_trigger_statement
  • drop_type_statement
  • drop_user_statement
  • drop_view_statement
  • else_clause
  • encoding_type
  • end_bracket
  • end_curly_bracket
  • end_of_file
  • end_square_bracket
  • escaped_single_quote
  • explain_statement
  • expression
  • fetch_clause
  • file
  • frame_clause
  • from_clause
  • from_expression
  • from_expression_element
  • function
  • function_contents
  • function_definition
  • function_name
  • function_name_identifier
  • function_parameter_list
  • glob_operator
  • grant_statement
  • groupby_clause
  • having_clause
  • identifier_list
  • implicit
  • indent
  • index_column_definition
  • inline_comment
  • insert_statement
  • integer_literal
  • interval_expression
  • join_clause
  • join_on_condition
  • keyword
  • ksafe_segment
  • lambda_arrow
  • lambda_function
  • like_operator
  • like_option_segment
  • limit_clause
  • local_alias
  • map_type
  • merge_delete_clause
  • merge_insert_clause
  • merge_match
  • merge_statement
  • merge_update_clause
  • merge_when_matched_clause
  • merge_when_not_matched_clause
  • minus
  • naked_identifier
  • named_window
  • named_window_expression
  • newline
  • null_casting_operator
  • null_equals_operator
  • null_literal
  • numeric_literal
  • object_literal
  • object_literal_element
  • object_reference
  • orderby_clause
  • over_clause
  • overlaps_clause
  • parameter
  • partitionby_clause
  • percent
  • pipe
  • placeholder
  • plus
  • question
  • quoted_identifier
  • quoted_literal
  • raw_comparison_operator
  • referenced_column_list
  • revoke_statement
  • role_reference
  • sample_expression
  • schema_privileges_segment
  • segmentedby_clause
  • select_clause
  • select_clause_element
  • select_clause_modifier
  • select_statement
  • semicolon
  • set_clause
  • set_clause_list
  • set_expression
  • set_operator
  • set_schema_statement
  • set_statement
  • sign_indicator
  • single_quote
  • sized_array_type
  • slice
  • star
  • start_bracket
  • start_curly_bracket
  • start_square_bracket
  • statement
  • statement_terminator
  • struct_literal
  • struct_type
  • table_constraint
  • table_expression
  • table_reference
  • template_loop
  • temporal_query
  • tilde
  • time_zone_grammar
  • timeseries_clause_statement
  • transaction_statement
  • transactional_statement
  • trigger_reference
  • truncate_statement
  • typed_array_literal
  • typed_struct_literal
  • unlexable
  • unparsable
  • update_statement
  • use_statement
  • user_reference
  • values_clause
  • vertical_bar
  • when_clause
  • where_clause
  • whitespace
  • wildcard_expression
  • wildcard_identifier
  • window_specification
  • with_compound_statement
  • with_data_clause
  • with_no_schema_binding_clause
  • within_group_clause_statement
  • word

We are working on adding support for more dialects in the future.