Giter Club home page Giter Club logo

Comments (4)

ajete avatar ajete commented on May 21, 2024

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

from sqliteviz.

lana-k avatar lana-k commented on May 21, 2024

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.

from sqliteviz.

twoxfh avatar twoxfh commented on May 21, 2024

@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;

from sqliteviz.

lana-k avatar lana-k commented on May 21, 2024

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

from sqliteviz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.