interactive icon indicating copy to clipboard operation
interactive copied to clipboard

Bug: KQL `dynamic` renders as `<null>` in KQL Polyglot Notebook

Open asilverman opened this issue 1 year ago • 0 comments

Describe the bug

I encountered an issue while working with Polyglot Notebooks using KQL. When using dynamic literals.

Image

I would expect the result to show me the actual values (as shown in the Kusto Web Explorer image below), but it doesn't.

Image

Reproduction Steps

  1. Install the Kql nuget dependency to use Kql magic commands
#r "nuget:Microsoft.DotNet.Interactive.Kql, *-*"
  1. Connect to some cluster
#!connect kql --kernel-name "my-cluster" --cluster "https://my-cluster.kusto.windows.net" --database "myDatabase"
  1. Run
#!kql-my-cluster
let SampleTable = datatable(DynamicColumn: dynamic)
[
    dynamic({"a": 1, "b": {"a": 2}})
];
// Query the let-defined table
SampleTable

Please complete the following:

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):

Image

  • OS
    • [x] Windows 11
  • Frontend
    • [x] Visual Studio Code

Extension Details

Name: Polyglot Notebooks
Id: ms-dotnettools.dotnet-interactive-vscode
Description: Polyglot Notebooks for VS Code. Use multiple languages in one notebook with full language server support for each language and share variables between them.
Version: 1.0.6070011
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-interactive-vscode

Additional Information:

It appears that using the KQL tostring() funciton does work, which indicates the object is indeed not null (as shown in the image below)

Image

asilverman avatar Jan 23 '25 00:01 asilverman