Data Elements

Archive of postings to DataStageUsers@Oliver.com. This forum intended only as a reference and cannot be posted to.

Moderators: chulett, rschirm

Locked
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Data Elements

Post 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.
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post 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

*************************************************************************
Locked