Skip to content

Commit

Permalink
perf(Google Sheets Node): Don't load whole spreadsheet dataset to det…
Browse files Browse the repository at this point in the history
…ermine columns when appending data (#11235)
  • Loading branch information
soerenuhrbach authored Oct 15, 2024
1 parent 7c7f2fb commit 26ad091
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 26ad091

Please sign in to comment.