How to execute a copy command with NATIVE keyword

Hello All,

I am trying to execute the following command. Please let me know how can I execute it correctly.

copy cdr_p_bus_sum.hp_export_alt from 'C:\Users\prasan\export\hp_export-2.txt' NATIVE;ERROR 4368:  Permission denied for storage location [C:\Users\prasan\export\hp_export-2.txt]

Comments

  • Hi Prasanna, 

    If you are loading a file from 'C:\' that means that the data is in the client not in the server, to start for that you should be using COPY LOCAL no COPY. If you are using copy local, NATIVE file formats are not supported with COPY LOCAL. Why you want to use a NATIVE file? is this NATIVE format? 

    Eugenia

  • Hi Eugenia.

    I don't understand native file formats very well. The reason I am trying it out is due to my issue with loading a text with text tab delimited data: https://community.vertica.com/vertica/topics/loading_text_file_into_vertica_and_finding_an_issue_with_spaces_between_the_values_in_columns


    I felt like this file may be in native format. Can you help me check if this file is in native format? Do you have an example file and command?

    Can  you confirm if I truly need native file here?
    Thanks,
    Prasana
  • Hi Prasana,

    To answer your question:  This file is not in NATIVE format.  NATIVE format is a custom binary Vertica format; it is not readable by a text editor, nor to my knowledge by any mainstream software other than Vertica.  The most common way to get data in NATIVE format is to read the low-level NATIVE spec in our documentation and write code to generate the format.  (We also use the format internally in a few places, etc.)

    The advantage of NATIVE is performance -- it is much quicker for Vertica to load, and somewhat faster for third-party programs to generate programmatically, so it can be useful for custom applications that are CPU-limited and need extremely high COPY throughput.

    I unfortunately can't see the PNG image attached to your previous post.  Your COPY statement looks correct for the data in question; the file does look like it's compatible with our default ("DELIMITED") format, with the appropriate option passed in for DELIMITER as you have done.  A completely wild guess, since I can't actually see what you're worried about -- if you're querying in vsql, does it help to start vsql with "vsql -tA" when querying your data?

    Adam
  • Hi Adam,

     

    What is the performance difference between data loading in native binary format and data loading in a text or CSV format? I would like to be able to export and load data in the native binary format but cannot find any way to export data from Vertica (I use the community edition) in the native binary format.

     

    Adam

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file