Replies: 2 comments 3 replies
-
Hello! That would be a nice and useful feature! We already have a dependency on a csv library and the mechanisms in place to create new header components. Do you want to take a stab at implementing it? I'd always be reachable if you need help to navigate around the codebase. The first thing to look at is probably render.rs. |
Beta Was this translation helpful? Give feedback.
-
I just implemented the usage of csv as a header component, the following should work nicely on the main branch: select
'csv' as component, true as bom, ';' as delimiter, '"' as quote, '"' as escape, 'test.csv' as filename;
with recursive rec as (
select 0 as column1
union all
select column1 + 1
from rec
)
select
column1 as x,
column1 * 99999999 as y
from rec This is an infinite query (it never returns), but it works, and efficiently encodes and streams the results in csv to the user's computer. |
Beta Was this translation helpful? Give feedback.
-
Hi 👋
I was looking for a quick way to create dashboards and SQLpage looks promising!
My users also need to download big CSV results from a postgre db.
The idea is to have an endpoint (like the JSON one) that streams back a CSV file to the client.
I saw the CSV component but I would prefer to trigger the
select
query when users click on the download link and not when the html page is generated.Beta Was this translation helpful? Give feedback.
All reactions