You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi,
I have chosen the column as Dynamic and I am trying to get the column count based on the delimiter. But what I notice is the Dynamic type sets the column count based on the first row and if the next row consist of more delimiters than first row then its getting truncated.
For example.
a1,b2,c3,d4 ----1st row
a1,b2,c3,d4,e5 ----2nd row
each row is Dynamic type based on the delimiter comma(,).
When I try to see this rows using tlogrow after a tfileinputdelimited..
its shows as follows :
a1,b2,c3,d4
a1,b2,c3,d4
the 2nd row last field is being truncated.
Is there any solution for this?
Thanks.
Offline
You could import the the entire table using tInputFileFullRow, put that into a tMap and add a field num_cols, the sort by num_cols descending.
tFileInputFullRow --> tMap (num_cols = (count of commas in field1 + 1)) --> tSortRow (by num_cols descending) --> rest of job with dynamic schema
Thanks,
Ben
Offline

Thanks for the reply.
Can you please help me how to convert string to dynamic in tmap?
Thanks.
Offline
Pages: 1