Skip to content

Instantly share code, notes, and snippets.

@fithisux
Last active January 21, 2026 15:15
Show Gist options
  • Select an option

  • Save fithisux/748e4e09f9a98d7969086c753d6028b9 to your computer and use it in GitHub Desktop.

Select an option

Save fithisux/748e4e09f9a98d7969086c753d6028b9 to your computer and use it in GitHub Desktop.
Null json
%sql
SELECT
*,
to_json(struct(* except (object_id, sample_id))) as xxx
FROM
VALUES ('A1', 2, null, null), ('A2', 3, null, null) tab(object_id, sample_id, feature_1, feature_2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment