דלג לתוכן הראשי

לחפש שורה בטבלה

שלבfind-rowread

מוצא בטבלה את השורה שמתאימה, ומביא את העמודות שלה לשלבים שאחריו.

במבט אחד​

מאפייןערך
שם השלבfind-row
משאבClusterStep (lumen.ai/v1alpha1)
קבוצה וקטגוריהread, tables
קרדיטים1 קרדיט בכל פעם שהוא מצליח
השפעה חיצוניתלא
ההתקנה צריכה לספקכלום

קלט​

מאפייןערך
צריךכלום
מפיקfields
עובד עלitem מסמך אחד בכל פעם

״צריך״ ו״מפיק״ הם סוגי נתונים (file, text, fields, email). העורך מציע שלב רק במקום שבו מה שהוא צריך כבר נמצא במסלול. ראו מסמכים ונתונים.

פלט​

צומת מאוחר יותר מפנה לפלט כ-{nodeId.field} בטקסט, או כ-nodeId.field בתנאי.

פלטסוג
foundboolean
countnumber
rowIdstring
rowsarray
truncatedboolean

More outputs are declared in the setting returns.

הגדרות​

מגדירים תחת config: בצומת של התהליך. הגדרות טקסט יכולות להכיל מצייני מקום כמו {nodeId.field}.

הגדרהסוגברירת מחדלתיאור
sheetחובהstring-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
whereחובהlist of object-Where are the tests a row must all pass.minItems 1; maxItems 8
where[].columnחובהstring-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[].valueחובהstring-
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[].nameחובהstring-minLength 1

ה-JSON Schema המלא של ההגדרות: find-row.schema.json.

דוגמה​

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

שימוש בתהליך​

צומת שמריץ את find-row נכנס תחת spec.nodes של Flow. תנו לו כל מזהה, ורשמו ב-next את מזהי הצמתים הבאים.

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}'