Join Two CSV Files through the Key Field
We have two CSV files:
We want to join them through id field:
It’s easy to do the join using esProc. Download esProc installation package and free license file HERE.
1. Write script joincsv.dfx in esProc:
2. Execute the esProc script to get the result CSV file data3.csv.
Usually data1.csv can be too large to fit into the memory, but data2.csv can be small enough to be wholly loaded into the memory. If that’s the case, we just need to modify A1 as =file(“data1.csv”).cursor@ct(), which uses cursor to do the loading work.