4 Replies Latest reply: Nov 27, 2011 10:11 AM by Tomas Krojzl RSS

HANA Import from/Export to current client

Mychajlo Wolowyk
Currently Being Moderated

Hello Comunity,

When I'm trying to import CSV data to my HANA Database then I get an error that the path specified cannot be found. The path exists on my current client(application) and the database is on the remote database server.

 

Is it not possible to import data remote?

 

I have also tried to export data from database server and when I choose export table to current client with local location, I get an error " SAP DBTech JDBC: [259]: invalid table name: #IMPORT_EXPORT: line 1 col 20 (at pos 19)"

 

Where can I find the export script? Have you any idea how can I solve this problem?

 

Thank you.

 

Michael

 

Edited by: Mychajlo Wolowyk on Nov 26, 2011 7:00 PM

  • Re: HANA Import from/Export to current client
    Tomas Krojzl
    Currently Being Moderated

    Hello,

     

    Is it not possible to import data remote?

    That is exactly your problem. IMPORT operation is happening on server and it does not matter from where the command came (if locally or remotely).

     

    If you wish to load data remotely you might use series of INSERT statements that can be executed either in HANA Studio or in hdbsql commandline interface that is part of HANA Client.

     

    I have also tried to export data from database server and when I choose export table to current client with local location, I get an error " SAP DBTech JDBC: [259]: invalid table name: #IMPORT_EXPORT: line 1 col 20 (at pos 19)"

     

    Where can I find the export script? Have you any idea how can I solve this problem?

    Can you please be more specific how exactly you are trying to export table? Are you using EXPORT statement or via HANA Studio? What is revision of your HANA Database and HANA Studio? What do you exactly mean by "Where can I find the export script"?

     

    Please be sure to check SAP HANA - SQL Reference Guide (page 112 - EXPORT, page 118 - IMPORT, page 119 - IMPORT FROM):

    https://service.sap.com/~sapidb/011000358700000604922011

     

    Tomas

    • Re: HANA Import from/Export to current client
      Mychajlo Wolowyk
      Currently Being Moderated

      Hello Tomas,

       

       

      That is exactly your problem. IMPORT operation is happening on server and it does not matter from where the command came (if locally or remotely).

      If you wish to load data remotely you might use series of INSERT statements that can be executed either in HANA Studio or in hdbsql commandline interface that is part of HANA Client.

       

      thank you for your answer. Of course I can use INSERT statement, but I think that INSERT is slowlier, than IMPORT or I'm wrong?

       

       

      Can you please be more specific how exactly you are trying to export table? Are you using EXPORT statement or via HANA Studio? What is revision of your HANA Database and HANA Studio? What do you exactly mean by "Where can I find the export script"?

       

      I'm exporting via hdbstudio GUI Interface.

       

      Please be sure to check SAP HANA - SQL Reference Guide (page 112 - EXPORT, page 118 - IMPORT, page 119 - IMPORT FROM):

      https://service.sap.com/~sapidb/011000358700000604922011

       

      I have SAP HANA - SQL Reference Guide, but it has only 96 pages :). And I cann't access your link, because I have not permissions. (C-user as Username doesn't work)

      • Re: HANA Import from/Export to current client
        Tomas Krojzl
        Currently Being Moderated

        Hello,

         

        thank you for your answer. Of course I can use INSERT statement, but I think that INSERT is slowlier, than IMPORT or I'm wrong?

        I did not perform any benchmarks but I would guess it is faster as no interpretation of SQL commands is required.

        But IMPORT works only when files are on server... so you need to choose.

         

        I'm exporting via hdbstudio GUI Interface.

        Then you should find the exported files again on server. Regarding the error - you need to provide more details. It is impossible to guess the cause of error without knowing what exactly were your entries.

         

        I have SAP HANA - SQL Reference Guide, but it has only 96 pages :). And I cann't access your link, because I have not permissions. (C-user as Username doesn't work)

        Well.. this means you do not have valid S-user. I am afraid I cannot help with this. If SAP is protecting these documents then there is probably reason and I am not authorized to publish them.

         

        Tomas

        • Re: HANA Import from/Export to current client
          Tomas Krojzl
          Currently Being Moderated

          Hello,

           

          another option for loading CSV files seems to be Information Composer which should allow to load the file from the end user notebook. (I am in the process of installing it so I will know more after the weekend.)

           

          However purpose of Information Composer is not to populate HANA tables - it is very likely you will not be able to influence where the table will end up and what exactly will be data definition. (Application is designed for business users with minimal technical background.)

           

          Tomas

Actions