Interacting with document tables in Yandex Managed Service for YDB
-
When creating a new workflow or editing an existing one, in the management console, under Create workflow / Edit workflow, select
Constructor
. -
From the Integration steps section on the left side of the screen, drag the
Managed Service for YDB element to the relevant workflow location in the constructor window.You can drag and drop steps into areas marked by the dotted line in the workflow schema, such as Add a step, etc.
-
In the workflow schema window, click the new Managed Service for YDB section to select it.
-
At the right of the window, on the Settings tab.
-
In the Step name field, enter a name for the workflow step.
-
In the Database field, select a database. Only databases created in Serverless mode are supported.
-
In the Path to table field, specify the path to the table the workflow will interact with. Only document tables are supported.
-
Under Action, select:
-
Get
to get the contents of an element in the database; in the Key field, specify the value of the DB primary key related to the element in question. -
Put
to write data to the table; in the Attributes field, specify an associative array of attributes inkey
/value
format. -
Update
to update data in the table. Configure the update options:- In the Key field, specify the primary key value of the database element you want to update.
- In the Expression for update field, specify an expression describing the updates of the element's attributes in the database. For details, refer to the
UpdateExpression
parameter information in the relevant Yandex Managed Service for YDB documentation. - In the Attribute values field, specify the attribute values used in the expression above. For details, refer to the
ExpressionAttributeValues
parameter information in the relevant Yandex Managed Service for YDB documentation.
-
Scan
to search the database. Configure the search parameters:- In the Key field, specify the value of the primary key of the database element the search will start from.
- In the Limit field, set a limit on the maximum number of elements in the list of results.
-
-
Optionally, in the Timeout, ms field, set the maximum execution time for the current step.
-
Optionally, to set a custom retry policy for a step, expand the Retry policy section and click
Retry policy. In the form that appears:-
Optionally, in the Initial delay, ms field, set the initial value for a delay between step retries.
-
Optionally, in the Backoff rate field, set the multiplication factor for delay before each step retry.
-
Optionally, in the Maximum delay, ms field, set the value for a maximum delay between step retries.
-
In the Errors field, select the errors for which the step will or will not be retried.
For detailed information about possible errors, see this section.
-
Optionally, in the Maximum number of retries field, set the maximum number of step retry attempts.
-
In the Error selection mode field, select:
INCLUDE
: Retry executing a step when errors specified in the Errors field occur.EXCLUDE
: To retry executing the step on any errors other than those specified in the Errors field.
If you want to delete a retry policy you created for the step earlier, click
and select Delete in the Retry policy row.If no custom retry policy is configured for a step, the retry policy set for the whole workflow will apply.
-
-
-
Optionally, navigate to the Input tab and set a jq template to filter the workflow state fed into the step.
-
Optionally, navigate to the Output tab and set a jq template to filter the step outputs added into the workflow state.