Skip to main content
prakodi
Silver ⭐️⭐️⭐️
Jan 6, 2023 8:13 PM UTC
Solved

How to sync schemas from one region to another

Hi All,

 

Need advice, how we can export all the DDL of one scheme from Hive ( from QA region, a schema with around 2000 tables) to Dev or ACPT region, only DDL's  needed to be in sync , not worried about the data, so do we have any option or script to import / export all the DDL's from one region to another region in one go, please suggest, thank you.

 

PK

tj2007
tj2007Answer
Gold ⭐️⭐️
Jan 16, 2023 7:36 AM UTC

Hello @prakodi,

For CDH 6.3, you can review this article

https://docs.cloudera.com/documentation/enterprise/6/6.3/topics/cm_bdr_hive_replication.html

 

Hope this helps,

Tarun

 

Was your question answered? Make sure to mark the answer as the accepted solution.

If you find a reply useful, say thanks by clicking on the thumbs-up button.

6 replies

vijayshc
Gold ⭐️
Jan 7, 2023 7:32 AM UTC

You can use BDR to sync only dictionary

Translate
tj2007
Gold ⭐️⭐️
Gold ⭐️⭐️
Jan 9, 2023 5:08 AM UTC

Hello @prakodi ,

 

You can use Hive Replication to migrate the schema from one cluster to another

https://docs.cloudera.com/cdp-private-cloud-base/7.1.6/replication-manager/topics/rm-dc-hiveimpala-replication.html

 

Hope this helps,

Tarun

 

Was your question answered? Make sure to mark the answer as the accepted solution.

If you find a reply useful, say thanks by clicking on the thumbs-up button.

Translate
prakodi
prakodiAuthor
Silver ⭐️⭐️⭐️
Jan 10, 2023 3:47 PM UTC

Hi, 

 

we need to sync only few schemas, this solution is completely moving all the metastore from one region to another region. Just for one schema which contains 100's of tables, we want to  sync the DDL's to another region.

 

 

 

Translate
tj2007
Gold ⭐️⭐️
Gold ⭐️⭐️
Jan 11, 2023 6:16 AM UTC

Hello @prakodi,

Thanks for your response!

 

You do have the option to select a single database in the general tab while creating hive replication policies. In the Replicate All parameter you can mention the single database.

 

Refer to this article: 

https://docs.cloudera.com/cdp-private-cloud-base/7.1.6/replication-manager/topics/rm-dc-configuring-replication-of-hiveimpala-data.html

 

Hope this helps,

Tarun

 

Was your question answered? Make sure to mark the answer as the accepted solution.

If you find a reply useful, say thanks by clicking on the thumbs-up button.

Translate
prakodi
prakodiAuthor
Silver ⭐️⭐️⭐️
Jan 12, 2023 12:49 AM UTC

Hi Tarun,

 

This solutions looks fine, but unfortunately we are still using CDH6.3 version only, so we dont use Ranger, so is there any option for CHD 6.3 version ?

 

Thanks,

PK

Translate
tj2007
Gold ⭐️⭐️
tj2007Answer
Gold ⭐️⭐️
Jan 16, 2023 7:36 AM UTC

Hello @prakodi,

For CDH 6.3, you can review this article

https://docs.cloudera.com/documentation/enterprise/6/6.3/topics/cm_bdr_hive_replication.html

 

Hope this helps,

Tarun

 

Was your question answered? Make sure to mark the answer as the accepted solution.

If you find a reply useful, say thanks by clicking on the thumbs-up button.

Translate