Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sqlfluff support to cloud cli doc #5715

Closed
1 task done
mirnawong1 opened this issue Jul 2, 2024 · 0 comments · Fixed by #5753
Closed
1 task done

Add sqlfluff support to cloud cli doc #5715

mirnawong1 opened this issue Jul 2, 2024 · 0 comments · Fixed by #5753
Assignees
Labels
content Improvements or additions to content improvement Use this when an area of the docs needs improvement as it's currently unclear

Comments

@mirnawong1
Copy link
Contributor

mirnawong1 commented Jul 2, 2024

Contributions

  • I have read the contribution docs, and understand what's expected of me.

Link to the page on docs.getdbt.com requiring updates

The dbt Cloud CLI now supports sqlfluff and we should add this to the docs for users so they don't install the templater and so we avoid user confusion.

This was raised by Tania in the internal slack: https://dbt-labs.slack.com/archives/C06FWKP5V28/p1719903106508059

Things to add:

  • when you run dbt sqlfluff, it picks up changes to the user's local .sqlfluff config
    • how?
  • SQLFluff is available in the latest release of Cloud CLI (0.38.4).
  • To get started, run dbt sqlfluff -h to see the list of supported commands and flags
  • sqlfluff commands in the cloud cli do not return exit codes yet
  • Use sqlfluff commands in github actions using the Cloud CLI (slack thread
  • To use sqlfluff in CICD, a dbt_cloud.yml a file will need to exist with the correct config and commands will need to be run from a valid dbt project.

Available sqlfluff flags/commands in cloud cli:

➜  jaffle-shop git:(mwong-test-cli) ✗ dbt sqlfluff -h
SQLFluff is a modular SQL linter for humans.

Usage:
  dbt sqlfluff [command]

Available Commands:
  fix         Fix SQL files.
  format      Autoformat SQL files.
  lint        Lint SQL files via passing a list of files or using stdin.

Flags:
  -h, --help   help for sqlfluff

Global Flags:
      --log-format LogFormat   The log format, either json or plain. (default plain)
      --log-level LogLevel     The log level, one of debug, info, warning, error or fatal. (default info)
      --no-color               Disables colorization of the output.
  -q, --quiet                  Suppress all non-error logging to stdout.

Use "dbt sqlfluff [command] --help" for more information about a command.

What part(s) of the page would you like to see updated?

Proposed place: https://docs.getdbt.com/docs/cloud/configure-cloud-cli#use-the-dbt-cloud-cli

Additional information

PRD for linting from the dbt Cloud CLI

@mirnawong1 mirnawong1 added content Improvements or additions to content improvement Use this when an area of the docs needs improvement as it's currently unclear labels Jul 2, 2024
@nghi-ly nghi-ly self-assigned this Jul 9, 2024
nghi-ly added a commit that referenced this issue Jul 16, 2024
## What are you changing in this pull request and why?

Provide more docs details for the linter that's available from the dbt
Cloud CLI

closes #5715 

## Checklist
- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
so my content adheres to these guidelines.
- [x] For [docs
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#about-versioning),
review how to [version a whole
page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
and [version a block of
content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content).
- [x] Needs review from product eng

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Shaver <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content improvement Use this when an area of the docs needs improvement as it's currently unclear
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants