Validation of data with TPT

Tools & Utilities
Highlighted
Enthusiast

Validation of data with TPT

Hi everyone,

 

I have performed a .tpt script to load data from a source table to a target table with the DDL operator and it works fine. Now, I want to apply within the same .tpt script an additional step to validate the data that have been loaded into the target table.

 

For example, I want to know if a character '17' has been loaded into the field called 'FIELD_1' of the target table. In this sense, I think that it is possible to apply within the .tpt script the following SQL statement via the DDL operator:

 

SELECT * FROM TARGET_TABLE WHERE FIELD_1 = '17';

 

However, my question is about how can the process register the output without creating a temporal table or structure with this output? Namely, it could be possible to throw a warning message or to create a .xlsx file with the output via TPT if the character '17' has been loaded into the target table, but I do not know how to address this process.

 

Any idea?

 

Thank you in advance.

6 REPLIES 6
Teradata Employee

Re: Validation of data with TPT

Just thought that I would let you know that you cannot issue a SELECT statement using the DDL operator.

The DDL operator is meant to perform job setup type of activities, like dropping and creating tables.

You can also use the DDL operator to do things like INSERT-SELECTs because no "data" is actually returned to the DDL operator.

The DDL operator will not support requests that return data to it.

 

-- SteveF
Enthusiast

Re: Validation of data with TPT

Thank you feinholz for your remark. In that case, do you know any "standard" procedure to carry out this task by using TPT?

Teradata Employee

Re: Validation of data with TPT

TPT is primarily a loading tool; not a DBS querying tool.

You can use tools like BTEQ or Teradata Studio to run queries against the data in a Teradata table.

 

-- SteveF
Enthusiast

Re: Validation of data with TPT

Ok, I was thinking that TPT could also provide this functionality, so thank you again for your remark about BTEQ and Teradata Studio.

 

Then, my idea is to perform a .bteq script to run the validation query against the data in the Teradata table and to export the result of the query to a specific file (for example, a .xlsx file of Excel), in order to visualize the outcome of the process.

 

Is it possible to carry out such a process by using BTEQ? Is there any example available to check how it works?

 

Thank you in advance.

Teradata Employee

Re: Validation of data with TPT

I would post the question to the Tools forum and let a BTEQ expert help you out.

 

-- SteveF
Enthusiast

Re: Validation of data with TPT

Ok, thank you very much feinholz for your response.