One Star

[resolved] Cleaning a file of leading training data

I have a file that I want to import into a db. The data is | delimited which is easy to import, but I want to get rid of the leading and trailing data in the file. How do I go about doing that. Below is an example ie how do I get the component to only import the | delimited rows.
tx

EXCH_CODE
ID_BB_GLOBAL_SHARE_CLASS_LEVEL
END-OF-FIELDS
TIMESTARTED=Wed Jul 16 17:24:16 EDT 2014
START-OF-DATA
AA US Equity|0|17|BBG000B9WH86|EQ0010004600001000|399432471914|AA|Common Stock|Equity|AA|ALCOA INC|US|BBG000B9WH86|14003|29776|N.A.|0|39491|US|BBG001S5C3C2|
AAME US Equity|0|17|BBG000B9XB24|EQ0010179600001000|399432471917|AAME|Common Stock|Equity|AAME|ATLANTIC AMERICAN CORP|US|BBG000B9XB24|14005|14023|N.A.|0|39493|US|BBG001S5N8T1|
AAPL US Equity|0|17|BBG000B9XRY4|EQ0010169500001000|399432471918|AAPL|Common Stock|Equity|AAPL|APPLE INC|US|BBG000B9XRY4|14005|14023|N.A.|0|39493|US|BBG001S5N8V8|
END OF FILE
4 REPLIES
Four Stars

Re: [resolved] Cleaning a file of leading training data

Hi ounger,
I think your number of columns are fixed and first and last column you want to get rid of... If this is correct then
- Use tMap and take all the columns from input to output except first and last.
I hope this is what you want..
Vaibhav
Moderator

Re: [resolved] Cleaning a file of leading training data

Hi ounger,
You can create a File Delimited metadata and define the file parsing parameters. TalendHelpCenter:Centralizing File Delimited metadata.
See my screeshot
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Cleaning a file of leading training data

Works fine, thanks,
Oliver
Moderator

Re: [resolved] Cleaning a file of leading training data

Hi Oliver,
Thanks for your feedback.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.