Closed travisgan closed 1 year ago
Hi. I'm facing the same issue. "Change presentation" dialog on data result only offers text/plain as option. I couldn't find a nteract extension. What am I missing?
Running Polyglot Notebooks v1.0.3606020.
Best Regards.
The behaviour changed a while back. nteractDataExplorer and SandDanddance are no longer part of the core product. By default we will emit text/html preview and text/csv mimetypes so that custom renderers can be used.
This is the normal behaviour
Then using a custom renderer we go from this
to this
Just installing the Data Table Renderers from the VSCode Market plalce
To use nteract or sanddance load the extensions
#r "nuget: SandDance.InteractiveExtension, 1.0.74"
Then there are to options:
data[0].ExploreWithSandDance().Display();
codeFor option 1:
after the package is loaded use the following code to configure sanddace as default explorer
using SandDance.InteractiveExtension;
using Microsoft.DotNet.Interactive;
using Microsoft.DotNet.Interactive.Formatting;
using Microsoft.DotNet.Interactive.Formatting.TabularData;
DataExplorer.SetDefault<TabularDataResource, SandDanceDataExplorer>();
Now when you run the sql statements you get this
Remember to set the right output renderer
For Option 2
Run the query like this
#!sql-AdventureWorks2019 --name savedData
select TOP (50) * from Person.Person
The results will be stored using the name savedData
in a csharp cell now do
#!share --from sql-AdventureWorks2019 savedData
As it is a result set now do
savedData[0].ExploreWithSandDance().Display();
And you get
@claudiaregio we should cover this in a document
@colombod Thank you for your great helpful response.
@colombod thank you for the clarification. how do you exactly get to this data table view in your example? is that from nteract extension and how do you load that as default data explorer (instead of the sanddance example graphical view)?
Never mind. The data table renderer extension will show that view as long as the correct right output renderer is selected. Thanks.
.NET Interactive © 2020 Microsoft Corporation Version: 1.0.355307+4cc71ae4e275fd80852b9c2faa317bc3a0033d2c Library version: 1.0.0-beta.22553.7+4cc71ae4e275fd80852b9c2faa317bc3a0033d2c Build date: 2022-11-28T21:03:16.1596190Z https://github.com/dotnet/interactive
When executing a sql query, the result is rendered in a plain table (like html table). For example,
!sql-mydb
select * from sys.databases
As opposed to multiple 'older' video showcase, the demo always shows that sql query rendered in nteract data explorer. https://youtu.be/938jBJ-tK3c?t=1134 https://youtu.be/m5d6pG_R05M?t=1186
At one point in the first video, @jonsequitur mentioned that by default sql result should be rendered with nteract data explorer. Not sure if anything has changed since then or is there anything additional need to be installed or configured to have the sql query result in a better/richer format (eg. nteract data explorer)?