Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Serverless Integrations
  • Comparison with other Yandex Cloud services
    • Overview
      • Workflow
      • Starting a workflow execution
        • Overview
          • HTTPCall
          • GRPCCall
          • YMQ
          • YDS
          • YDBDocument
          • FunctionCall
          • ContainerCall
          • FoundationModelsCall
          • ObjectStorage
          • Tracker
          • Postbox
          • Workflow
          • Disk
          • AIAgent
          • TelegramBot
          • AIStudioAgent
          • VectorStore
          • DatabaseQuery
      • Templating
    • Cron expressions
    • Quotas and limits
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Public materials
  • Release notes

In this article:

  • DatabaseConnection
  • DatabaseConnectionSimpleAuth
  1. Concepts
  2. Workflows
  3. YaWL specification
  4. Integration steps
  5. DatabaseQuery

DatabaseQuery

Written by
Yandex Cloud
Updated at October 30, 2025
  • DatabaseConnection
  • DatabaseConnectionSimpleAuth

SQL queries against MySQL®, PostgreSQL, ClickHouse®, and YDB databases.

The connection and dsn fields are mutually exclusive: you can use only one of them.

Field name

Type

Required

Default value

Templating is supported

Description

connection

DatabaseConnection

No

No

No

Database connection parameters

dsn

string

No

No

No

Database connection string (DNS). Supported schemas: postgres://, postgresql://, clickhouse://, grpc://, grpcs://, ydb://, and the MySQL® DSN format (user:pass@tcp(host:port)/db?...).

query

string

Yes

No

Yes

SQL query text

mode

string

No

EXEC

No

SQL query execution method. Values to choose from:

  • EXEC: Execute the SQL query and return the service fields only, e.g., RowsAffected and LastInsertId.
  • QUERY: Execute the SQL query and return the result.

DatabaseConnectionDatabaseConnection

The simple and iam fields are mutually exclusive: you can use only one of them. The iam field is only supported for YDB databases.

For a MySQL® database, parseTime=true and charset=utf8mb4 are set automatically.

Field name

Type

Required

Default value

Templating is supported

Description

type

string

Yes

No

No

Database type. Possible values: MYSQL, POSTGRES, YDB, and CLICKHOUSE.

host

string

Yes

No

No

Database host.

port

number

Yes

No

No

Database port.

database

string

Yes

No

No

Database name.

ssl

bool

No

false

No

If true, the database connection is over SSL.

Additionally,

  • For a PostgreSQL database, set sslmode=require if ssl=true. Otherwise, sslmode=disable.
  • For a ClickHouse® database, set secure=true if ssl=true.

simple

DatabaseConnectionSimpleAuth

No

No

Yes

Authentication by username and password.

iam

bool

No

No

No

Authentication by IAM token of the service account specified in the workflow settings.

DatabaseConnectionSimpleAuthDatabaseConnectionSimpleAuth

Field name Type Required Default value Templating is supported Description
username string Yes No Yes Username.
password string Yes No Yes User password.

Was the article helpful?

Previous
VectorStore
Next
Switch
© 2025 Direct Cursus Technology L.L.C.