In Talend Open Studio, you can apply processing directly to a spreadsheet in preparation for loading into a data mart. However, it's often better to do this type of work in the database itself. This is because of the flexibility and performance of running queries directly in the database process. For example, rather than gathering surrogate keys outside of the database using tMap and lookups from a file processing loop, load the data into the database and use a query containing high-performance joins for additional transformations.
File Processing
Start by defining the main processing loop based off of tFileList. This will feed into a tMap component. The tMap component can provide some basic NULL-checking and data type validation, spooling any rejects off to reject table.
This is a Talend Open Studio job containing 3 subjobs that load a directory of spreadsheets into a MySQL table, leaving the results in place for additional processing.
Talend Open Studio - A Typical ETL Staging Job |
While the tMysqlOutput components have an option to Clear or Truncate tables, we want to leave the records from each iteration in order to gain an economies of scale. That is, load every data file and then process the entire set in one large batch rather than flushing the contents out with every iteration. I use a single iteration of a tForeach (added a single element "once" to the list) to drive the two delete statements.
Rejecting Records
The tMap component contains logic for rejecting records. An alternate implementation would put this logic into a component like tFilterRow so that the specific failure condition could be tracked.
Talend Open Studio - Map Only Valid Fields |
Talend Open Studio - Mapping Reject |
tRules, available on Talend Exchange will also handle rejects using a Javascript syntax defining the filtering conditions.
Stage as String
The schemas for components like tFileInputExcel can use any simple data type available in Java: String, Integer, Date, Double. I find it useful to stage everything using very loose schemas where each field is a String. This has the following advantages
- Bring data into the system where it can be handled, and
- Allow for runtime processing related to Locales or conditional formatting.
Staging is used to load a database table where it is more convenient to analyze and process a record than a set of flat files. Once in the database, performant queries can be run without suffering the network latency of having to move data in and out of the database process. Talend Open Studio components provide the file processing and the data loading steps in this arrangement of subjobs.
Hi All,
ReplyDeleteI have two table with same column. When First column is updated with some Invoice No. I want to compare with second table and in the second table delete the record and update the second table with first table data based on the Invoice number.
I don't know how to deal with loading a set of files into a staging table with Talend Open Studio thank you for explaining a lot.
ReplyDelete
ReplyDeleteThank you for sharing wonderful information with us to get some idea about it.
Workday Studio Training
Workday Studio Online Training
Workday Course
Workday Studio Online Training India
Workday Studio Online Training Hyderabad
Workday Studio Training India
SMM PANEL
ReplyDeletesmm panel
iş ilanları
İnstagram Takipçi Satın Al
HTTPS://WWW.HİRDAVATCİBURADA.COM
Https://www.beyazesyateknikservisi.com.tr
servis
tiktok jeton hilesi
Congratulations on your article, it was very helpful and successful. 636a898dc499df39b4e71dd621974eac
ReplyDeletenumara onay
website kurma
website kurma
Thank you for your explanation, very good content. 1156ae41304ba91e9553ebd295cfdd47
ReplyDeletedefine dedektörü
Good content. You write beautiful things.
ReplyDeletemrbahis
vbet
hacklink
vbet
mrbahis
hacklink
korsan taksi
sportsbet
taksi
This post is on your page i will follow your new content.
ReplyDeletebetgaranti.online
mrbahis giriş
sportsbet giriş
sportsbetgiris.net
mrbahis
casino siteleri
sportsbet
casino siteleri
mrbahis.co
slot siteleri
ReplyDeletekralbet
betpark
tipobet
betmatik
kibris bahis siteleri
poker siteleri
bonus veren siteler
mobil ödeme bahis
KCNDKİ
bayrampaşa
ReplyDeletegüngören
hakkari
izmit
kumluca
1M5
salt likit
ReplyDeletesalt likit
JMO8
gfdhgbfhgjj
ReplyDeleteشركة رش مبيدات بالاحساء
gdfgbfhbfgnhjgj
ReplyDeleteشركة رش مبيدات بالاحساء
شركة مكافحة بق الفراش بالدمام YnnE3tB38O
ReplyDelete