Allow to hide some queries in metadata.yml
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.5k
- Forks
- 904
- Avg merge
- 4d 17h
- Merged PRs (30d)
- 18
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how query definitions from metadata.yml are rendered and how the URL’s _hide_sql option is handled. Review the related discussion in #1824 and verify the requested precedence, including a way for users to reveal a hidden query; done means metadata-defined visibility works for both tables and queries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sql
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100