Task: You have a sequential file with some line of structured records. Design a Datastage job to Split the file into two files. One file should contain 1st line,3rd line,5th line and so on. Second file should contain 2nd line, 4th line,6th line and so on.
Solution:
Using Round Robin partitioning, we can easily achieve the desired result. In Round Robin partitioning, the datastage sends the first record of the input file to the first processing node, the second to the second processing node, and so on. When the last processing node in the system is reached, the process starts over.
We need to create a datastage job and configure its properties to run in two nodes using the configuration file. Use Transformer stage to divide the input file into two output files. Set the partitioning method as Round Robin. Use system variable “@PARTITIONNUM” in the transformer constraints to filter the records based on the nodes from which the records need to be collected and written into the respective output files.
Auf dieser Seite können Sie das Online-Video Split Input Records using Round Robin - Datastage Tutorial mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Datastage Tutorial 07 Dezember 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 3,030 Mal angesehen und es wurde von 11 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!