vscode-db2i
vscode-db2i copied to clipboard
preview resultsets with Preview Data extension
Putting this here to see if this is a good idea or not.
Idea
Add a preview
statement qualifier that can open up the result set using the Data Preview extension: https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.vscode-data-preview
example:
preview: select * from sample.employee
This will automatically open a new Data Preview session for the result set In order to do further sorting, slicing, and charting.
Demo
https://github.com/codefori/vscode-db2i/assets/50843283/c5fc46d3-96f4-44b3-9fd5-19bf16ed018b
Split by column
Group by with metric
Charting with custom group by, metic=avg
TODO
- to use Data Preview, a file with an extension like
.json
must be opened. My workaround in the demo is to save the resultset as json in the Temp directory. - remove temp json files on system disconnect
- handle error cases