Skip to content

Instantly share code, notes, and snippets.

@fithisux
Created January 21, 2026 14:43
Show Gist options
  • Select an option

  • Save fithisux/8a097ce5196484ad470a30ddc91dfe4f to your computer and use it in GitHub Desktop.

Select an option

Save fithisux/8a097ce5196484ad470a30ddc91dfe4f to your computer and use it in GitHub Desktop.
Jsonize
SELECT
*,
to_json(struct(* except (object_id, sample_id))) as xxx
FROM
VALUES ('A1', 2, 1, 5), ('A1', 1, 1, 5), ('A2', 3, 3, 7), ('A1', 3, 2, 6) 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