Talend
Création de fichiers à partir de lignes d'une table
Comment créer une simple requête (Oracle) où chaque ligne formera un fichier différent :
--------------------------------------------------------------------------------------------------------------------------------------
 tOracleInput----row2---->tFlowToIterate ----Iterate----> tJava ----row3---->tMap ----out1----> tFileOutputDelimitedÂ
--------------------------------------------------------------------------------------------------------------------------------------
Voici un exemple fictif avec une table (TEST.INFOSXML).Â
Â
tOracle Input :
- Edit Schema : ajouter 2 colonnes; TXREFENOMFICHIER, TXREFEXML
- Table Name : "TEST.INFOSXML"
- Query : "SELECT TXREFENOMFICHIER, TXREFEXML FROM TEST.INFOSXML"
tFlowToIterate :
key = "fichier" value =Â TXREFENOMFICHIER
key = "xml" value =Â TXREFEXML
tMap :
out1 = ((String)globalMap.get("xml")
tFileOutputDelimited :
FileName :Â "D:/out/" + ((String)globalMap.get("fichier")
Tags: table fichier colonne
Related entries:
Auteur: Michel Preti
Révision: 1.1
Vous ne pouvez pas commenter cet enregistrement