Exporting Data(COPY TO)


#1

Hi,

I am using MapD Community 3.2.0 version.

I have a question about exporting of CSV or TSV file.

The data in the table is float or double type and has 6 decimal places.

I exported the table data as TSV or CSV using “COPY TO”.

Checked TSV or CSV file, the 6 decimal places was recorded only 3 decimal places.

Is there an option to specify the number of decimal places in exporting?

regards.


#2

It seems that the float or double type is output only 6 numbers including integer and decimal places in exporting.

How do i increase the number of output numbers?

regards.


#3

Hi,

Sorry, currently there is no option to increase the precision of what is being written out in the csv file with a COPY TO.

A (hopefully) simple work around here would be to use a tool like squirrelsql or equivalent and have it extract the data to a file to get a more precise result.

regards


#4

Thanks dwayneberry.

I have exported table data using SQuirrel SQL Client.

But the decimal place numbers is output a little bit wrongly.

And korean is broken.

Do you know any other way to extract data in MapD?

Please advise me.

regards.


#5

Hi,

Can you tell me what you are seeing as wrong.

To use something like squirrelSQL to export data I would do the following

In global preferences change the “Data Type Control” field to the max precision you want to be able to get.
(Note: this will mean floats etc wil also have trailing precision which is not accurate as the client layer will probably cast them to double as well)

I added a some Korean text to a file and exported and see output like this

name1,i1,f1,d1
남편,1,1.111109972000122,6.789012345678901

what are you experiencing?

regards