#1 2008-04-22 15:35:06

rarchamb
New member
Registered: 2008-04-22
Posts: 2

NPE when using Oracle SCD

Hello,
I'm new to TOS (using 2.3.2 and Java), and I get a NullPointerException in a simple transformation that uses the OracleSCD component.

What I try to achieve:
- read a text file with 3 fields
- for each row, if the combination does not exist, insert a new row in the table - the technical key has to be populated with an Oracle sequence.

Input data (1 header + 1 data row):
INDEX_NAME;ORIGIN_NE_ID;INDEX_TYPE
NEWINDEX;26;FSC

Console log:
Starting job J_TestSCD at 15:21 22/04/2008.
Exception in component tOracleSCD_1
java.lang.NullPointerException
    at impaqt.j_testscd.J_TestSCD$1SCDSK_tOracleSCD_1.equals(J_TestSCD.java:343)
    at java.util.HashMap.put(Unknown Source)
    at impaqt.j_testscd.J_TestSCD.tFileInputDelimited_1Process(J_TestSCD.java:403)
    at impaqt.j_testscd.J_TestSCD.tOracleConnection_1Process(J_TestSCD.java:297)
    at impaqt.j_testscd.J_TestSCD.runJobInTOS(J_TestSCD.java:2630)
    at impaqt.j_testscd.J_TestSCD.main(J_TestSCD.java:2529)
2008-04-22 15:21:41|HfaohB|HfaohB|HfaohB|IMPAQT|J_TestSCD|PC_G1R1|6|Java Exception|tOracleSCD_1||1
2008-04-22 15:21:34|HfaohB|HfaohB|HfaohB|3724|IMPAQT|J_TestSCD|_R_O_cBBpEd2248PHwMtIoQ|0.1|PC_G1R1||begin||
2008-04-22 15:21:42|HfaohB|HfaohB|HfaohB|3724|IMPAQT|J_TestSCD|_R_O_cBBpEd2248PHwMtIoQ|0.1|PC_G1R1||end|failure|7032
Job J_TestSCD ended at 15:21 22/04/2008. [exit code=1]

What am I doing wrong ?
Thanks,


Uploaded Images

Offline

#2 2008-04-25 09:57:59

cshan
New member
Registered: 2007-04-26
Posts: 3

Re: NPE when using Oracle SCD

i looked the image you uploaded, there is something wrong with you job.
i think you maybe not familiar with the scd components.  for the configuration of the tOracleSCD component in your job, you did not enable anyone of the the scd type. you must enable one at least, and then input the dimension attributes.
for the type1,  if record can be found by using the source keys in the data warehouse, and the dimension attributes in the data warehouse are different from the dimension attributes come from input row, just update the dimension attributes of the record.(if no record can be found, just insert).
for the type2, if record can be found by using the source keys in the data warehouse, and the dimension attributes in the data warehouse are different from the dimension attributes come from input row, update the end date field of the record(update version field if enable version, update active field if enable active ) and then insert a new record with the new dimension attributes . (if no record can be found, just insert).
for the type3,  similar with type1.

Offline

#3 2008-04-25 14:06:47

rarchamb
New member
Registered: 2008-04-22
Posts: 2

Re: NPE when using Oracle SCD

Hi,
thanks for your answer. In fact I already know about the different SCD types.
But in other ETL tools (like Pentaho Data Integration for instance), SCD columns are not mandatory.

Anyway, I found out the problem: in my SCD table, I had some rows with null values in one of the key fields.
After removing these rows, the job ran fine, so eventually there is no obligation to specify SCD columns.
It looks like the tOracleSCD component does not like null values when it populates its cache.

Another point: It would be nice if we could in the same job update the SCD and load the fact table.
From what I see it is not possible with TOS, we need to run 2 separate jobs to do that.

Regards,

Offline

Board footer

Powered by FluxBB