Number format and quoted strings in CSV export

Note: please leave bug reports and feature requests on

Number format and quoted strings in CSV export

Postby ced45 » Fri Aug 28, 2015 7:44 am

Hi all,

I am using DBeaver with PostgreSQL under Linux Mint 17.2.
When I perform a resultset export in CSV format, I edit the formatting properties in order to untick "Use Grouping" property for numbers.
The sample removes spaces between numerals, which is what I expect in the final export (1234567890,012 instead of 1 234 567 890,012).
I have also seen a new property "%dataTransfer.processor.csv.property.quoteChar.name" set to ". I try to remove the double quote, in order to remove quotes around strings in the final export.

But unfortunately, both of these configurations do not work in the resulting CSV file : there are still spaces in the exported numbers, and strings remains quoted.

Is it a bug ? Or what am I doing wrong ?

Thanks for your help and thanks a lot for all the job around DBeaver.

Cheers,

Cedric
ced45
 
Posts: 4
Joined: Mon Jun 08, 2015 2:47 pm

Re: Number format and quoted strings in CSV export

Postby Serge » Fri Aug 28, 2015 8:14 am

1. You can configure numbers formatting.
Click on "Edit" button after Formatting combo:
csv_export_config.png
csv_export_config.png (12.83 KiB) Viewed 95883 times

Configure numbers formatting by disabling grouping:
numbers_formatting.png
numbers_formatting.png (18.66 KiB) Viewed 95883 times

Perform CSV export.

2. Property name "%dataTransfer.processor.csv.property.quoteChar.name" is actually a bug in resources, I'll fix it.
3. Currently it is not possible to disable quoting because it breaks CSV format. DBeaver quotes all strings which starts from numbers and all strings which contains CSV delimiters.
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: Number format and quoted strings in CSV export

Postby ced45 » Fri Aug 28, 2015 11:28 am

Thanks for your answer.

I had configured numbers formatting before my export, as mentionned in my first message.
But to take effect in the CSV file, curiosly, I had to restard DBeaver...

Other strange bug : strings are now surrounded by "n" and no more quotes. This is probably because I change the property "%dataTransfer.processor.csv.property.quoteChar.name"...
Ooops, I think I made a mistake... :oops:
ced45
 
Posts: 4
Joined: Mon Jun 08, 2015 2:47 pm

Re: Number format and quoted strings in CSV export

Postby GNunley » Wed May 04, 2016 7:13 pm

GNunley
 
Posts: 4
Joined: Wed May 04, 2016 6:57 pm

Re: Number format and quoted strings in CSV export

Postby Serge » Thu May 05, 2016 9:18 am

You can just reset option to default value (in the context menu).
If, for some reason, it doesn't work - provide more details.
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: Number format and quoted strings in CSV export

Postby GNunley » Thu May 05, 2016 1:57 pm

GNunley
 
Posts: 4
Joined: Wed May 04, 2016 6:57 pm

Re: Number format and quoted strings in CSV export

Postby Serge » Thu May 05, 2016 5:40 pm

Well, I was able to reproduce the problem. Although I still don't understand how it may happen in normal circumstances.
Fix will be added in the next version (or you can try to build from sources right now).

Quote character config resides in %HOMEPATH%\.dbeaver\.metadata\.plugins\org.jkiss.dbeaver.core\dialog_settings.xml in section "stream.csv", key "quoteChar".
What value do you have in your local config?
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: Number format and quoted strings in CSV export

Postby GNunley » Thu May 05, 2016 5:57 pm

GNunley
 
Posts: 4
Joined: Wed May 04, 2016 6:57 pm

Re: Number format and quoted strings in CSV export

Postby Serge » Tue May 10, 2016 1:35 pm

Version 3.6.7 includes fix of this issue.

In any case you don't need to build from sources.

You can just fix config. Line
<item value="" key="quoteChar"/>
must look like
<item value="&quot;" key="quoteChar"/>

Empty value is a result of some bug which I can't reproduce.
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: Number format and quoted strings in CSV export

Postby GNunley » Tue May 10, 2016 2:04 pm

Thank you very much for your help on this issue!

I downloaded and installed version 3.6.7 from this link "http://dbeaver.jkiss.org/files/dbeaver-ce-latest-x86_64-setup.exe" and this seems to have addressed my issue!

Greg
GNunley
 
Posts: 4
Joined: Wed May 04, 2016 6:57 pm


Return to Support



Who is online

Users browsing this forum: Google [Bot] and 20 guests