Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a problem with data of a tFileInputDelimited.
my Job looks like:
tFileInputDelimited -->tJava--> tJavaRow_1-->tMap-->tDBOutput_2
The CSV file I read had seperate cloumns like column1, column2 etc
I only need column1 and column2 , in column1 only a number like 12345 in column2 are numbers delimited by , --> 1234,5678 (the entry for that field is varaiable)
I write a script what split the column2, so I generate a incremtor for an ID in Database and set it to a primaryKey
//SplitingChild and connect to master for Table String pzn = input_row.PZN; String childPzns = input_row.CHILD_PZN; String childPzn = ""; String childPZNout = ""; //System.out.println("testout: " + test); if(childPzns != null && !childPzns.isEmpty()){ String[] splittChildPZNs = childPzns.split("\\,"); for (String childPZN : splittChildPZNs) { i++; System.out.println("PZN: "+ pzn +" --> ChildPzn --> " + childPZN + " --> ID: " + i); globalMap.put("pzn", pzn); globalMap.put("childPzn", childPZN); globalMap.put("id", i); } } else { i++; System.out.println("PZN: "+ pzn + " --> ID: " + i); globalMap.put("pzn", pzn); globalMap.put("childPzn", ""); globalMap.put("id", i); }
if I use the globalMap vars in tMap
it only write the pzn, childpzn and id, for the number of line out of the tFileInput.
In my tLog it shows correct :
PZN: 01364773 --> ChildPzn --> 01364804 --> ID: 18224
PZN: 01364773 --> ChildPzn --> 01364796 --> ID: 18225
It only writes the last input with the ID 18225 and the input with the ID 18224 was ignored.
Thanks for yout help 🙂
best regards Chris
Thanks your for fast answer,
and it is possible with a routine, tLibraryLoad, tJavaRow and java postgreSQL code connection.
I connect to the Database via postgreSQL driver and loop some Data to the Database. So I solved the Problem and use a ETL Tool with JAVA
regards Chris
Thanks your for fast answer,
and it is possible with a routine, tLibraryLoad, tJavaRow and java postgreSQL code connection.
I connect to the Database via postgreSQL driver and loop some Data to the Database. So I solved the Problem and use a ETL Tool with JAVA
regards Chris