DB Engine | Qntrl | Bridge | Online Help | Execute SQL query in a database

DB Engine

DB Engine is used to connect with the database in the client's machine or client's network and perform READ/INSERT/UPDATE operations in the database. The DB Engine configured in Bridge can be utilized in the following two distinct modules within Qntrl.

  1. DB Lookup fieldEstablishes a connection with the customer's database, executes queries, and presents the response in a dropdown or multi-select field within Qntrl. Check DB Lookup for more details.
  2. Circuit - In the Circuit workflow, DB Engine states to establish a connection with the client's database executes the defined query, and performs a task. Check DB Task for more details. 


Prerequisite
While creating Credentials for DB Engine, choose the credential type as JDBCClick here to learn how to create a credential.

Request data  
{
  "task_name": "db_task",
  "credential": {
 "name": "<CREDENTIAL_NAME>"
 },
 "task_details": {
 "database": "<DATABASE_NAME>",
  "db_query": "<SELECT NAME FROM <table>>",
  "port": 3306,
  "query_timeout": 10000,
  "host": "<HOST_NAME>",
  "sql_type": 1   
  }
 }


Where,
Keys
Description

 task_name

 

  A system-defined name for the respective module.
  1.     'db_task' - task name for SELECT operations.
  2.     'db_dml_task' - task name for INSERT/UPDATE operations
 credential  A JSON object that contains details of the JDBC credential.
 name  Name of the DB credential.
 task_details  A JSON object that contains details of the DB task.
 database  Name of the client database.
 db_query  DB query to be executed (SELECT/INSERT/UPDATE).
 portThe port used by the DB, by default, MySQL runs in port 3306, SQL Server in 1433, and PostgreSQL in 5432. If your database runs on a different port number, update this field accordingly.
 query_timeout
 (optional)
 Time to wait for an SQL request to complete.
 host Host name of the machine in which DB resides.
 sql_type The database used. For MySQL - 1, for SQLServer - 3, for PostgreSQL - 4
 allow_multiple_columns
 (optional)
  Specifies the columns in SQL Query to be considered for data retrieval.   
  1. 'true' - retrieves the data of all the columns listed in the SQL query
  2. 'false' - retrieves only the values of the first column in the Select column list of SQL query
  If not specified it takes the default value as 'false'.



    • Related Articles

    • DB Engine

      This state enables a connection with the database hosted on a private or local network and executes the defined SQL query in the database. Prerequisite An active Bridge agent. Refer here to install and configure Bridge. Create the necessary ...
    • Task Engine

      Circuit's Task Engine state is used to connect with other applications and access APIs from a closed space. To retrieve data from a private network, the required API must be accessed from the local machine's network for the required conditions. ...
    • Task Engine

      In Qntrl, while public APIs can be configured and executed directly through Webhooks, the client's internal APIs that are exposed only to the local network can be executed using the Task Engine module in Bridge. The Task Engine configured in Bridge ...
    • SSH Engine

      SSH Engine module in Bridge is used to perform actions in the client network/client's machine by executing a command/script in Linux/UNIX OS. Prerequisite While creating credentials for SSH Engine, choose the Credential type as SSH. Click here to ...
    • SSH Engine

      SSH Engine state is configured to connect to a client's machine or network and remotely execute commands or scripts on the client's Linux/UNIX operating system. Prerequisite Bridge must be installed and should be active. Learn how to install and ...

    You are currently viewing the help articles of Qntrl 3.0. If you are still using our older version and require guidance with it, Click here.