first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,168 @@
|
||||
{
|
||||
"createdAt": "2025-09-24T12:19:51.268Z",
|
||||
"updatedAt": "2025-09-24T12:20:45.000Z",
|
||||
"name": "Data table node",
|
||||
"active": true,
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "allIncomingItems",
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.4,
|
||||
"position": [688, 0],
|
||||
"id": "a7eeb256-a47e-4fe9-a0e1-b33015912b15",
|
||||
"name": "Respond to Webhook"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "data-table-node-benchmark",
|
||||
"responseMode": "responseNode",
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2.1,
|
||||
"position": [-288, 0],
|
||||
"id": "b54681a1-6cfc-4970-ad33-25cb8fec6936",
|
||||
"name": "Webhook",
|
||||
"webhookId": "4748ca75-3b3c-4e4a-8913-3590fdc1867d"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"fieldToSplitOut": "body.items",
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"typeVersion": 1,
|
||||
"position": [96, 0],
|
||||
"id": "019d451f-604f-4ed6-8f40-1beb86445061",
|
||||
"name": "Split Out"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"dataTableId": {
|
||||
"__rl": true,
|
||||
"value": "={{ $('Webhook').item.json.body.dataTableId }}",
|
||||
"mode": "list"
|
||||
},
|
||||
"columns": {
|
||||
"mappingMode": "defineBelow",
|
||||
"value": {
|
||||
"isActive": "={{ $json.isActive }}",
|
||||
"firstName": "={{ $json.firstName }}",
|
||||
"birthDate": "={{ $json.birthDate }}",
|
||||
"age": "={{ $json.age }}"
|
||||
},
|
||||
"matchingColumns": [],
|
||||
"schema": [
|
||||
{
|
||||
"id": "firstName",
|
||||
"displayName": "firstName",
|
||||
"required": false,
|
||||
"defaultMatch": false,
|
||||
"display": true,
|
||||
"type": "string",
|
||||
"readOnly": false,
|
||||
"removed": false
|
||||
},
|
||||
{
|
||||
"id": "age",
|
||||
"displayName": "age",
|
||||
"required": false,
|
||||
"defaultMatch": false,
|
||||
"display": true,
|
||||
"type": "number",
|
||||
"readOnly": false,
|
||||
"removed": false
|
||||
},
|
||||
{
|
||||
"id": "birthDate",
|
||||
"displayName": "birthDate",
|
||||
"required": false,
|
||||
"defaultMatch": false,
|
||||
"display": true,
|
||||
"type": "dateTime",
|
||||
"readOnly": false,
|
||||
"removed": false
|
||||
},
|
||||
{
|
||||
"id": "isActive",
|
||||
"displayName": "isActive",
|
||||
"required": false,
|
||||
"defaultMatch": false,
|
||||
"display": true,
|
||||
"type": "boolean",
|
||||
"readOnly": false,
|
||||
"removed": false
|
||||
},
|
||||
{
|
||||
"id": "empty",
|
||||
"displayName": "empty",
|
||||
"required": false,
|
||||
"defaultMatch": false,
|
||||
"display": true,
|
||||
"type": "string",
|
||||
"readOnly": false,
|
||||
"removed": false
|
||||
}
|
||||
],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.dataTable",
|
||||
"typeVersion": 1,
|
||||
"position": [448, 0],
|
||||
"id": "05a47403-6c7d-4aad-b0eb-ca726e7594c9",
|
||||
"name": "Insert row"
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Insert row": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Insert row",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"pinData": {},
|
||||
"settings": { "executionOrder": "v1" },
|
||||
"staticData": null,
|
||||
"versionId": "cdd59544-4b5d-42c0-a07f-8ab48a9d849c",
|
||||
"triggerCount": 1,
|
||||
"tags": [],
|
||||
"meta": {
|
||||
"responseMode": "lastNode",
|
||||
"options": {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"$schema": "../scenario.schema.json",
|
||||
"name": "DataTableNode",
|
||||
"description": "A Data table node that first inserts 100 items and then reads them from the table. The data is returned with RespondToWebhook Node.",
|
||||
"scenarioData": {
|
||||
"workflowFiles": ["data-table-node.json"],
|
||||
"dataTableFile": "data-table.json"
|
||||
},
|
||||
"scriptPath": "data-table-node.script.js"
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import http from 'k6/http';
|
||||
import { check } from 'k6';
|
||||
|
||||
const apiBaseUrl = __ENV.API_BASE_URL;
|
||||
const dataTableId = __ENV.DATA_TABLE_ID;
|
||||
|
||||
export default function () {
|
||||
const res = http.post(`${apiBaseUrl}/webhook/data-table-node-benchmark`, {
|
||||
dataTableId: dataTableId,
|
||||
items: Array.from({ length: 100 }, (_, i) => ({
|
||||
firstName: `Item ${i + 1}`,
|
||||
age: Math.floor(Math.random() * 100),
|
||||
birthDate: new Date(),
|
||||
isActive: i % 2 === 0,
|
||||
})),
|
||||
});
|
||||
|
||||
if (res.status !== 200) {
|
||||
console.error(
|
||||
`Invalid response. Received status ${res.status}. Body: ${JSON.stringify(res.body)}`,
|
||||
);
|
||||
}
|
||||
|
||||
check(res, {
|
||||
'is status 200': (r) => r.status === 200,
|
||||
'has items in response': (r) => {
|
||||
if (r.status !== 200) return false;
|
||||
|
||||
try {
|
||||
const body = JSON.parse(r.body);
|
||||
return Array.isArray(body) ? body.length === 100 : false;
|
||||
} catch (error) {
|
||||
console.error('Error parsing response body: ', error);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "data-table-node-benchmark",
|
||||
"columns": [
|
||||
{
|
||||
"name": "firstName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "age",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "birthDate",
|
||||
"type": "date"
|
||||
},
|
||||
{
|
||||
"name": "isActive",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "empty",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user