cancel
Showing results for 
Search instead for 
Did you mean: 

Export a single table definition

patrickbachmann
Active Contributor
0 Kudos

Hi folks,

I have an attribute view that was built from a manually created table which had values imported from a CSV.  This is in our development hana environment and I want to now export the attribute view (that utilizes this custom table) from DEV and import into our STG.  Moving the view through the landscape is no problem for me but my question is about moving the table itself.  I noticed an option in EXPORT that allows you to export catalog objects such as schemas.  But my understanding is that you can only export an ENTIRE schema (and thus ALL tables in the schema) and not simply one single table from the schema.  The problem is this table exists in same default schema as all of our SLT replicated tables so obviously we don't want those exported/imported. 

My question to you is this;  1) is it possible to export a single table definition?   2) If I must export an entire schema, how would others handle custom tables like this?  For example would you create a separate schema just to contain custom tables?  And then export those?

Thanks!

-Patrick

Accepted Solutions (1)

Accepted Solutions (1)

duncanspeidel
Advisor
Advisor
0 Kudos

Hi Patrick,

I just tried this for revision 41.  My schema name is SBODEMOUS and my table name is AAC1.  I was able to right click on the table and select export.  In the export dialog I entered AAC1 and it was available to be exported.  I think for import to work the schema the table comes from must exist on STG.

Hope this helps!

Cheers,

D

patrickbachmann
Active Contributor
0 Kudos

Hi Duncan,

When I attempt to export catalog objects I am allowed to type in the name of a schema and it will appear however no child objects appear underneath.  ie:  If I search for my schema named AcmeSchema in left of dialog box I can then drag it to the right area of dialog box and the name that appears is AcmeSchema.*

Note the wildcard asterisk character (*) at the end indicating everything will be exported.  I can't seem to get a list of tables to appear to pick a single table.

-Patrick

patrickbachmann
Active Contributor
0 Kudos

Sorry Duncan, I was doing via CONTENT/Export option in the Quick Launch area.  But I just tried right-clicking the actual table name and it seems to be working!  Let me see if I can get it fully export now and update this post afterwards...

patrickbachmann
Active Contributor
0 Kudos

Duncan I tried your method but it seems to just be exporting the data within the table and not the actual table definition.

former_member184768
Active Contributor
0 Kudos

Hi Patrick,

I am not sure if I got your issue correctly, but if you can get the table content and need the table definition, why not use the Generate SQL option for the "Create table" script and run it again on the target database and then use the import data option to fill it up.

Just a thought.

Regards,

Ravi

patrickbachmann
Active Contributor
0 Kudos

That's a great idea Ravi.  I have done that before and I know it works.  I do like having the TGZ file though as I save all my exports into a directory so I can easily roll stuff back.  But that is a good solution and thanks for that suggestion.

Answers (0)