Save LOB doesn't work
Right-clicking on a LOB column and choosing 'Save LOB...' brings up the file chooser to choose the file to save the LOB in, but nothing actually gets saved. I set the maximum LOB size to larger then the LOB field but that didn't fix anything. I've tried both with the release Datagrip 2017.1 and the latest EAP 2017.2.
Please sign in to leave a comment.
Hi,
Could you provide example DDL, specify your database and jdbc driver and specify the file you're trying to save?
Thank you.
SQL Server (Microsoft) driver - 6.0.8112.100
SQL Server 2012
The file is a gzipped PDF.
The field is defined like this: 'compressedBinaryObjectLOB image'
Double-clicking on the field gives a hex dump that can be scrolled through. Right-clicking and choosing 'Save LOB...' gives you a file save selector but then does nothing. No file is saved.
Hi,
A possible fix will be available in DataGrip 2017.2 RC2 or in DataGrip 2017.2.
Thank you
DataGrip 2017.2 RC2 fixed the problem. The LOB saves now.
This seems to be broken again - using PyCharm 2020.3.3 with PostgreSQL 11 (Amazon Aurora).
Trying to save a big json value from a field.
@... please send us IDE logs or at least error you got when saving. along with a size of 'big value'.
@... thanks for getting back to me. It was a 244kb JSON object. I got no error - just status message "0 rows returned" and no content in the file.
Is there a how-to somewhere on isolating relevant logs for the action, or enabling a debug mode whilst I do it?
Thanks
Nick
If you switch to 'output' tab there should be a query executed. what's there?
please reproduce the issue and attach database.log file from Help -> Show SQL log.
also it would be nice to see table DDL and example of json that won't be saved.
There's no table DDL as such (or at least, a lot). The JSON column is produced by a procedure. It returns a single column/row with JSON.
Same thing from SQL Log:
When I click on "save lob" I get the file dialogue, then the status message says '0 rows retrieved' (the original query shows 1 row, which is correct).
I have just tried saving a JSONB LOB from a simple select on a table - that worked, and I get the status message in the bottom right of the screen - I also note the execution says '1 row retrieved'.
So, is it possible this just doesn't work with functions? I tried this:
...and got the same behaviour as direct from the function (i.e. no rows retrieved).
Then I tried this:
..and bingo, lob file created successfully.
Not such a horrible workaround - is it to do with how the IDE tries to uniquely identify the row it wants for the second query?
I like this feature because it lets me temporarily grab a bigger lob than the IDE is configured to show in the result grid. That works fine with this workaround.
IDE has several issues with Save LOB functionality.
Could you vote and comment to the issue https://youtrack.jetbrains.com/issue/DBE-11429?