Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web console: enable copy data as inline SQL (via VALUES) #16458

Merged
merged 9 commits into from
May 22, 2024

Conversation

vogievetsky
Copy link
Contributor

@vogievetsky vogievetsky commented May 15, 2024

This PR let's you copy the results of a query as a DruidSQL statement.

image

Produces:

SELECT
  CAST("c1" AS VARCHAR) AS "channel",
  CAST("c2" AS VARCHAR) AS "cityName",
  DECODE_BASE64_COMPLEX('thetaSketch', "c3") AS "user_theta"
FROM (
  VALUES
  ('ca', NULL, 'AQMDAAA6zJOcUskA1pEMGA=='),
  ('de', NULL, 'AQMDAAA6zJP43ITYexvoEw=='),
  ('de', NULL, 'AQMDAAA6zJNtue8WOvrJdA=='),
  ('en', NULL, 'AQMDAAA6zJMruSUUqmzufg=='),
  ('en', NULL, 'AQMDAAA6zJM6dC5sW2sTEg=='),
  ('en', NULL, 'AQMDAAA6zJM6dC5sW2sTEg=='),
  ('en', NULL, 'AQMDAAA6zJPqjEoIBIGtDw=='),
  ('en', 'Caulfield', 'AQMDAAA6zJOOtGipKE6KIA=='),
  ('fa', NULL, 'AQMDAAA6zJM8nxZkoGPlLw=='),
  ('vi', NULL, 'AQMDAAA6zJMk4ZadSFqHJw==')
) AS "t" ("c1", "c2", "c3")

This includes a hack around #16456

@vogievetsky vogievetsky merged commit 0ab3b34 into apache:master May 22, 2024
12 checks passed
@vogievetsky vogievetsky deleted the copy_as_values branch May 22, 2024 15:33
ektravel pushed a commit to ektravel/druid that referenced this pull request May 29, 2024
* copy as values

* address NULL issue

* add decription

* extend test

* fix json

* more types

* fix braces with nulls

* fix test

* update functions to scan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants