0 karma · joined Nov 27, 2018 (8y ago) · 1 submissions
comment 3y ago · link · parent
2. Export the query results to a .csv file(s).
3. Utilize Go along with the encoding/csv package to process each CSV row. Construct an in-memory index mapping each entity ID to its byte offset within the CSV file.
4. Traverse the CSV again, using the index to quickly locate and read corresponding lines into in-memory structures. Convert the aggregated JSON columns to standard arrays or objects.
5. After comparing individual CSV rows, save the outcomes to a map. This map associates each entityID with metadata about columns that don't match.
6. Convert the mismatch map into JSON format for further processing or segmentation.