Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 1.29 KB

reflections.md

File metadata and controls

54 lines (39 loc) · 1.29 KB

Reflections API Guide

Reflections are Dremio's query acceleration technology. This API allows you to manage raw and aggregation reflections programmatically.

Listing Reflections

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'
});

Getting a Reflection

const reflection = await client.reflections.get('reflection-uuid');
console.log(reflection.name, reflection.status);

Creating a Reflection

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
});

Updating a Reflection

Commonly used to enable/disable reflections or update their definition.

await client.reflections.update('reflection-uuid', {
    enabled: false // Disable reflection
});

Deleting a Reflection

await client.reflections.delete('reflection-uuid');