לחפש שורה בטבלה
שלב
find-rowreadמוצא בטבלה את השורה שמתאימה, ומביא את העמודות שלה לשלבים שאחריו.
במבט אחד
| מאפיין | ערך |
|---|---|
| שם השלב | find-row |
| משאב | ClusterStep (lumen.ai/v1alpha1) |
| קבוצה וקטגוריה | read, tables |
| קרדיטים | 1 קרדיט בכל פעם שהוא מצליח |
| השפעה חיצונית | לא |
| ההתקנה צריכה לספק | כלום |
קלט
| מאפיין | ערך |
|---|---|
| צריך | כלום |
| מפיק | fields |
| עובד על | item מסמך אחד בכל פעם |
״צריך״ ו״מפיק״ הם סוגי נתונים (file, text, fields, email). העורך מציע שלב רק במקום שבו מה שהוא צריך כבר נמצא במסלול. ראו מסמכים ונתונים.
פלט
צומת מאוחר יותר מפנה לפלט כ-{nodeId.field} בטקסט, או כ-nodeId.field בתנאי.
| פלט | סוג |
|---|---|
found | boolean |
count | number |
rowId | string |
rows | array |
truncated | boolean |
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 |
base | string | - | 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[].op | string | "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 | - | |
all | boolean | - | All brings back every match, up to limit, as the list field rows. The first match is always the fields. |
limit | integer | - | 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 |
prefix | string | - | 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 |
returns | list 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}'
הדף עזר לכם?