Page 1 of 1

RECORD_TYPE FROM 3 SOURCES

Posted: Wed Aug 04, 2004 1:13 pm
by bobby
HI
I have target FCT_JOB_EQUIPMENT WITH COULUM REC_TYPE THE STABLE IS SOURCED OUT OUT OF THREE 1)STG_JOB_EQUIPMENT2)STG_CUST_RETURN3)STG_JOB_RETURN IF THE SOURCE IS STG_JOB_SHIPMENT THEN INSERT "SHIPPED EQUIPMENT"
IF THE SOURCE IS STG_CUST_RETURN THEN INSERT RETURNED BY CUSTOMER
IF THE SOURCE IS STG_JOB_RETURN THEN INSERT RETURN RETURNED BY INSTALLER

ALL THE OTHER COULMS I AM USING STG_JOB_SHIPMENT AS SOURCE ON THIS COLUM REQ IS LIKE THIS IT WANTS THREE SOURCES PLZ ADVICE.
THANKS,
BOBBY

Posted: Wed Aug 04, 2004 3:14 pm
by ketfos
Hi,
My assumption is that you ahve three input tables
1) STG_JOB_EQUIPMENT
2) STG_CUST_RETURN
3) STG_JOB_RETURN

Target table is FCT_JOB_EQUIPMENT

From three input sources, you are writing to the target table.
When the record is inserted from STG_CUST_RETURN, you want to write value "Returned by Customer
When the record is inserted from STG_JOB_RETURN , youwant to write value "Returned by Installer" ......

Solution-
In the transformer stage, for the column REC_TYPE,
you can put if then else if condition like
If STG_CUST_RETURN.input column then "Returned by Customer" else if
" STG_JOB_RETURN.input_column then "Returned by Installer" ...



Ketfos

Posted: Thu Aug 05, 2004 7:27 am
by bobby
hi,
bascially i wanna append all new record to same fct_table from stg
i have one ETL_control key which take care of integration now when i try to append that recors the etl key says now duplicate etl key
how can i take care of etl key
thanks
bobby

Posted: Thu Aug 05, 2004 8:10 am
by chucksmith
Bobby,

Are you saying that you want to append rows from STG_JOB_EQUIPMENT to FCT_JOB_EQUIPMENT, and update rows from STG_CUST_RETURN and STG_JOB_RETURN in FCT_JOB_EQUIPMENT?

Posted: Thu Aug 05, 2004 10:29 am
by bobby
hi chuck,
thanks buddy i got it.
thanks
bobby

Posted: Thu Aug 05, 2004 10:43 am
by chucksmith
Anytime. :)