Hi folks,
I’m trying the node IBM DB2 in my n8n test installation, to execute a query to my AS400 server. So I’ve added the module, and this module seems to work fine. I can query a static SQL and get the result, with no issue
Describe the problem/error/question
But the problem is that I would like to execute a query that uses JSON data as input.
What is the error message (if any)?
seems that my JS code written like this : {{ json.xxxxxx }} is interpreted by the query as text, and it is not using the value of the result of the JS code.
See below the workflow :
As seen in the screenshot, it returns the json.xxx text, instead of the result of the json.xxxx value : it should result 2 lines with ‘ADAVD’.
So I’m wondering if I 'm doing something wrong ?
Thanks for your help.
Regards,
Nicolas
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
{
“meta”: {
“instanceId”: “48cc4ee71a57de6eac2d5c69eec6fce44ab0d241e37f3c9d230ff706c86ee9c9”
},
“nodes”: [
{
“parameters”: {
“query”: “select ‘{{ $json.subject }}’ from QGPL/USERLIST \nLIMIT 2\n”
},
“id”: “967ab7c9-9e0f-4859-8297-de7f9c9fe8fb”,
“name”: “IBMi DB2”,
“type”: “n8n-nodes-ibmi-db2.ibmiDb2”,
“typeVersion”: 1,
“position”: [
900,
80
],
“alwaysOutputData”: true,
“credentials”: {
“ibmiDb2JdbcApi”: {
“id”: “plNF6LCdstWoG8QX”,
“name”: “IBM I Db2 account 2”
}
}
}
],
“connections”: {},
“pinData”: {}
}
Share the output returned by the last node
Information on your n8n setup
- n8n version: 1:20
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: linux