36 ms·
This is great, I've been meaning to build something similar for some time. I tried to run the queries from the tutorial but hit lots of CORS errors loading the
by gelatocar 3y ago
This is great, I've been meaning to build something similar for some time. I tried to run the queries from the tutorial but hit lots of CORS errors loading the datasets, is there any way that you have found to work around those?
- deleted 3y ago[deleted]
- tobilg 3y agoI'm sorry, I think I fixed this. Can you check? Thanks for letting me know!
- gelatocar 3y agoSorry, it seems to still be happening, running: SELECT count(*) FROM 'https://data.quacking.cloud/nyc-taxi-data/yellow_tripdata_2023-01.parquet'; Shows the error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://data.quacking.cloud/nyc-taxi-data/yellow_tripdata_2023-01.parquet https://data.quacking.cloud/nyc-taxi-data/yellow_tripdata_20.... (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200. I get the same issue in both firefox and brave edit: actually accessing that file directly gets a Access Denied error for me
- tobilg 3y agoSorry, can you please check again? https://sql-workbench.com/#queries=v0,SELECT-count(*)-FROM-'https%3A%2F%2Fdata.quacking.cloud%2Fnyc%20taxi%20data%2Fyellow_tripdata_2023%2001.parquet'~ https://sql-workbench.com/#queries=v0,SELECT-count(*)-FROM-'... Thanks!
- gelatocar 3y agoYep, looking good now, thanks! Other datasets that don't have CORS headers still don't work ie. https://sql-workbench.com/#config=%7B%22plugin%22%3A%22Datagrid%22%2C%22plugin_config%22%3A%7B%22columns%22%3A%7B%7D%2C%22editable%22%3Afalse%2C%22scroll_lock%22%3Afalse%7D%2C%22title%22%3A%22Export%22%2C%22group_by%22%3A%5B%5D%2C%22split_by%22%3A%5B%5D%2C%22columns%22%3A%5B%22ERROR%22%5D%2C%22filter%22%3A%5B%5D%2C%22sort%22%3A%5B%5D%2C%22expressions%22%3A%5B%5D%2C%22aggregates%22%3A%7B%7D%7D&queries=v0,SELECT-count(*)-FROM-'https%3A%2F%2Fd37ci6vzurychx.cloudfront.net%2Ftrip%20data%2Fgreen_tripdata_2023%2001.parquet'~ https://sql-workbench.com/#config=%7B%22plugin%22%3A%22Datag... but I'm guessing that's inherent limitation of running this without a backend
- tobilg 3y agoYes, unfortunately if the "foreign" sources don't support CORS, you'd have to use a CORS proxy... If you want to self-host, there's one at https://github.com/Zibri/cloudflare-cors-anywhere https://github.com/Zibri/cloudflare-cors-anywhere that can be deployed to CloudFlare Workers (the code is a bit messy though). GitHub supports CORS for raw data for example, that's why I put it in the sample queries.