All Forums Tools
rishi1226 1 post Joined 06/13
04 Jul 2013
Executing FastLoad Protocol on TPT with Flat files with VARIABLE COLUMN NUMBERS

Hello Everyone,
I've been learning TPT and have been given various scenarios to execute; specifically ones that deal with the FAST LOAD protocol. There is one scenario that I am having issues trying to figure out, which is as follows:
TARGET TABLE has N columns.
FLAT FILE SOURCE has variable columns for every row (always between N and N-2). Tried to declare columns as NULL in insert statement but since every row may have diff number of columns that does not work.
Any pointers to get me thinking in the right direction would be greatly appreciated? Is this a scenario for using INMODS?

feinholz 1234 posts Joined 05/08
05 Jul 2013

What version of TPT are you using?
TPT supports "long" rows and "short" rows.
If you provide a schema in the TPT script that matches the target table, you can then specify "AcceptMissingColumns" and for those records that have fewer fields than the schema, the DataConnector operator will append extra NULL columns.
Of you can provide a schema that has N-2 columns and then use the "AcceptExcessColumns" for the DataConnector operator, and the operator will ignore the extra fields in the input records.


You must sign in to leave a comment.