CONNECT TO A DATABASE TO SELECT RECORDS BASED ON A QUERY¶
Connects to a MySQL, Microsoft SQL Server, or Oracle database and executes a user-supplied SELECT query, returning the matched records as a dataset. Use this worker whenever a workflow needs to pull structured data from a relational database at runtime.
When to use¶
Tagged: database, mssql, mysql, oracle, query, records, select, sql.
Inputs¶
| Label | ID | Type | Default | Required | Description |
|---|---|---|---|---|---|
| Database Type | db_type | select | mysql | ✓ | Relational database engine to connect to; choose ‘mysql’ (default), ‘msserver’ for Microsoft SQL Server, or ‘oracle’ for Oracle SQL Server — must match the target server’s engine. |
| Hostname | db_host | text | localhost | ✓ | Hostname or IP address of the database server; defaults to ‘localhost’ for a server running on the same host as the worker. |
| Port | db_port | text | 3306 | ✓ | TCP port the database server listens on; defaults to ‘3306’ (standard MySQL port) — change to ‘1433’ for MSSQL or ‘1521’ for Oracle as needed. |
| Username | db_user | text | mysql | ✓ | Username used to authenticate with the database; defaults to ‘mysql’ — supply a least-privilege read-only account when possible. |
| Password | db_password | password | — | ✓ | Password for the specified database user; treated as a secure/masked field and never echoed in logs. |
| Database | db_database | text | — | ✓ | Name of the specific database (schema) to connect to on the target server. |
| Database Query | db_query | textarea | — | ✓ | Full SQL SELECT statement to execute against the database; should be a read-only query — e.g. ‘SELECT * FROM results WHERE run_id = 42’. |
Outputs¶
| Label | ID | Type | Description |
|---|---|---|---|
| Records | records | dataset | Tabular dataset containing all rows returned by the SQL query, with column names matching the queried table or aliased projection. |
| Log | log | dataset | Execution log dataset capturing connection status, row count retrieved, elapsed time, and any warnings or errors raised during the query. |
Disciplines¶
- data.io.sql
Auto-generated from platform schema. Worker id: database_select. Schema hash: 4bda15826bed. Hand-curated docs in workerexamples/ override this page when present.