โ07-09-2020 09:46 AM
I have a pipeline that reads two csv files from different servers, i want to put together the data of both csv files into one. I used a union snap to put the data together but if one server is down itโs only going to bring me the data of only one server. I put a flag in each section of the file reader, if that flag its true after the join it will check that both flags are true, if yes then write one csv file if not donโt write. But after I configure my join snap i notice that the final csv has more columns, new column names with the prefix โinput1_ColumnNameโ. How can I make that data move from the right to the bottom of the csv file?
Solved! Go to Solution.
โ07-09-2020 10:32 AM
Here is a sample pipeline using Gate and Router to verify the existence of data from both input streams. Note that Iโm not doing the email off the read fail, but it will still work the same way.
Example_Missing_Input_2020_07_09.slp (17.4 KB)
Input file used: directory.txt (2.1 KB)
โ07-09-2020 09:57 AM
Try adding an Exit snap after the Emailer with threshold at 0 to fail the pipeline if either source fails. You may also have to set the batch size property in the Emailer to 1 to prevent record batching.
This should allow you to continue to use the Union snap and avoid the โadded columnsโ issue.
โ07-09-2020 10:14 AM
I just put the exit snap but since one server stills up it is sending the information to the file writers, and creating the csv file with half of the information:
โ07-09-2020 10:32 AM
Here is a sample pipeline using Gate and Router to verify the existence of data from both input streams. Note that Iโm not doing the email off the read fail, but it will still work the same way.
Example_Missing_Input_2020_07_09.slp (17.4 KB)
Input file used: directory.txt (2.1 KB)
โ07-09-2020 12:03 PM
It worked!! Thanks!
This is the final pipeline ๐