cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Clone HDI container on BTP

carlonnheim
Participant
1,657

Hi,

Is there a way to create a new HDI container instance as a copy of an existing one on BTP? This would be very useful for development purposes; we can have one main container which integrates data from other systems etc. and each developer can clone from that to do their work independently from other developers while still having access to good test data?

Thanks

//Carl

View Entire Topic
azamat_leverx
Explorer

Hi Carl,

I tried different ways to duplicate an HDI container and finally found one.

  1. Create an empty HDI container from BTP Cockpit with a unique name.
  2. Go to Database Explorer and create a database connection with the SYSTEM user.
  3. Right click on the connection and press "Export HDI Container"
  4. Select the HDI container which you want to duplicate and press "Prepare HDI Container for Download"
  5. Wait until the status is "SUCCESS" and press the little glass icon

  6. Copy the name of the temporary export table (from browser dev tools)

  7. Open SQL Console and run this command and wait a while:
  8. CALL _SYS_DI.IMPORT_CONTAINER_FOR_COPY
    ('C2', CURRENT_SCHEMA, 'EXPORT_TABLE_NAME', _SYS_DI.T_NO_PARAMETERS, ?, ?, ?); 
  9. Delete the Export table by clicking the little trash icon.

Note "C2" that is the name of your new container, and "EXPORT_TABLE_NAME" is the name of your Staging Table.

If you do not specify the schema name while creating your HDI container in parameters JSON, you have to look up a generated name from the credentials.

This was the only way that didn't break "@sap/hdi-deploy" deploy, because it also imports C2#DI HDI schema with database artifacts objects.

carlonnheim
Participant

Looks really promising, many thanks for sharing!