sqlfluff parse <filepaths>

Parse SQL files and just spit out the result

Arguments

NameDescription
filepathsfilepaths

Options

NameDescription
--nocolor, -nNo color - output will be without ANSI color codes
--ignore, -i <errors>Ignore particular families of errors so that they don’t cause a failed run. -–ignore behaves somewhat like noqa comments, except it applies globally
--verbose, -v
  • Repeatable ♾
  • Repeatable 5x
--exclude-rules, -e <exclude_rules>Exclude specific rules. This could either be the allowlist, or the general set if there is no specific allowlist
--rules, -r <rules>Narrow the search to only specific rules
--templater, -t <templater>The templater to use (default=jinja)
--dialect, -d <dialect>The dialect of SQL to lint
--code-only, -cOutput only the code elements of the parse tree
--include-meta, -mInclude meta segments (indents, dedents and placeholders) in the output. This only applies when outputting json or yaml
--format, -f <format>What format to return the lint result in (default=human)
--disable-noqaSet this flag to ignore inline noqa comments
--benchSet this flag to engage the benchmarking tool output
--recurse <recurse>The depth to recursively parse to (0 for unlimited)
--logger <logger>Choose to limit the logging to one of the loggers
--encoding <encoding>Specify encoding to use when reading and writing files. Defaults to autodetect
--ignore-local-configIgnore config files in default search path locations. This option allows the user to lint with the default config or can be used in conjunction with –config to only reference the custom config file
--config <extra_config_path>Include additional config file. By default the config is generated from the standard configuration files described in the documentation. This argument allows you to specify an additional configuration file that overrides the standard configuration files. N.B. cfg format is required
--write-output <write_output>Optionally provide a filename to write the results to, mostly used in tandem with –format. NB: Setting an output file re-enables normal stdout logging
--profilerSet this flag to engage the python profiler
--nofailIf set, the exit code will always be zero, regardless of violations found. This is potentially useful during rollout