Re:Run SQL on JSON files without any data loads
by tantalor on Friday May 31, 2013 @03:16PM
(#5800742)
How is this "without any data loads"? You have to map each file to a database table and then execute SQL against that database. Isn't that exactly what "loading into a database" means?
[ Parent
| on HN ]
Re:Run SQL on JSON files without any data loads
by femami on Friday May 31, 2013 @03:29PM
(#5800830)
Loading into database usually means transforming the data such that the data is stored as database's internal format. For example, using "LOAD DATA ..." in MySQL or "COPY ... FROM ..." in PostgreSQL.
Here, you aren't storing the data in the database. You don't have to take any additional action to sync the file and db when you add rows to the file, so it's not loaded into the database.
Re:Run SQL on JSON files without any data loads
by cwsteinbach on Friday May 31, 2013 @03:50PM
(#5800967)
Another benefit of this approach is that it allows you to save storage space by eliminating the need to create a copy of the JSON data in the DB's own internal format.
Re:Run SQL on JSON files without any data loads
by siddboots on Friday May 31, 2013 @07:36PM
(#5801887)
> You have to map each file to a database table and then execute SQL against that database.
The create statement is just a declaration, and doesn't load data into a postgres table. Instead, it just tells postgres how to access the file. So if I then do a query that is limited to the first few rows, it will only ever need to read the first few "rows" of the file.