You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using tableau extension library version tableau.extensions.1.10.0.js.
I am unable to extract more than 10k rows
This is the function which I have created for data extraction.
async function getUnderlyingDataFromAllDataSources() { try { appendMessage("Starting to fetch underlying data from Tableau..."); const dashboard = tableau.extensions.dashboardContent.dashboard; appendMessage(Dashboard name: ${dashboard.name}`);
const worksheets = dashboard.worksheets;
appendMessage(`Number of worksheets: ${worksheets.length}`);
let allData = [];
for (let worksheet of worksheets) {
appendMessage(`Processing worksheet: ${worksheet.name}`);
try {
const dataSource = await worksheet.getDataSourcesAsync();
appendMessage(`Data sources for ${worksheet.name}: ${dataSource.length}`);
const options = {
maxRows: 0,
ignoreSelection: true,
includeAllColumns: true
};
const underlyingData = await worksheet.getUnderlyingDataAsync(options);
const data = underlyingData.data.map(row => {
let rowData = {};
underlyingData.columns.forEach((col, index) => {
rowData[col.fieldName] = row[index].formattedValue;
});
return rowData;
});
appendMessage(`Processed ${data.length} rows from ${worksheet.name}`);
allData = allData.concat(data);
} catch (error) {
appendMessage(`Error processing worksheet ${worksheet.name}: ${error.message}`);
}
}
appendMessage(`Total data rows collected: ${allData.length}`);
if (allData.length === 0) {
appendMessage("No data was retrieved from any worksheet. Please check your Tableau dashboard and permissions.");
return;
}
const result = await response.json();
appendMessage(`Backend response: ${JSON.stringify(result)}`);
appendMessage('Data sent to backend successfully.');
} catch (error) {
appendMessage(`Error in getUnderlyingDataFromAllDataSources: ${error.message}`);
}
} `
The text was updated successfully, but these errors were encountered:
I am using tableau extension library version tableau.extensions.1.10.0.js.
I am unable to extract more than 10k rows
This is the function which I have created for data extraction.
async function getUnderlyingDataFromAllDataSources() { try { appendMessage("Starting to fetch underlying data from Tableau..."); const dashboard = tableau.extensions.dashboardContent.dashboard; appendMessage(
Dashboard name: ${dashboard.name}`);The text was updated successfully, but these errors were encountered: