You are not logged in.
Announcement
Unanswered posts
|
Pages: 1
Hi I need help with a tRowGenerator job.
I have input table that looks like the following:
LocID|LocName|NbrCars
1;TX;3
2;CA;4
3;TN;7
4;WA;9
5;TX;12
I would like to generate a row based on the NbrCars with a new field for CarID that is randomly generated
LocID|LocName|CarID
1;TX;4234
1;TX;42367
1;TX;4543
2;CA;2323
2;CA;98823
2;CA;72342
2;CA;5344
3;TN;42234
3;TN;2234
3;TN;57234
3;TN;67862
3;TN;43333
3;TN;555234
3;TN;342542
I have been using the following pattern
(A) tMySQLInput -> (B) tFlowToIterate -> (C)tRowGenerator -> (D) tIterateToFlow -> (E)tLogRow
(A) - reads a table and defines the schema
(B) - iterates based on NbrCars
use default (key, value_ in globl variables is checked
(C) - generates rows
Number of rows for RowGenerator = LocID = (Integer) globalMap.get("row1.nbrcars")
LocID = (Integer) globalMap.get("row1.location_id")
LocDec = (String) globalMap.get("row1.location_desc")
....
(D) - IterateToFLow
mapping fields location_id value = globalMap.get("CURRENT_FILE")
....
..
I get a type mismatch error: cannot convert Object to String in the tRowGenerator step
Offline

I think you need the (String) reference before globalMap.get("CURRENT_FILE") in tIterateToFLow. The best way to find these problems is to click on the code tab at the bottom left of your job design and then find the row marked with red (click on the red mark). That will tell you exactly what assign statement is the problem.
Offline
Pages: 1