Upsert Free-Day Terms
Upserts one Free-Day Terms record into the adopted enterprise reference table using its primary key.
@lainstack/freight/upsert-free-day-term · Data · Available on Lainstack Cloud
How to use it
Section titled “How to use it”Upsert Free-Day Terms writes one free-day term (carrier, container type, number of free days and an optional start date) into a Free-Day Terms Reference Table, keyed by termKey. A term with the same key is replaced. It changes stored data, and a test run writes too.
The target must be an active Reference Table adopted from the Free-Day Terms Template Data Pack in this workspace, with the pack’s exact columns. Any other table fails the step as incompatible. To load many terms from a Table, use @lainstack/reference-table/write.
freeDaysmust be a plain non-negative number, such as 14 or 7.5. An invalid value asks for a correction: someone enters a valid number and the upsert runs again. Term key, carrier and container type stay read-only in that correction.effectiveFrommust be a real YYYY-MM-DD date when set. It is stored as is. The block does not compare it with other terms.- Text values are trimmed and at most 160 characters.
- The write is staged, then published as one revision. A replay of the same block in the same run does not publish twice.
- A data-lake failure fails the step. Server errors are retryable.
Settings
Section titled “Settings”| Setting | Key | Type | Details |
|---|---|---|---|
| Reference Table (required) | referenceTableId |
Text | The adopted Free-Day Terms reference table to update. |
| Term key (required) | termKey |
Text | The primary-key business identity. |
| Carrier (required) | carrier |
Text | The carrier label or code. |
| Container type (required) | containerType |
Text | The container type. |
| Free days (required) | freeDays |
Text | A non-negative number of free days. Type a value or insert an upstream value. |
| Effective from | effectiveFrom |
Text | Optional canonical ISO-8601 date for this term. |
Outputs
Section titled “Outputs”| Output | Path | Type |
|---|---|---|
| Status | status |
Text |
| Term key | termKey |
Text |
| Carrier | carrier |
Text |
| Container type | containerType |
Text |
| Free days | freeDays |
Number |
| Effective from | effectiveFrom |
Text |