Yandex Cloud YDB icon

Yandex Cloud YDB

Interact with Yandex Cloud YDB (Yandex Database)

Actions2

Query → Execute with Parameters

AI-generated

Summary

Execute a parameterized YQL query on a Yandex Cloud YDB database using provided connection and authorization credentials, optionally specifying query parameters and controlling the format of returned results.

Inputs

  • YQL Query (required) — The YQL query string to execute, which can include named parameters prefixed with $. Example: SELECT * FROM users WHERE id = $id.
  • Query Parameters — An optional collection of named parameters with their values to pass to the YQL query for parameter substitution. Names should omit the $ prefix. Values are parsed as JSON where possible, otherwise treated as strings.
  • Return Mode — Determines how the query results are returned. Options include returning all result sets, just the first result set, or only the first row of the first result set.

Output shape

a list of items each containing the query result formatted according to the chosen return mode

If 'All Result Sets' is selected, the output item contains all result sets with counts. If 'First Result Set', output includes rows and row count of the first set. If 'First Row Only', output contains a single row object or null if no data. Supports multiple input items processed sequentially; errors are isolated per item if 'Continue On Fail' is enabled.

Examples

Example 1: Execute a parameterized SELECT query to retrieve user information by ID

Set YQL Query to 'SELECT * FROM users WHERE id = $userId', add a Query Parameter named 'userId' with the desired ID value, and choose a Return Mode such as 'First Row Only' to get the single matching user record.

Links

Discussion