CybercentreCanada / jupyterlab-sql-editor

A JupyterLab extension providing, SQL formatter, auto-completion, syntax highlighting, Spark SQL and Trino
BSD 3-Clause "New" or "Revised" License
83 stars 13 forks source link

Implements the json_cmt flag for Trino #102

Closed LoudCloudCrowd closed 1 year ago

LoudCloudCrowd commented 1 year ago

This allows the Trino magic to output nested structures with their proper column names instead of turning it into an array which loses information.

This also removes the aggrid output to reflect production

For example, the fix now outputs this:

col1: "some value"
col2: "other value"
nested_col:  (type: dictionary)
   struct_val1: "hey"
   struct_val2: "works"
col3: "top level value"

whereas the current -o json flag does this:

col1: "some value"
col2: "other value"
nested_col:  (type: array)
   0: "hey"
   1: "works"
col3: "top level value"