mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.43k stars 291 forks source link

What's the best way to implement dry run? #1191

Open archiewood opened 11 months ago

archiewood commented 11 months ago

Is your feature request related to a problem? Please describe.

Certain cloud databases (eg BigQuery) allow you to see ahead of time how much data running a query will process. This is helpful as it gives you an idea of how much you will be billed.

Dry run also validates your SQL ahead of time to identify errors.

Context For example, in the bigquery console, it will give you this information for a valid query

image

And if your query is invalid:

image

For bigquery, you can specify a dry run either with a SQL flag ahead of the statement, or by passing a connection setting.

Other databases seem to have somewhat similar functionality available with EXPLAIN, though I am not familiar with the details

Would this feature make sense to have available for the whole SQLTools extension, or develop specifically for the BigQuery Driver?