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

Add "Save as" button #16

Open
lana-k opened this issue Nov 7, 2020 · 4 comments
Open

Add "Save as" button #16

lana-k opened this issue Nov 7, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@lana-k
Copy link
Owner

lana-k commented Nov 7, 2020

No description provided.

@lana-k lana-k added the enhancement New feature or request label Nov 7, 2020
@ajete
Copy link

ajete commented Aug 4, 2021

I came across this tool and I used it but without exporting the option to csv query results I can't fully use it on a daily basis, do you know how difficult is to add if this feature?
Thanks

@lana-k
Copy link
Owner Author

lana-k commented Aug 4, 2021

Yes, I have this feature (exporting a result set into CSV) planned for one of the next versions.
Also, it would be useful to know how you are going to use this feature (and sqliteviz in general on a daily basis :-)) in order to make the right assumptions during its implementation.

@twoxfh
Copy link
Contributor

twoxfh commented Aug 12, 2021

@lana-k csv export would be great, individual column export would help too for json documents which currently are too big for table columns. Not sure how to implement with all the great pivot table changes

Example of a hierarchical query creating a json document for use in third party visualization tool:

drop table if EXISTS sales;
CREATE TABLE sales(year STRING, quarter STRING, week STRING, total INT);
INSERT INTO sales VALUES('2019', 'q1', '1', 100);
INSERT INTO sales VALUES('2019', 'q1', '2', 125);
INSERT INTO sales VALUES('2019', 'q2', '1', 200); 
INSERT INTO sales VALUES('2019', 'q2', '2', 300); 
INSERT INTO sales VALUES('2020', 'q1', '1', 400); 
INSERT INTO sales VALUES('2020', 'q1', '2', 450); 
INSERT INTO sales VALUES('2020', 'q2', '1', 500); 
WITH quarters AS (
  WITH weeks AS (
      SELECT year, quarter, json_group_object(week, total) AS week_json 
      FROM sales 
      GROUP BY year, quarter
      ) 
  SELECT year, json_group_object(quarter, json(week_json)) AS quarters_json 
  FROM weeks 
  GROUP BY year
) 
SELECT json_group_object(year, json(quarters_json)) 
FROM quarters;

@lana-k
Copy link
Owner Author

lana-k commented Sep 3, 2021

@ajete Export result set to CSV has just released (v0.16.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants