Reflections are Dremio's query acceleration technology. This API allows you to manage raw and aggregation reflections programmatically.
You can list all reflections or filter by dataset.
// List all accessible reflections
const allReflections = await client.reflections.list();
// List reflections for a specific dataset
const datasetReflections = await client.reflections.list({
datasetId: 'dataset-uuid-123'
});const reflection = await client.reflections.get('reflection-uuid');
console.log(reflection.name, reflection.status);Creating a reflection implies defining which dataset it accelerates and its configuration (dimensions, measures, etc.).
await client.reflections.create({
type: 'RAW',
name: 'Raw_Acceleration',
datasetId: 'dataset-uuid-123',
enabled: true,
displayFieldIds: ['col1', 'col2'] // Fields to include
});Commonly used to enable/disable reflections or update their definition.
await client.reflections.update('reflection-uuid', {
enabled: false // Disable reflection
});await client.reflections.delete('reflection-uuid');