fix(core): Missing pairing info (#7326)

Github issue / Community forum post (link here to close automatically):
This commit is contained in:
Michael Kret
2023-10-10 18:36:20 +03:00
committed by GitHub
parent 6479eb180f
commit e2c3c7aceb
52 changed files with 363 additions and 157 deletions

View File

@@ -20,6 +20,7 @@ import { recordFields, recordOperations } from './RecordDescription';
import { v4 as uuid } from 'uuid';
import { oldVersionNotice } from '@utils/descriptions';
import { generatePairedItemData } from '../../../../utils/utilities';
const versionDescription: INodeTypeDescription = {
displayName: 'Google BigQuery',
@@ -198,6 +199,8 @@ export class GoogleBigQueryV1 implements INodeType {
body.rows = rows;
const itemData = generatePairedItemData(items.length);
try {
responseData = await googleApiRequest.call(
this,
@@ -208,14 +211,14 @@ export class GoogleBigQueryV1 implements INodeType {
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(responseData as IDataObject[]),
{ itemData: { item: 0 } },
{ itemData },
);
returnData.push(...executionData);
} catch (error) {
if (this.continueOnFail()) {
const executionErrorData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray({ error: error.message }),
{ itemData: { item: 0 } },
{ itemData },
);
returnData.push(...executionErrorData);
}

View File

@@ -6,7 +6,7 @@ import type {
} from 'n8n-workflow';
import { NodeOperationError } from 'n8n-workflow';
import { v4 as uuid } from 'uuid';
import { updateDisplayOptions } from '@utils/utilities';
import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities';
import type { TableSchema } from '../../helpers/interfaces';
import { checkSchema, wrapData } from '../../helpers/utils';
import { googleApiRequest } from '../../transport';
@@ -225,6 +225,7 @@ 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;
@@ -279,7 +280,7 @@ export async function execute(this: IExecuteFunctions): Promise<INodeExecutionDa
const executionData = this.helpers.constructExecutionMetaData(
wrapData(responseData as IDataObject[]),
{ itemData: { item: 0 } },
{ itemData },
);
returnData.push(...executionData);