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

Allow to hide some queries in metadata.yml #1968

Open
CharlesNepote opened this issue Dec 20, 2022 · 0 comments
Open

Allow to hide some queries in metadata.yml #1968

CharlesNepote opened this issue Dec 20, 2022 · 0 comments

Comments

@CharlesNepote
Copy link

By default all queries are displayed.

But there are many cases where it would be interesting to hide the queries by default:

  • the website is targeting non-tech people
  • the query is veeeeeery long (eg.)
  • reading the query is not important for the users, they only want to see the result

Of course, the user still could have the option to see the query.

It could be an option in the metadata file:

databases:
  awesome_db:
    tables:
      products:
        hide_sql: true
    queries:
      great_query:
        hide_sql: true
        sql: select * from products where code = :barcode

The priority could be:

  • no option in the metadata and nothing in the URL: query displayed
  • hide_sql in the metadata and nothing in the URL: query displayed as asked in the metadata
  • hide_sql in the metadata and &_hide_sql= in the URL: query as asked in the URL

See also: #1824

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant