feat(examples): Modernize example data loading with Parquet and YAML configs (#36538)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Evan Rusackas
2026-01-21 12:42:15 -08:00
committed by GitHub
parent ec36791551
commit dee063a4c5
271 changed files with 23340 additions and 12971 deletions

View File

@@ -20,6 +20,30 @@
// Constants for visualization tests
// ***********************************************
/**
* Look up a dataset ID by table name
* @param {string} tableName - The name of the table to look up
* @returns {Cypress.Chainable<number>} - The dataset ID
*/
export function getDatasetId(tableName) {
return cy
.request({
method: 'GET',
url: `/api/v1/dataset/?q=${encodeURIComponent(
JSON.stringify({
filters: [{ col: 'table_name', opr: 'eq', value: tableName }],
}),
)}`,
})
.then(response => {
const datasets = response.body.result;
if (datasets && datasets.length > 0) {
return datasets[0].id;
}
throw new Error(`Dataset with table name "${tableName}" not found`);
});
}
export const FORM_DATA_DEFAULTS = {
datasource: '3__table',
time_grain_sqla: null,