Refactor export; make adapter-agnostic
matsonj opened this issue · 4 comments
Describe the bug
When connected to a database (in my case, SQL Server) with the odbc driver, you cannot export data with ctrl+e, even though the data is clearly exposed in the interface.
To Reproduce
- connect to harlequin with odbc connector
- run any query
- press "ctrl+e" to export the data
- you will get an error
Expected behavior
data exports as csv.
Actual behavior
you get this error.
Additional context
What database adapter are you using with Harlequin? ODBC
Can you tell us more about your system?
- Shell: Powershell
- Terminal: Windows Terminal
- OS of the shell: Windows 11 (native)
- OS of the terminal (if different from the shell):
Yeah this is expected for now. I actually think I'm going to change the whole export thing to just export the data in the table, since we already have that locally in Arrow. Would that work for you or do you expect something closer to a COPY TO statement?
Yeah I don't think 'copy to' is the right path. Since the data is already in arrow locally, it's makes more sense to me to use those libraries to export to csv etc.
Yeah, ok that's good validation. In the meantime, ctrl+a and ctrl+c will work for datasets that aren't too huge.