Add ability to export data from results as CSV.
Reassigned to new owner.
vote +1: this is sth I just missed too :) have to start sqldeveloper just for that ....
Created attachment 143513 [details]
I did some work on this a while ago and now I got so far, that I have an early prototype, that does some real work. Please see here:
- Import/Export filters for conversion of DB-Representation => Text representation and vice-versa
- ability to configure IDE wide presets for imports/exports - including:
- CSV Parameters
- Column-Type to converter/config mapping
- A basic task that demonstrates integration into the database explorer (installing the modules gives a new Table context menu entry "Export tables") which then allows to export these tables
- Integration into the ResultSet-Displayer (Export visible data / Export all data for select)
- Split into a core and a gui part
- make it work with more databases (should work with all databases supporting LIMIT/OFFSET for client side paging)
- better usability
- implement import
- ability to save export/import configurations
- it runs in the foreground, as the netbeans infrastructure currently does not allow me to get a seperate db-connection
In all fairness I don't know how much time I will throw at this. This currently would only work as either a module inside netbeans (if I remember correctly, most needed APIs are friend-only) or at least tightly coupled with netbeans. Infrastructure changes are required (partly a reiteration of the ToDos):
- db.dataview needs to offer a hook to get the currently executed SQL, add contextmenu-entries and access the current resultset/pseudo resultset
- DatabaseConnection in db needs to offer a way to establish a secondary sql.Connection, that is decoupled from the primary one
- the way SQL generation works needs to looked at again (for example by integrating hibernate dialects as basis), as the current base seems to be neither exposed nor large enough to cover this.
Created attachment 143537 [details]
Prototype build v2
Can you publish your code on plugins.netbeans.org?
I also miss this feature but dont' want to install the NetBeans SDK "harness" think ant seems to need.
thank you for your interest. But I won't publish this as a final product. It'll fail in so many cases, that it won't be a good plugin in the current state. What I could do is convert the sources to be maven based. This could make it easier to build.
But attached to this bug, that should be installable.
*** Bug 72689 has been marked as a duplicate of this bug. ***
We really need such feature as here: https://www.jetbrains.com/datagrip/features/importexport.html
scroll to export and see what DataGrip does. It can export to CSV, HTML Table, JSON, SQL with inserts or updates etc. and not only for the result. For result, for data structure for the table, database (I think so) and so on.