by cube2222 · 7y ago · 0 comments
The motivation behind this project is that I always wanted a simple commandline tool allowing me to join data from different places, without needing to set up stuff like presto or spark. On another hand, I never encountered any tool which allows me to easily query csv and json data using SQL (which at least in my opinion is fairly ergonomic to use).
This started as an university project, but we're now continuing it as an open source one, as it's been a great success so far.
Anyways, feedback greatly requested and appreciated!
This exactly describes Drill (https://drill.apache.org/) which can query any data source under the sun (RDBMS, NoSQL, files, clusters, serialized data (JSON, CSV, Parquet...), object storage (S3, OpenStack, ...)) using SQL and JOIN between them with pushdown optimizations. It's got an awesome CLI and can be used in any language via REST or JDBC.
Is there a way to connect this to other databases, to basically have views of your redis/MySQL/other databases in postgres?
https://www.postgresql.org/docs/11/contrib-dblink-function.h...
I used to work for a company that made a data federation software platform. I am always surprised that people forget that management of external data is part of the SQL standard actually - SQL/MED ("SQL Management of External Data") [1]!
What would be the best way to use the data from a huge Excel file into my web apps?
Currently I'm converting it to CSV and use `BULK INSERT` with MSSQL. I know that with MSSQL I can also use Excel files as "external database" but AFAIK, Excel files are not indexed and are super slow when used as an "external database".
I wouldn't mind switching to Postgres. I actually prefer Postgres.
https://www.cybertec-postgresql.com/en/tech-preview-improvin...
As a decades-long user of MSSQL guy who is getting sick of being rpeatedly done over by MS, could you explain why you prefer postgres? That would be incredibly interesting, TIA
> could you explain why you prefer postgres?
I don't have many reasons to be honest. Both MSSQL and Postgres are fine I guess but I like that Postgres is open source and so I can use it in personal projects for fun.
I guess the thing I hate the most about MSSQL is that, at work, we never have the latest version, because why pay again. And every single time I search how to do something I must use the less optimal way since the new way only works on the latest version.
At least with Postgres I can always run the latest version.
I like both of them personally. Postgres didn't used to have as strong of a showing on Windows, and not as fancy tools as Management Studio/Query Analyzer/Azure Data Studio, but I think today Postgres is absolutely viable to replace SQL Server if you want to switch to open source.
http://www.postgresqltutorial.com/import-csv-file-into-posgr...
Use "EXPLAIN VERBOSE" before your query to get more info.
https://blog.hasura.io/remote-joins-a-graphql-api-to-join-da...
It's a great start with tons of directions you can take it, and many interesting challenges along the way - keep up the good work!
Tools I've written so far include:
https://github.com/simonw/csvs-to-sqlite - convert CSV files to a SQLite database
https://sqlite-utils.readthedocs.io/en/stable/cli.html - convert JSON files
https://github.com/simonw/db-to-sqlite - export data from any SQL database supported by SQLAlchemy (e.g. MySQL and PostgreSQL) into a SQLite file
More tools here: https://datasette.readthedocs.io/en/stable/ecosystem.html#to...
The end goal is to have databases I can load up in my Datasette web application tool so I can run SQL and export the results as JSON/CSV: https://datasette.readthedocs.io/
However, we're aiming for datasources which are either too big to download or change frequently, so also have very different goals really. (the same SQL for everything inspiration though!)
https://www.altinity.com/blog/2019/6/11/clickhouse-local-the...