avatar image
Former Member

EXPORT STATEMENT IN HANA DOES NOT EXPORT the CSV FIle

Hello,

Am trying to export the data of a calculation view to a directory using Export statement which as follows.

Command runs successfully in HANA SQL,But when i look at the directory i cant find any csv file.

EXPORT "_CALC_VIEW_PATH" AS CSV INTO 'tmp' WITH REPLACE NO DEPENDENCIES THREADS 2 NO STATISTICS;

AM i missing anything here.

Just noted one thing if you use physical table instead of calculation view then the csv file gets generated.

Is it that Calculation view export to csv is not supported?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Jun 06, 2017 at 10:11 AM

    What you're missing is that the export statement exports table data and view definitions and not resultsets of selects against views, tables or functions.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 07, 2017 at 05:47 AM

    Hi Lars,

    Thanks for replying !!.

    Am referring the below link for the Export statement.

    https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/2.0.00/en-US/20da0bec751910148e69c9668ea3ccb8.html

    In the above link for Export statement it says as follows

    Description

    The EXPORT command exports tables, views, column views, synonyms, data statistics objects, sequences, or procedures in the specified format as BINARY or CSV.

    Data stored in "no logging" tables can only be exported in CSV format. For global temporary tables, only the table catalog can be exported. The export of local temporary tables is not supported.

    So as I understand from this the csv export would be data only for the different objects specified above.

    Correct me if my understanding is correct or not

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 07, 2017 at 05:53 AM

    Hi Lars,

    Thanks for the reply!!

    Am referring the below document

    https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/2.0.00/en-US/20da0bec751910148e69c9668ea3ccb8.html

    As per the document

    Description

    The EXPORT command exports tables, views, column views, synonyms, data statistics objects, sequences, or procedures in the specified format as BINARY or CSV.

    Data stored in "no logging" tables can only be exported in CSV format. For global temporary tables, only the table catalog can be exported. The export of local temporary tables is not supported.

    So as I understand from above the csv export will be data only.

    Correct me if my understanding is correct.

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

    • The export of a calc view would consist of the view definition and the dependent objects, i.e. the used tables and the data in the tables. With that you can recreate the view in another system - it's just not the export of the result of a query against the view.

  • Jun 07, 2017 at 11:38 AM

    The export of a calc view would consist of the view definition and the dependent objects, i.e. the used tables and the data in the tables. With that you can recreate the view in another system - it's just not the export of the result of a query against the view.

    Add comment
    10|10000 characters needed characters exceeded

Skip to Content