Open archiewood opened 1 year ago
Really good to have BigQuery in VS Code, one of the only things missing for us is the ability to track the potential cost of the query (the dry run stats we would get in the GUI).
Good job with the driver, I agree it would be really useful to see potential cost of the query before running it
I'm trying to scope this effort:
src/ls/driver.ts: -Add the dryRunQuery in the BigQueryDriver class
src/extension.ts: -Handle user triggering and output. I'm thinking: https://code.visualstudio.com/api/ux-guidelines/status-bar
vscode.window.setStatusBarMessage(`Dry run: ${result.bytesProcessed} bytes`, 5000);
It will have to be executed using the command palette. At least in this first approach.
I'm thinking: https://code.visualstudio.com/api/ux-guidelines/status-bar
The status bar seems like a pretty sensible place for the output. (It's always visible unlike e.g. the extension sidebar)
It will have to be executed using the command palette.
You could also make the status bar element clickable to execute it I think?
For example, before dry run the status bar could say ► Dry Run Query
, and then change to Dry Run: 12.5GB
when clicked.
We do a similar thing in the Evidence VSCode extension
have anyone working on it?
I'm interested in working on this issue, since the scope is clear enough and I really need this feature
No, you are welcome to it!
Currently I'm still trying on several alternatives. While I could add new method into the driver.ts
, I haven't figured out how to call this method from outside driver.ts (as sqltools seems like loading the files in src/ls/*
dynamically).
I have tried importing vscode
package to use the messaging part of it, but found this error:
ERROR: Error loading plugin BigQuery Driver for SQLTools Plugin Request ls/RegisterPlugin failed with message: Cannot find module 'vscode'
can you point me to any other resources for the next step?
I'm afraid I haven't looked into this in detail, so I'm not clear on the best strategy.
I opened this issue on the main SQLtools repo, perhaps you could add some details and tag one of the maintainers?
Currently I'm still trying on several alternatives. While I could add new method into the
driver.ts
, I haven't figured out how to call this method from outside driver.ts (as sqltools seems like loading the files insrc/ls/*
dynamically).I have tried importing
vscode
package to use the messaging part of it, but found this error:ERROR: Error loading plugin BigQuery Driver for SQLTools Plugin Request ls/RegisterPlugin failed with message: Cannot find module 'vscode'
can you point me to any other resources for the next step?
Do you have your code available so I can pull it down and look into this error?
Dry run allows you to see how much data will be processed during your query