Hi,

at the moment, the column headers in the input files define the target 
attribute names. That means if the input file contains an "ID" column, it 
will be imported as "ID" and not "_key".
So it is currently required that the input file is modified and the 
attribute name is rewritten before the file is passed to arangoimp.

But a general column renaming mechanism makes sense, so I added it to 
arangoimp. Here's the commit:

commit 7c0c84c21d5e9e0a67776498ada9658039c44d01

    added `--translate` option for arangoimp to translate attribute names 
from the input files to attriubte names expected by ArangoDB
    
    The `--translate` option can be specified multiple times (once per 
translation
    to be executed). The following example renames the "id" column from the 
input
    file to "_key", and the "from" column to "_from", and the "to" column 
to "_to":
    
        arangoimp --type csv --file data.csv --translate "id=_key" 
--translate "from=_from" --translate "to=_to"
    
    `--translate` works for CSV and TSV inputs only.

That commit is currently in our devel branch only, but it will be part of 
ArangoDB 3.2 once it is released.

Best regards
Jan


Am Freitag, 3. März 2017 05:25:22 UTC+1 schrieb Mauricio Chica Patiño:
>
> Hello, so my question is "simple", first, I have more than 100 csv files 
> each one with at least 500 Mb in size, but as they come from an external 
> source, the colum with the primary key is called ID and not _key, is there 
> any way to set that parameter in arangoimp? something like --define_key=ID 
> or any custom column?
>
> I have created a script for the importation and everything works nice but 
> I need to use the ID column as the key... is this possible or should I edit 
> the csv files??
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to