SAP HANA Studio Export Wizard to Generate Create SQL Statements for Database Tables
SQLScript developers can generate DDL scripts and export them to text files to create table commands easily using SAP HANA Studio Export Wizard. SAP HANA Studio Export tool not only provides Create SQL statements for tables but it is also possible to script data with table DDL command too. In addition to database tables, SQL programmers can generate Create commands for all other catalog object types like views, AMDPs, etc.
First launch SAP HANA Studio for the Export tool.
Using SAP HANA Development perspective, connect to the HANA database that you want to export Create Table DDL SQL scripts
Open File menu and choose Export option to launch SAP HANA Studio Export tool
When the Export wizard is displayed, choose the SAP HANA > Catalog Objects wizard as database developers can see in below screenshot.
This will enable SAP HANA database programmers to export all or selected catalog objects to a file system as text files containing SQL DDL commands.
Click Next to continue
By default all catalog objects are selected for Export
But SAP HANA database developers can narrow the list of catalog object to export using the filter area on the left of the screen.
If I type VBAK, all catalog objects like AMDPs (ABAP Managed Database Procedures), views or tables will be filtered and matching objects will be displayed
After the database programmer selected the catalog objects for export task, it is possible to set the export options on the following screen
First of all, if you are only interested in SQL DDL statements and data is not important at the moment, clear the "Export Data Objects Including Data" checkbox.
Scripting database tables with data will generate big files. If it is not necessary avoid scripting the data in Export wizard.
If you don't need dependencies, clear the "Including Dependencies" checkbox, too.
Export Location is also important and should be configured before you execute the Export task on SAP HANA Studio.
If you want to create the SQL statements and save them automatically on your local computer, select option "Export catalog objects to current client" and select an empty file folder on your computer using Browse button.
When you are ready to generate SQL scripts for selected SAP HANA catalog objects press Finish button to start export task
Now, if you launch the Windows File Explorer and open the file folder you have selected as target folder for exporting catalog objects, you can see info files and CREATE statement SQL files in a nested folder structure.
Generating Create statements for multiple database tables, views or other catalog objects is very fast and easy using the SAP HANA Studio Export tool. Another option for HANA database developers is to generate SQL CREATE TABLE commands for HANA database tables one by one using the Object Definition window Export SQL command as illustrated on referenced SAP HANA Studio tutorial.