SQL-DB Client Connect
This function block is used to configure and establish a connection to a SQL database (MySQL, PostgreSQL, MSSQL, SQLite). Use it to create a persistent database client that other blocks can use to run queries or perform data operations.
π₯ Inputs
This function block does not have input sockets.
π€ Outputs
DB Client A reusable database client object that other blocks (for example SQL-DB Operations) can use to execute queries and transactions.
Connection Success A boolean indicating whether the connection was established successfully.
πΉοΈ Controls
Database Type A dropdown to choose the kind of database (MySQL, PostgreSQL, MSSQL, SQLite). Choosing SQLite will simplify the UI because no host/port/user/password are required.
Host Hostname or IP address of the database server. Hidden for SQLite.
Database Database name. For SQLite this field is used as the database file path.
Port TCP port of the database server. Hidden for SQLite.
User Database username. Hidden for SQLite.
Password Database password. Hidden for SQLite.
Note: Changing any of these fields will reset the existing connection and trigger a new connection attempt when the block is evaluated.
π― Features
Simple multi-database support with a single, unified UI for common SQL backends.
SQLitecompatibility with reduced fields when a file-based database is selected.Outputs a ready-to-use
DB Clientand aConnection Successflag for downstream logic and error handling.Automatic reconnection when configuration changes are detected.
π Usage Instructions
Select
Database Typethat matches your server.Fill in
Host,Port,User,Password, andDatabaseas appropriate (forSQLiteprovide the file path inDatabase).Run your scenario or evaluate the block. The block will attempt to connect and will set
Connection Successaccordingly.Use the provided
DB ClientwithSQL-DB Operationsto perform queries, inserts, updates, or other database tasks.If you change any connection fields, the block will reset the current connection and attempt to reconnect on next evaluation.
π Evaluation
When evaluated, the block validates the provided parameters and attempts to establish a connection. On success it exposes a reusable client via the DB Client output and sets Connection Success to true. On failure it logs an error and sets Connection Success to false.
π‘ Tips and Tricks
Combine with
SQL-DB Operationsto run queries and return results into the flow.Use
Data to JSONto serialize complex results before writing them to files or sending them over a network.Use
CSV ExportorImage Logger(for image-related metadata) to persist results coming from database queries.Use
Data Write LocalorData Write Globalto store theDB Clientor recent query results for reuse across different parts of your project.Use
Debug Inputto inspect raw outputs fromSQL-DB Operationswhile building and troubleshooting your scenario.
π οΈ Troubleshooting
Connection fails but credentials are correct: verify network access to
Hostand that the selectedPortis open and accepting connections.Using
SQLite: ensure the path provided inDatabaseis accessible and the application has file permissions to read/write that file.If configuration changes appear not to take effect: edit any control (for example
Host) to force the block to reset and re-establish the connection.If you need to confirm returned data while developing, attach
SQL-DB OperationsandDebug Inputto inspect responses before integrating them further.
Last updated
Was this helpful?