Skip to main content
Version: current [26.x]

SYS.HISTORY.AUTONOMOUS_REFLECTIONS

The sys.history.autonomous_reflections table contains the historical metadata for Autonomous Reflections.

Syntax
SELECT *
FROM sys.history.autonomous_reflections

Example Output

reflectionNamereflection_idcreatedAtreflectionTypeenabledoperationSourcechangeContentdatasetIddatasetNameoperationTypeautonomousscoreavgDailyAcceleratedCountavgDailyImprovementInMsavgImprovementFactorbenefitsScoreDescreasonviewSqlsqlTypebeforeImagekeydatasetPath
AutoRef_Dataset_9a48f54a-d241-46cf-9e71-ae25642cf22c_aggregation4390b0f5-0a0d-4b23-9a96-d9e9c5427baf1748883691293AGGREGATIONtrueREST"CREATE VIEW "__system_managed_views"."Dataset_9a48f54a-d241-46cf-9e71-ae25642cf22c" AS SELECT "NYC-taxi-trips-iceberg"."fare_amount" AS "F0[fare_amount]", "NYC-taxi-trips-iceberg"."passenger_count" AS "F1[passenger_count]"\nFROM "Samples"."samples.dremio.com"."NYC-taxi-trips-iceberg"\n ; ALTER DATASET "__system_managed_views"."Dataset_9a48f54a-d241-46cf-9e71-ae25642cf22c" CREATE AGGREGATE REFLECTION "agg_336b6cd6-9ade-4657-b685-4450c4dca951" USING DIMENSIONS ("F1[passenger_count]") MEASURES ("F0[fare_amount]" (SUM))aa0b4932-e51d-4fed-93bf-e03b4a9b0a02Dataset_9a48f54a-d241-46cf-9e71-ae25642cf22cADDtrue42.474250333061885.022366.98005142437310.00000020692081FAIRCREATE autonomous reflection in Autonomous ModeCREATE autonomous reflection in Autonomous Mode","viewSql":"CREATE VIEW "__system_managed_views"."Dataset_9a48f54a-d241-46cf-9e71-ae25642cf22c" AS SELECT "NYC-taxi-trips-iceberg"."fare_amount" AS "F0[fare_amount]", "NYC-taxi-trips-iceberg"."passenger_count" AS "F1[passenger_count]"\nFROM "Samples"."samples.dremio.com"."NYC-taxi-trips-iceberg"\nCREATE_REFLECTIONfalse4390b0f5-0a0d-4b23-9a96-d9e9c5427baf_CREATE_REFLECTION["__system_managed_views","Dataset_9a48f54a-d241-46cf-9e71-ae25642cf22c"]
AutoRef_v1_raw68bd2902-ad85-4793-ab6d-4f425b7987751748883691257RAWtrueREST--Default Raw Reflection ; ALTER DATASET test.v1 CREATE RAW REFLECTION "raw_2311879c-79c4-4477-a1ed-6b4c999165bc" USING DISPLAY ("passenger_count", "EXPR$1")8984be51-cd00-43f7-95e3-918eeabc51dbv1ADDtrue42.474250333061885.022366.98005142437310.00000020692081FAIRCREATE autonomous reflection in Autonomous Mode--Default Raw ReflectionCREATE_REFLECTIONfalse68bd2902-ad85-4793-ab6d-4f425b798775_CREATE_REFLECTION["test","v1"]

Columns

ColumnData TypeDescription
reflectionNamevarcharNames the Autonomous Reflection.
reflection_idvarcharIdentifies the UUID of the Autonomous Reflection.
createdAttimestampRepresents the date and time (in UTC format) when the Autonomous Reflection was created.
reflectionTypevarcharSpecifies the type of Autonomous Reflection. Enum: AGGREGATION, RAW
enabledbooleanIndicates whether the Autonomous Reflection is currently enabled.
operationSourcevarcharSpecifies the source of the operation. Enum: SQL, REST
changeContentvarcharDisplays content changes based on the value of operationSource. Shows a SQL statement when operationSource is SQL, and lists specific changes when the operationSource is REST.
datasetIdvarcharIdentifies the ID of the dataset associated with the Autonomous Reflection.
datasetNamevarcharIdentifies the name of the dataset associated with the Autonomous Reflection.
operationTypevarcharSpecifies the type of operation performed. Enum: ADD, REMOVE
autonomousbooleanIndicates whether the Reflection is autonomous.
scoredoubleShows the score generated for the Autonomous Reflection.
avgDailyAcceleratedCountdoubleLists the average number of times per day the Autonomous Reflection is used to accelerate queries.
avgDailyImprovementInMsdoubleLists the average amount of time (in milliseconds) saved per day due to the Autonomous Reflection.
avgImprovementFactordoubleMeasures how much faster affected queries run due to the Autonomous Reflection.
benefitsScoreDescvarcharProvides a qualitative description of the Autonomous Reflection's score. Enum: EMPTY, NEW, POOR, FAIR, GOOD
reasonvarcharProvides the rationale used by the Autonomous Reflection in making decisions.
viewSqlvarcharIdentifies the SQL statement used to create the view associated with the Autonomous Reflection.
sqlTypevarcharSpectifies the type of SQL operation. Enum: CREATE_VIEW, DROP_VIEW, CREATE_REFLECTION, DROP_REFLECTION, DROP_TABLE, EXISTING_REFLECTION
beforeImagebooleanIndicates whether the history record captures the object's state before the operation. For example, the beforeImage is false for a CREATE VIEW operation since the view doesn't exist yet. The beforeImage is true for a DROP TABLE operation, as the record reflects the table's state prior to deletion.
keyvarcharIdentifies the key to the key-value store backing the sys.history.autonomous_reflections table. Typically formed by concatenating the reflectionId and sqlType. The key is unique to ensure history entries are not overwritten.
datasetPathvarcharShows the path to the dataset associated with the Autonomous Reflection.