DataFileSplitter » Use cases » One JSON/XML document per customer
Download DataFileSplitter Free Trial » Buy DataFileSplitter Now »
An export produced one JSON file with every customer's records in it - or an XML file with every tenant's elements under a single root. Each customer, tenant or account should receive their data as a document they can process, and ideally nobody gets anybody else's rows.
Cutting a JSON or XML file by size or by position does not work: a fragment of a JSON array is not valid JSON, and an XML document that has been cut in the middle is not well formed. Splitting has to happen at the level of the records, not the bytes.
customer_id, tenant, account.
Every output document is well formed: each JSON file is a complete array of that customer's objects, each XML file is a complete document with its root element - not a fragment. The input file does not have to be sorted by the field first, so records scattered through the file still land in the same output file.
Guides: split JSON by column value, split XML by column value. Splitting tables instead: split by column value. Converting the parts: DataFileConverter. In the browser: split JSON, split XML.