perf(Google Sheets Node): Don't load whole spreadsheet dataset to determine columns when appending data (#11235)
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions

This commit is contained in:
Sören Uhrbach 2024-10-15 06:54:23 +02:00 committed by GitHub
parent 7c7f2fb85a
commit 26ad091f47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -226,7 +226,9 @@ export async function execute(
keyRowIndex = locationDefine.headerRow as number;
}
const sheetData = await sheet.getData(range, 'FORMATTED_VALUE');
const [sheetNameForKeyRow] = range.split('!');
const sheetNameWithRangeForKeyRow = `${sheetNameForKeyRow}!1:${keyRowIndex}`;
const sheetData = await sheet.getData(sheetNameWithRangeForKeyRow, 'FORMATTED_VALUE');
if (sheetData === undefined || !sheetData.length) {
dataMode = 'autoMapInputData';