Page 1 of 1

Data Elements

Posted: Mon May 28, 2001 5:21 am
by admin
A few on the list have expressed wonder at the function of data elements. Try this little experiment.

Construct a DataStage job that extracts all four columns from the UV table EXAMPLE1. In a Transformer stage, generate three output columns; PRODUCT, SALEDATE and QTY. PRODUCT and QTY are unchanged; apply the TIMESTAMP transform to the input column DATE to generate SALEDATE. Results go into a text file.

Compile and run the job, with warning limit set to 0 (unlimited). Inspect the results.

Now, go back and set the data element column for DATE equal to Date. Recompile and run again.

The data element applies an automatic date conversion to the input column. This mimics the behaviour of the SQLBindParameter and SQLBindCol() functions, where the third argument can specify internal date or time format. This works with UV and ODBC stage types at the very least.

Posted: Mon May 28, 2001 5:29 am
by admin
Thanks, Ray.

How would you like to take your experiment a step further and try it with the output stage being ORAOCI8?

Depending on the results of your experiment (or maybe not), can I feel a little ORAOCI8 enhancement request coming on here?

-----Original Message-----
From: Ray Wurlod [SMTP:ray.wurlod@Informix.Com]
Sent: Monday, May 28, 2001 3:22 PM
To: informix-datastage@oliver.com
Subject: Data Elements

A few on the list have expressed wonder at the function of data elements. Try this little experiment.

Construct a DataStage job that extracts all four columns from the UV table EXAMPLE1. In a Transformer stage, generate three output columns; PRODUCT, SALEDATE and QTY. PRODUCT and QTY are unchanged; apply the TIMESTAMP transform to the input column DATE to generate SALEDATE. Results go into a text file.

Compile and run the job, with warning limit set to 0 (unlimited). Inspect the results.

Now, go back and set the data element column for DATE equal to Date. Recompile and run again.

The data element applies an automatic date conversion to the input column. This mimics the behaviour of the SQLBindParameter and SQLBindCol() functions, where the third argument can specify internal date or time format. This works with UV and ODBC stage types at the very least.


*************************************************************************
This e-mail and any files transmitted with it may be confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in
error, please notify the sender by return e-mail, and delete this e-mail from your in-box. Do not copy it to anybody else

*************************************************************************