Capture File Name and put into a separate Database Table only once.

Five Stars

Capture File Name and put into a separate Database Table only once.

I am very new to Talend.  I've been an SSIS dev for 3 years.  I am creating a "Files Loaded" table so we can see what has been loaded and also use it to reference and not process the same file twice, if I happened to get resent. (dealing with government entity so you never know.) 

 

Capture.JPG

I was able to branch off of the tMap1 and insert into my table however it was inserting a file name per row of the table instead of just inserting the name once. The table structure I'm inserting into is as follows:

 

 

Capture.JPG

Any advice?


Accepted Solutions
Community Manager

Re: Capture File Name and put into a separate Database Table only once.

An easy way of doing this is to restrict the data after the tMap1. Place a tAggregateRow component after the tMap1 and connect the output of that to the Files Loaded component. Do not add a group by element for this component, but set all of your output column functions to First or Last. This will group your entire set into 1 row.


All Replies
Community Manager

Re: Capture File Name and put into a separate Database Table only once.

An easy way of doing this is to restrict the data after the tMap1. Place a tAggregateRow component after the tMap1 and connect the output of that to the Files Loaded component. Do not add a group by element for this component, but set all of your output column functions to First or Last. This will group your entire set into 1 row.

Five Stars

Re: Capture File Name and put into a separate Database Table only once.

Perfect!!! Thanks.  Worked like a charm.  Now on to getting the record counts input into the table.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog