Closed jlewi closed 1 week ago
In the Configure
foldout for the respective cell, please untick interactive
as per https://docs.runme.dev/configuration/cell-level#human-friendly-output.
Interactive here means "attach a tty/terminal." Do you have any suggestions on how we can make this clearer in docs or otherwise?
Btw, you should be able to leave the mimeType
empty since Runme has a pretty accurate auto-detection of JSON, CSV, etc now.
I just checked how mime/media type detection works and realized we could technically offer a button (e.g., next to "Copy") to switch to non-interactive mode if we detect a non-plain-text media type 🤔. We could track this as a feature request. It likely would make it more "obvious" how to leverage other renderers. Thoughts, @jlewi?
Thank you. Regarding the docs; I never thought to look at https://docs.runme.dev/configuration/cell-level#human-friendly-output.
I wound up here https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.vscode-data-table Which didn't mention it.
For the docs it might be helpful to have guide sections that show how to deal with rendering e.g. in this case "How to work with JSON" or perhaps even higher level "How to work with BigQuery"
It looks like you have a bunch of how tos under the guide section but based on the titles none of them jump out to me as relevant to my problem in this case.
Thanks for the feedback! We'll take the suggestions for the docs back to the team.
I haven't been able to reproduce this consistently but in some cases it looks like I observed it being necessary to clear cell outputs and rerun the cell after disabling interactive mode. I think the steps were
bq --format=json...
A confounding factor is that it looks like the bq query
will sometimes output job stats information to stderr if the job takes a long time. I think this prevents the output from being valid JSON. Redirecting to "2>/dev/null" seems to fix that problem.
Here's a discord thread with a demo of using Data Table Renderers to render JSON output as a table.
It looks like the steps are
When I click on change cell presentation I don't see the data table renderer option. Do you know what I'm doing wrong?
https://github.com/stateful/runme/assets/777219/5cfeae5a-4572-474d-aff5-7d3748dd074a