Hello,
I'm currently have 2 queries that produce 2 alert emails that send 2 separate csv files. The 2 have the same fields/columns. I want to merge them into 1 scv file, and in Excel form, would ideally in the same sheet.
Exp:
Table 1
MERCHANT_ID|Sales|TYPE
Merchant A |14 |Domestic
Merchant B |5 |Domestic
Table 2
MERCHANT_ID|Sales|TYPE
Merchant C |2 |Foreign
Merchant D |52 |Foreign
The result would be
MERCHANT_ID|Sales|TYPE
Merchant A |14 |Domestic
Merchant B |5 |Domestic
Merchant C |2 |Foreign
Merchant D |52 |Foreign
You can write first alert search results to 1.csv . Then at the end of second alert search you can append 1.csv and make the final output csv.
As a sample for second alert;
| second_search
| inputlokup append=t 1.csv
Hi @phamxuantung,
Since these csv files are output of two separate alert, you should merge/adapt your alert search to cover both cases. Without knowing your searches we cannot help.
Although the result have the same fields, have have similar query, just different index, unfortunately, it can't run together because combine them will make some calculation wrong. I heard my co-worker said you can export alert 1 to 1 csv, alert 2 will lookup at that csv, run the search and then export it, is it possible