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

לעדכן שורה בטבלה

שלבupdate-rowsaveהשפעה חיצונית

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

במבט אחד​

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

קלט​

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

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

פלט​

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

פלטסוג
rowIdstring
updatedboolean

הגדרות​

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

הגדרהסוגברירת מחדלתיאור
sheetחובהstring-Name of the table whose row to update.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 finds the row: the oldest one that passes every test.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-
setחובהmap of string-Set is what to change, as add-row's mapping: a column name to "{field}", text with {placeholders}, or a plain value. A value that turns out empty leaves its column as it is.
ifMissingstring"fail"IfMissing is fail (the default) or skip, when no row passes.one of fail, skip

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

דוגמה​

config
set:
status: on-hold
sheet: Suppliers
where:
- column: name
op: eq
value: '{supplier}'

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

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

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