feat: Do not assign all paired items (no-changelog) (#11716)

This commit is contained in:
Michael Kret
2025-02-06 15:46:28 +02:00
committed by GitHub
parent 2eabca5613
commit 4c2546dc78
33 changed files with 55 additions and 236 deletions

View File

@@ -16,7 +16,6 @@ import { oldVersionNotice } from '@utils/descriptions';
import { googleApiRequest, googleApiRequestAllItems, simplify } from './GenericFunctions';
import { recordFields, recordOperations } from './RecordDescription';
import { generatePairedItemData } from '../../../../utils/utilities';
const versionDescription: INodeTypeDescription = {
displayName: 'Google BigQuery',
@@ -195,8 +194,6 @@ export class GoogleBigQueryV1 implements INodeType {
body.rows = rows;
const itemData = generatePairedItemData(items.length);
try {
responseData = await googleApiRequest.call(
this,
@@ -205,17 +202,11 @@ export class GoogleBigQueryV1 implements INodeType {
body,
);
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(responseData as IDataObject[]),
{ itemData },
);
const executionData = this.helpers.returnJsonArray(responseData as IDataObject[]);
returnData.push(...executionData);
} catch (error) {
if (this.continueOnFail()) {
const executionErrorData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray({ error: error.message }),
{ itemData },
);
const executionErrorData = this.helpers.returnJsonArray({ error: error.message });
returnData.push(...executionErrorData);
}
throw new NodeApiError(this.getNode(), error as JsonObject, { itemIndex: 0 });

View File

@@ -7,7 +7,7 @@ import type {
import { NodeOperationError } from 'n8n-workflow';
import { v4 as uuid } from 'uuid';
import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities';
import { updateDisplayOptions } from '@utils/utilities';
import type { TableSchema } from '../../helpers/interfaces';
import { checkSchema, wrapData } from '../../helpers/utils';
@@ -227,7 +227,6 @@ export async function execute(this: IExecuteFunctions): Promise<INodeExecutionDa
}
}
const itemData = generatePairedItemData(items.length);
for (let i = 0; i < rows.length; i += batchSize) {
const batch = rows.slice(i, i + batchSize);
body.rows = batch;
@@ -281,10 +280,7 @@ export async function execute(this: IExecuteFunctions): Promise<INodeExecutionDa
});
}
const executionData = this.helpers.constructExecutionMetaData(
wrapData(responseData as IDataObject[]),
{ itemData },
);
const executionData = wrapData(responseData as IDataObject[]);
returnData.push(...executionData);
}