copying table from Prod to QA

Database
Enthusiast

copying table from Prod to QA

Hi everyone,

I'm struggling with a problem where I'm suppose to copy the data from table Technical_year in prod environment to Technical_year in QA environment.

They are actually views and the definition looks today like:

For QA environment:

REPLACE VIEW DWQ_QFU.MAN_TECH_YEAR

AS

SELECT *

FROM

DWQ_QW.MAN_TECH_MODEL_YEAR;

For Prod environment:

REPLACE VIEW DWP_QFU.MAN_TECH_YEAR

AS

SELECT*

FROM

DWP_QW.MAN_TECH_MODEL_YEAR;

 

My job is to write a sql that copies that data from Prod to QA.

My question is, which is the most easiest and effeicient way to do this?

 

Best Regards

Emil

 

 

6 REPLIES
Enthusiast

Re: copying table from Prod to QA

Do you have tpt, or can you see tpt wizard?

Enthusiast

Re: copying table from Prod to QA

Actually I don't know what TPT or TPT Wizard is...

Mostly I just check my queries from BO Web Intelligence in Teradata and very seldom I do this kind of tasks.

I'm wondering if there is some general script for copying the data from one table into another.

Best regards

Emil

Enthusiast

Re: copying table from Prod to QA

I suggest you talk to the DBA --- if you can just do an insert ...select or how much data you want ...and when you can do .... not to disturb the production system.

Enthusiast

Re: copying table from Prod to QA

Ok, I see. Thank you for your help.

Let us think that I want to fill table A with data from table B. How should I then write the SQL?

Best Regards,

Emil

Enthusiast

Re: copying table from Prod to QA

You can use :

INSERT INTO your_databasename_QA.A SELECT * FROM your_databasename_PROD.B;

I give your_databasename_QA and  your_databasename_PROD as example only.

You can also think of using MERGE. But now you can use the above insert ...select

Enthusiast

Re: copying table from Prod to QA

Thank you very much Raja!