How to Import & Export Data from HANA Studio Tutorial
โก Smart Summary
Import and Export options in SAP HANA Studio move tables, information views, landscapes and complete delivery units between systems, so developers can promote content from a development server to quality assurance and production.
The Import and Export options of SAP HANA provide features that move tables, information views and a complete landscape to another system, or to a different location on the same system.
Both actions are started from the File menu of SAP HANA Studio, and the wizard that opens groups every object type into the same two families: SAP HANA, which covers catalog and landscape objects, and SAP HANA Content, which covers repository packages and delivery units. The two sections below walk through each direction in turn.
How to Export Data From SAP HANA?
STEP 1) Go to the File menu and choose Export.
The File menu of SAP HANA Studio lists Export directly under the Import entry, as the screenshot shows.
A pop-up for Export is then displayed.
Two families of Export options for SAP HANA objects are offered, and each family holds its own set of wizards.
SAP HANA
- Catalog Objects: Used to export catalog objects such as a table, a view or a procedure.
- Landscape: Used to export a landscape from one system to another.
SAP HANA Content
- Change and Transport System (CTS): Used to export an information view through an ABAP program.
- Delivery Unit: A delivery unit is a single unit. This option is used to export multiple packages that are mapped to one delivery unit.
- Developer Mode: This option can be used to export individual objects to a location in the local system.
- SAP Support Mode: This can be used to export the objects together with their data for SAP support purposes.
The Export wizard presents both families in a single selection tree, as shown below.
After an option is selected, the wizard asks for the objects to be exported and for the target location, which can be a folder on the SAP HANA server or a folder on the local client. Content produced by SAP HANA modeling, such as an attribute view or a calculation view, always travels as content rather than as a catalog object.
How to Import Data From SAP HANA?
Import reverses the process and reads an archive, a local file or a source system into the target database.
STEP 1) Go to the File menu and choose Import.
The same File menu carries the Import entry, as the next screenshot shows.
A pop-up for the Import option is then displayed.
Two families of Import options for SAP HANA objects are offered, and the content family carries several more entries than its export counterpart.
SAP HANA
- Catalog Objects: Used to import catalog objects such as a table, a view or a procedure.
- ESRI Shape Files: Environmental Systems Research Institute, Inc. (ESRI) shapefile format is used to store geometry data and attribute information for the spatial features in a data set.
- Landscape: Used to import a landscape from one system to another.
SAP HANA Content
- Data From Local File: Used to import data from a .csv, .xls or .xlsx file into a table.
- Delivery Unit: A delivery unit is a single unit. This option is used to import multiple packages that are mapped to one delivery unit.
- Developer Mode: This option can be used to import individual objects from a location in the local system.
- Mass Import of Metadata: This can be used to import the metadata of many objects at once.
- SAP NetWeaver BW Models: This can be used to import BW models into SAP HANA.
- Selective Import of Metadata: This can be used to import the metadata of single objects into SAP HANA.
The Import wizard lists all of these entries in one tree, as the screenshot below shows.
Export and Import Data Using SQL Statements in SAP HANA
The Studio wizards are convenient for a single transport, but a repeatable migration is easier to run from a SQL console. The SAP HANA SQL engine exposes the same catalog behaviour through the EXPORT and IMPORT statements, which can be scheduled, scripted and kept under version control.
The documented form of both statements places the object list first and the storage path after the format keyword.
-- Statement forms published in the SQL reference EXPORT <object_name_list> AS <format> INTO <path> [WITH <options>] IMPORT <object_name_list> [AS <format>] FROM <path> [WITH <options>] -- Export two tables of schema DHK_SCHEMA in CSV format EXPORT "DHK_SCHEMA"."PRODUCT", "DHK_SCHEMA"."PURCHASE_ORDER" AS CSV INTO '/usr/sap/HDB/HDB00/work/export' WITH REPLACE THREADS 4; -- Export every object of one schema in binary format EXPORT "DHK_SCHEMA"."*" AS BINARY INTO '/usr/sap/HDB/HDB00/work/export'; -- Import the objects again and rename the target schema IMPORT "DHK_SCHEMA"."*" FROM '/usr/sap/HDB/HDB00/work/export' WITH REPLACE RENAME SCHEMA "DHK_SCHEMA" TO "DHK_TEST";
Two export formats are available, and the choice affects both speed and portability.
| Aspect | BINARY | CSV |
|---|---|---|
| Supported store | Column store tables, procedures and sequences | Column store and row store tables |
| Readable outside SAP HANA | No, the files are internal | Yes, any text editor or loader can read them |
| Import behaviour | Existing table data is overwritten | Rows are appended unless REPLACE is used |
| Typical use | System to system copies on the same release | Hand-over to another database or to an analyst |
Useful options on the statements include REPLACE to overwrite an existing target, CATALOG ONLY to move definitions without rows, DATA ONLY to move rows into an existing definition, THREADS to raise parallelism, and RENAME SCHEMA to land the objects in a different schema. The full option list is published in the SAP HANA SQL reference guide.
Privileges Required for Import and Export in SAP HANA
An export or import that fails immediately with the message insufficient privilege: Not authorized is almost always an authorisation problem rather than a syntax problem, so the required grants are worth checking first.
- EXPORT system privilege: Required before any catalog export runs, and granted separately from object access.
- IMPORT system privilege: Required before any catalog import runs.
- SELECT on the source objects: Needed in addition to EXPORT, because the statement reads the rows that it writes out.
- INSERT on the target objects: Needed in addition to IMPORT, because the statement writes rows into the target table.
- Package privileges: Needed for a delivery unit or developer mode transport, since those objects live in the repository rather than in a schema.
The delivered CONTENT_ADMIN role already carries EXPORT and IMPORT, which is why administrators often reach for it during a one-off transport. A dedicated role is safer for day-to-day work, and the same reasoning applies to every other grant discussed in SAP HANA security. Where an exported view also carries row-level restrictions, the target system needs matching analytic privileges before users see any data.
Import and Export in SAP HANA Cloud and the Database Explorer
SAP HANA Studio is an on-premise Eclipse client, and it is not the tool used with SAP HANA Cloud. The equivalent work there is done in the SAP HANA database explorer, which is opened from SAP HANA Cloud Central or from SAP Business Application Studio.
- Data export and import: Works with the contents of one table or view at a time.
- Catalog export and import: Works with several objects at once, can include functions and procedures, and includes the SQL needed to recreate each object.
- Cloud storage: Export and import can address Amazon S3, Azure Blob storage or Google Cloud Storage instead of a file system on the database host.
- Repository content: Delivery units belong to the classic repository, which was deprecated with SAP HANA 2.0 SPS 02, so cloud projects are transported as multi-target application archives built in SAP Business Application Studio instead.
The EXPORT and IMPORT statements themselves remain available in SAP HANA Cloud, so a script written against an on-premise system usually needs a new storage path and a credential object rather than a rewrite. A step-by-step walkthrough of the cloud tooling is published in the SAP developer tutorial on the database explorer.




