SQL Server Query¶
Executes a SQL Server SELECT query and returns the results. It formats a human-readable summary and provides the raw JSON response. Export-oriented fields (HTML, XLSX, PDF) are not produced by this node and will be empty.

Usage¶
Use this node to read data from a Microsoft SQL Server database using a SELECT statement. Provide a valid SQL Server connection URI in credentials_path, set an optional timeout, and enter the SQL query in sql_text. Typically used early in a workflow to fetch data for analysis, transformation, or downstream processing.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| credentials_path | True | STRING | Database connection URI for SQL Server. Must be a valid URI such as mssql:// or sqlserver:// including host, port, database, and optionally username/password. | mssql://sa: |
| timeout | True | INT | Maximum time in seconds to wait for the query request to complete. | 60 |
| sql_text | True | STRING | SQL SELECT query to execute against the SQL Server database. | SELECT TOP 10 * FROM users |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| result | STRING | A formatted, human-readable summary of the query results, including row count and row details. | Query Results (10 rows): id: 1 \| name: Alice \| email: alice@example.com id: 2 \| name: Bob \| email: bob@example.com |
| json_result | STRING | Raw JSON response as a string containing the query data and metadata (e.g., data array, row_count). | {"data": [{"id": 1, "name": "Alice"}, {"id": 2, "name": "Bob"}], "row_count": 2} |
| html_table | STRING | HTML representation of the results. For this node, this field is not generated and will be an empty string. | |
| xlsx_data | STRING | Base64-encoded XLSX of the results. For this node, this field is not generated and will be an empty string. | |
| pdf_data | STRING | Base64-encoded PDF of the results. For this node, this field is not generated and will be an empty string. |
Important Notes¶
- Credentials URI: credentials_path must be a valid database URI (e.g., mssql://user:pass@host:port/database or sqlserver://...).
- Authentication: If using SQL authentication, ensure username and password are included in the URI. Do not include real secrets in shared projects.
- Timeouts: Long-running queries may exceed the timeout; increase timeout or optimize the query.
- Permissions: The connected user must have privileges to read the referenced tables or views.
- Output formats: Only the text summary and JSON are returned; HTML/XLSX/PDF outputs are empty.
Troubleshooting¶
- Invalid credentials URI: If you see a validation error, ensure the URI starts with mssql:// or sqlserver:// and includes host, port, and database.
- Connection or timeout errors: Verify network access to the database host and port, confirm firewall rules, and increase the timeout value if necessary.
- Authentication failures: Check that the username/password or integrated security configuration is correct for the target server.
- No data returned: Confirm the SQL query is correct and the target table contains rows; try simplifying the query to test connectivity.
- Permission denied: Ensure the database user has SELECT privileges on the target schema/table.