Table Updater Component
Table Updater is the flexible way to write to a table. Use it with steps that don't come from M3, such as REST API, Transform or Data Lake. When the data comes from an M3 API step in a VXL Live workflow, use the Table step instead: it creates the table on the first run.
The Table Updater takes the output of the previous step and writes it into a Vince Platform table. It does not define the table structure, so the table must already exist. It is also a good fit when several workflows write to the same table.
How it works
The main setting is Table, the table to write to. To remove your selection, use the clear button in the field. When the workflow runs, it takes the output of the previous step and writes it to that table — inserting new records or updating existing ones based on the table's primary key.
The output of the previous step must contain every primary-key column of the table, with the exact names the table uses. A record without them can't be matched to a stored record. The reliable way is to put a Transform directly before the Table Updater and build the records explicitly — see Make sure every record carries its primary key.
Data types are only checked when the table has Enforce data types turned on. Then values that don't match the types defined for the table's columns cause the record to be rejected. With Enforce data types off, the table accepts any shape, but values of incompatible types in the same column are likely to break the table's indexing. See Decide how strict the table should be.
Different tables per environment
If the workflow has environments configured, two buttons appear above the table selection: Single table and Per environment. Choose Per environment to write to a different table depending on the environment the workflow runs in.
- Default table is the fallback table, used when an environment has no table of its own.
- Below it, each environment has its own table field.
- Every environment needs a table before you can save; otherwise you are told which environments are missing one.
Choose Single table to go back to one table for all environments.
Example
Copy exchange rates from a web service into a table:
-
A REST API step fetches the rates.
-
A Transform step builds one record per currency, including the table's primary key:
[{ "currency": "EUR", "rate": 11.62 },{ "currency": "USD", "rate": 10.04 }] -
A Table Updater step has Table set to your rates table, with
currencyas its primary key.
Each run adds new currencies and updates the rate of the ones already in the table.
Key differences from the Table component
| Table | Table Updater | |
|---|---|---|
| Creates the table | Yes (on first save) | No — table must already exist |
| Accepted sources | M3 API output | Any component's output |
| Record handling | Upsert, Replace, or Append | Upsert (insert or update by primary key) |
| Type enforcement | Yes | Only when the table has Enforce data types on |
Use Table Updater when multiple workflows contribute data to the same table — for example, one workflow populates base records from M3, and another enriches them with data from an external REST API.
Further reading
- Table — create a new table and define its structure
- Transform — reshape data before writing it to the table
- Designing Tables — primary keys, embedded lists and Enforce data types