Zum Hauptinhalt springen

Look up a row in a table

Schrittfind-rowread

Finds the row in one of your tables that matches, and brings its columns into the steps after it.

Auf einen Blick​

EigenschaftWert
Schrittnamefind-row
RessourceClusterStep (lumen.ai/v1alpha1)
Palettengruppe, Kategorieread, tables
Credits1 Credit bei jedem Erfolg
Externe Wirkungnein
Die Installation muss bereitstellennichts

Eingaben​

EigenschaftWert
Brauchtnichts
Liefertfields
Arbeitet aufitem einem Dokument nach dem anderen

Braucht und Liefert sind Datentypen (file, text, fields, email). Der Editor bietet einen Schritt nur dort an, wo das, was er braucht, schon auf dem Pfad liegt. Siehe Dokumente und Daten.

Ausgaben​

Ein späterer Knoten verweist auf eine Ausgabe als {nodeId.field} in einem Text oder als nodeId.field in einer Bedingung.

AusgabeTyp
foundboolean
countnumber
rowIdstring
rowsarray
truncatedboolean

More outputs are declared in the setting returns.

Einstellungen​

Wird unter config: im Knoten des Flows gesetzt. Texteinstellungen dürfen Platzhalter wie {nodeId.field} enthalten.

EinstellungTypStandardwertBeschreibung
sheeterforderlichstring-Name of the table to look the row up in.minLength 1
basestring-Name of the base (database) the table is in. Optional: when set, the table must belong to this base.minLength 1
whereerforderlichlist of object-Where are the tests a row must all pass.minItems 1; maxItems 8
where[].columnerforderlichstring-minLength 1
where[].opstring"eq"Op is eq (the default), contains (text, case-insensitive), or gt, gte, lt, lte (numbers, amounts and dates).one of eq, contains, gt, gte, lt, lte
where[].valueerforderlichstring-
allboolean-All brings back every match, up to limit, as the list field rows. The first match is always the fields.
limitinteger-Limit is how many rows all brings back; 50 when unset, 10000 at most. When more rows match, the output truncated is true.minimum 1; maximum 10000
prefixstring-Prefix goes before each column name in the fields, so a looked-up value does not replace a field of the same name.maxLength 32
returnslist of object-Returns lists the columns later steps will use, so the editor can offer them. All of the row's columns are brought back either way.maxItems 100
returns[].nameerforderlichstring-minLength 1

Das vollständige JSON Schema dieser Einstellungen: find-row.schema.json.

Beispiel​

config
returns:
- name: contact
- name: city
- name: status
sheet: Suppliers
where:
- column: name
op: eq
value: '{supplier}'

Im Flow verwenden​

Ein Knoten, der find-row ausführt, steht unter spec.nodes eines Flow. Geben Sie ihm eine beliebige id und nennen Sie in next die ids der nächsten Knoten.

flow.yaml
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
name: find-row-example
namespace: tenant-acme
spec:
displayName: "Look up a row in a table"
triggers:
- id: start
ref: {name: manual-run}
next: [find-row]
nodes:
- id: find-row
stepRef: {name: find-row}
config:
returns:
- name: contact
- name: city
- name: status
sheet: Suppliers
where:
- column: name
op: eq
value: '{supplier}'