Find Required Reference Record
Finds exactly one required record in a Data Lake reference table.
@lainstack/reference-table/find-required-record · Data
How to use it
Section titled “How to use it”Find Required Reference Record looks up exactly one row in a Reference Table by an exact match on one column. It returns that row under row, with rows (one item), rowCount and provenance (table, revision and row ids). Use it when the automation cannot continue without the record, such as a customer or code that must exist.
Choose @lainstack/reference-table/read instead when you need many rows, not one.
Traps:
- The match is exact and the value is text.
matchColumnIdis a column id such ascolumn-1, not a column name.matchValuecan be a reference to an upstream value, and it is limited to 4,096 characters. - No match is not a quiet empty result. If the
not_foundport has a connected target, the run takes that port.rowis null andreasonexplains the miss. If nothing is connected there, the step stops and asks a person for a correctedmatchValue, then retries with it. - More than one match fails the step with status 409. The match column must identify a single row.
rowcan be null on thenot_foundpath, so do not referencerowfields downstream of that port.- A missing table fails the step.
Settings
Section titled “Settings”| Setting | Key | Type | Details |
|---|---|---|---|
| Reference Table (required) | referenceTableId |
Text | Choose the reference table that must contain the record. |
| Match column (required) | matchColumnId |
Text | Choose the column used for the exact match. At most 160 characters. |
| Match value (required) | matchValue |
Text | Enter the exact value or insert an upstream value. |
Outputs
Section titled “Outputs”| Output | Path | Type |
|---|---|---|
| Row | row |
Value |
| Schema | schema |
Value |
| Provenance | provenance |
Record |
| Reason | reason |
Record |
| Row Count | rowCount |
Number |
| Truncated | truncated |
Yes or no |
| Exit | Port | Notes |
|---|---|---|
| Out | out |
|
| Not found | not_found |