Home / How-to / Bring in your data
Bring in JSON, XML and YAML
Flatten a nested export, orders with their lines inside, into tables you can join and build on.
The short version
- A Semi-Structured Acquisition reads a JSON, XML or YAML file, or a folder of them, and splits it into flat tables.
- Every list in the document becomes a table, named by where it sits:
(root)for the top, thendata,data.linesand so on. - Click Derive tables, tick the tables you want, and click Update child tables. Each ticked table becomes a Semi-Structured Table element of its own.
- Each table has an
_idcolumn, and each table below the top a_parentId, so you can join an order's lines back to the order. - The bar beside the button says when the tables are out of sync with your ticks. Saving never updates them.
In this guide
What it is
Web shops, online services and many business systems export data as a document of nested parts: an order with its customer inside it and its lines inside that. A spreadsheet can't hold that shape in one table, and nor can a model.
A Semi-Structured Acquisition takes such a document apart into flat tables, one for each kind of list in it. If you have expanded a list column in Power Query, it is the same idea, done for the whole document at once.
The acquisition itself is a container: it holds the source and the list of tables, and reads nothing. Each table you tick becomes a Semi-Structured Table, a child element with its own columns and its own run. Those children are what you build on.
It reads three formats:
| Format | Looks like |
|---|---|
| Json | { "data": [ … ] } |
| Xml | <orders><order>…</order></orders> |
| Yaml | data: followed by indented items |
Leave Format on Auto and ConradBI tells them apart by the first character in the file: < for XML, { or [ for JSON, and anything else for YAML.
Before you start
You need:
- A project open in ConradTool, in Developer Mode, where the Elements tree, the Editor and the Services panel are.
- A sample document: one real export, saved as a file your computer can reach.
This guide uses orders.json, the web shop's order export from the running example. Its parts:
| Part of the document | What it holds |
|---|---|
| The top | When the export ran, the shop's name, and the list data |
data |
One entry per order: its order ID, order date and status, a customer with an ID and an email, and a list lines |
lines, inside each order |
One entry per order line: product code, units and unit price |
The acquisition is called Web Shop Orders.
Your first document: orders.json
This takes about five minutes.
- In the Elements tree, click the + on the Acquisitions row and pick Add Semi-Structured Acquisition.
- In Add element, type
Web Shop Ordersunder Name and click OK. - Under Format, leave Format on Auto.
- Under Source, leave Source set to File. Click Browse… next to File path and pick
orders.json. - Under Tables, click Derive tables. ConradBI reads the document and lists its tables, each with its Parent and how many Columns it has. The line above the list says "Derived 3 table(s) from orders.json."
- Tick Include for
dataanddata.lines. Tick(root)too if you want the export's own details, such as when it ran. - The bar above the list turns to the warning colors: "The child tables are out of sync with this configuration." It names the elements it will create.
- Click Update child tables. Two Semi-Structured Tables appear under
Web Shop Ordersin the tree:Web Shop Orders / dataandWeb Shop Orders / data.lines. The bar now says they are in sync. - Save
Web Shop Orders. - Open
Web Shop Orders / dataand check its columns. See Columns and types. - Process the two tables: click Process all, or tick them on the Orchestration tab and click Process checked. Their rows show on the Data tab.
You now have one table of orders and one of order lines, ready for a Prep that joins them.
How tables are named
A table is named by where its list sits, counting from the top of the document. Each step down adds a dot and the name of the next part:
| Table | Where it is | One row per |
|---|---|---|
(root) |
The top of the document | Document, so one row per file. A file that is itself a list gives one row per item |
data |
The list data at the top |
Order |
data.lines |
The list lines inside each entry of data |
Order line |
Because the name spells out the whole way down, two lists with the same name in different places are two tables. A list of lines under billing would be billing.lines, kept apart from data.lines.
A list wrapped in an envelope is common: the export's details at the top, and the list of records inside. The envelope is the one-row (root) table, and the list is a table of its own under it. You don't have to point ConradBI at the list: every list gets a table.
The Parent column in the list says which table each one sits under. The children are named after the acquisition and the table: Web Shop Orders / data, and Web Shop Orders / root for the top.
Columns and types
Within a table, each value becomes a column. A part with values of its own inside it, such as customer, is flattened into the same table, with dotted names: customer.id and customer.email are columns of data. A list never flattens: it is always a table of its own. A list of plain values, such as a list of tags, becomes a table with one column, value.
ConradBI adds two columns of its own:
- _id numbers each row of each table.
- _parentId is the
_idof the row it sits under. Ondata.linesit is the_idof the order the line belongs to.
Join data.lines to data where the line's _parentId equals the order's _id, and each line meets its order. The ids are made up when the file is read. Use them to join tables from the same run, not as a lasting key: your own order ID is the one to keep.
Derive tables types each column from the values it finds:
| Values | Data Type |
|---|---|
true and false |
True or False |
| Whole numbers | Number, or Big Number when one is too big for it |
| Numbers with decimals | Decimal |
| Anything else, dates included, and a column that mixes kinds | Text |
Dates come in as Text, so check any column of dates: open the Semi-Structured Table, and in its list set Data Type to Date. Untick Include there for a column you don't need. The types you set stay when you click Update child tables.
The parent's configuration is what the children are made from. A change in a child's own editor puts the bar out of sync, and the next Update child tables puts the child back as derived. So set types after your last update, and check them again after each one.
Keeping the tables in sync
The Semi-Structured Tables are elements of their own, made from the acquisition's configuration. Only one thing makes, changes or removes them: the Update child tables button. Saving never does, nor does closing the editor.
The bar beside the button tells you when to press it:
- In sync, in quiet colors: "The 2 child tables are in sync with this configuration." Nothing to do.
- Out of sync, in the warning colors: "The child tables are out of sync with this configuration." Under it, the bar names what pressing will do: "To create: …", "To update: …", "To remove: …".
These put the children out of sync: a table ticked or unticked, Derive tables finding different columns, the acquisition renamed, since a child is named after it, or a child changed in its own editor. Until you press the button, the children stay as they were, and that is what processes.
When you press it:
- New tables become new Semi-Structured Tables.
- Changed tables are updated in place. Each keeps its identity, so a Prep or Grain built on it stays bound.
- Unticked tables are removed, but only after ConradBI asks, naming each table and every element built on it. Say no and nothing changes.
The line under the bar says what the last press did.
A folder of files
When the web shop drops a new export every day, point the acquisition at the folder:
- Set Source to Folder.
- Click Browse… next to Folder path and pick the folder.
- In File filter, type which files to read, such as
orders*.json. The default,*.*, reads every file. - Click Browse… next to Sample file and pick one export. Until you do, Derive tables says the folder source needs a sample file.
- Click Derive tables, tick the tables, and click Update child tables.
Derive tables reads only the sample file, and its lists decide which tables there are. Pick a full, typical export: a list that appears only in other files has no table to go into.
Each Semi-Structured Table reads every matching file in the folder, in order of file name, and adds the rows together. The ids stay unique across the files, so lines still meet their own orders. Each file is read against the tables the sample gave, so a part that is a list in one file and a single entry in another still lands in the same table, and a list with one item is still a row of it. A file that can't be read as the format adds no rows, and each table's status names the file that was skipped. A file or folder that isn't there loads no rows and says so too — or fails the tables, when When the file is missing under Source is set to Fail the tables.
To read files that a program writes, set Source to Producer Element. See Files a program writes.
XML and YAML
XML and YAML documents are taken apart the same way, after a few rules that turn them into the same shape:
- XML elements that repeat under the same parent are a list, and so a table. Once an element repeats under a parent anywhere in the document, it is a list under every parent of that name, so an order with only one line still gives a row in the lines table.
- XML attributes become columns named with an
@in front:<order id="W-5001">gives the column@id. - An XML element with attributes and text keeps its text in a column called
#text. - The root element itself is the
(root)table. In<orders><order><line/><line/></order></orders>, the orders are the tableorder, and their linesorder.line. - YAML lists and mappings map straight across, as they would in JSON.
When something goes wrong
| What you see | What to do |
|---|---|
| "Couldn't find a file to sample" | Check File path, or the Sample file for a folder |
| "This folder source needs a sample file" | Pick one file from the folder under Sample file, then click Derive tables again |
| "Failed to parse the document: …" | The file isn't valid in its format. Set Format to Json, Xml or Yaml rather than Auto, or fix the file |
| "The document was empty or couldn't be read." | The file is empty. Pick a full export |
| The bar says the child tables are out of sync | Click Update child tables. Saving doesn't update them |
| A table you expected isn't listed | That list isn't in the sample file. Derive from a file that has it |
| A price or other decimal column is empty after processing | It is typed Number. Set it to Decimal in the Semi-Structured Table's editor |
| The acquisition itself has no columns to bind to | It is a container. Build on its Semi-Structured Tables |
| A file in the folder adds no rows | It couldn't be read as the format, and the element's status notes that it was skipped. Open it and check it |
| A warning above the tables about a data path | The acquisition was set up before 1.2.29, when a data path picked the list to read. It reads as before until you click Derive tables again. Then its tables take their full names, and Update child tables renames their elements, keeping everything built on them |
Reference
Semi-Structured Acquisition
| Group | Field | What it does |
|---|---|---|
| Format | Format | Auto, Json, Xml or Yaml. Auto tells them apart by the file's first character |
| Source | Source | File, Folder or Producer Element |
| Source | File path, Folder path, File filter, Sample file | The file, or the folder with its filter and the file Derive tables reads |
| Tables | Derive tables | Reads the sample and lists its tables |
| Tables | The bar and Update child tables | Says whether the children match the ticks, and makes them match |
| Tables | Include, Table, Parent, Columns | Tick a table to make it a child. Its name, the table it sits under, and its number of columns |
Semi-Structured Table
| Field | What it does |
|---|---|
| Table path: | Which table of the document this element reads |
| Include, Column, Data Type | Whether to load each column, its name, and how it loads |
Missing something?
Tell us what you were trying to do and what this guide didn't answer. We update it with every release.
Write to usWhat changed in this guide
- November 21, 2026: Updated for 1.2.59: decimals load as Decimal, the types you set survive Update child tables, and a skipped file is noted.
- October 31, 2026: First edition, written for ConradBI 1.2.52.
