Quantcast
Channel: Teradata Downloads - Tools
Viewing all articles
Browse latest Browse all 870

TPT - passing CHAR SET as variable

$
0
0

Hi all
I'm new to TPT so please be gentle with me. I have a generic script whcih will load data files to a Teradata table. One if my files contains Unicode (UTF16) data.
I have successfully laoded the data by invoking a TPT script with the following statement:
USING CHAR SET UTF16
DEFINE JOB EXTRACT_TABLE_LOAD
.....
I have also successfully loaded the data by declaring a variable in the .vars file to define the CHAR SET E.g.
DATA_CHARACTER_SET='UTF16'
...
USING CHAR SET @DATA_CHARACTER_SET
DEFINE JOB EXTRACT_TABLE_LOAD
However, what I want to do is define a variable which holds the entire "using statement", but having tried lots of different permutations I continually get an error "Keywords 'DEFINE JOB' are missing from the beginning of the job script.". Is there any restriction on my doing this ? I often see / hear the statement "you can use variables everywhere in TPT" but it appears that I can't in this scenario.
My attempt:
Vars:
DATA_CHARACTER_SET='UTF16'
COMMAND_LINE ='USING CHAR SET ' || @DATA_CHARACTER_SET
TPT script statements
@COMMAND_LINE
DEFINE JOB EXTRACT_TABLE_LOAD
Thanks for any assistance.
 
 

Forums: 

Viewing all articles
Browse latest Browse all 870

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>