Execute SQL query
Description
Expects a SQL query to execute, outputs a json in a long text format
Input Ports
| Name | dataType | sourceType | required | description |
|---|---|---|---|---|
| Username | text | link-manual | true | The user name of the account |
| Password | text | link-manual | true | The password of the account |
| Host | text | link-manual | true | The host address of the database server |
| Port | text | link-manual | true | The port number of the database server |
| Database name | text | link-manual | true | The name of the database |
| Options | data-item | link-manual | false | Options are for some connection params that does not require a username and password |
| Query | long-text | link-manual | true | The raw query you want to execute |
Scenarios
- The user wants to connect to a
mysqldatabase and execute a rawquery - The user wants to connect to a
SQLitedatabase and execute a rawquery - The user wants to connect to a
Postgressdatabase and execute a rawquery - The user wants to connect to a
Oracledatabase and execute a rawquery - The user wants to connect to a
MSSQLdatabase and execute a rawquery
Use case
Inputs
- Username:
root - Password:
***** - Host:
localhost - Port:
3306 - Database name:
deviceRepository - Options:
- Query:
Select * from devices
Experienced tips
- If you do not specify an database server
Hostaddress, the process will continue and use the default host address oflocalhost - If you do not specify an database server
Portnumber, the process will continue and use the default port number of the database adapter - If you specify an incorrect database server
Portnumber, the process will stop and provide you with the following error.connect ECONNREFUSED 127.0.0.1:33055 - If the username or password is incorrect, the process will stop and provide you with the following error.
ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server - If you target the
Sqlitedatabase adapter, you can access the data without making use of the username and password, only provide the filename inside of theoptions
Search Tags
Execute Raw database query