Skip to main content
Version: 24.3.x

SYS.VIEWS

The sys.views table contains metadata for views in the Dremio instance.

Syntax
SELECT *
FROM sys.views

Example Output

view_idspace_idview_nameschema_idpathtagtypecreatedsql_definitionsql_contextowner_idowner_typemasking_policiesrow_access_policies
26d8ac0d-3f33-4826-862c-af31602d1f904d78cc0a-0319-47d1-8745-558580857a17v1efbc84c3-e70a-4126-b098-2fe2475c04dc[testsource, FolderA, v1]00000-7eb99863-72ea-457e-b150-0c3e1d3e5980NESSIE_VIEW2023-12-04 23:04:10.973SELECT * FROM Police.PoliceIncidents[testsource, FolderA]$unowned$$unowned$[][]
e15aa988-fb0a-42a9-91ce-e8212144a2c3f8c65f84-c4da-40df-8b90-c5c5e716b1e4incidentsempty text[test-space, incidents]a85f94a3-176b-40da-bb07-6c2c70cedd6fVIRTUAL_DATASET2022-02-01 06:15:53.988SELECT * FROM "SF_incidents2016.json"Samples.samples.dremio.com80702009-37c5-454c-93f2-ec41ea1722edUSER_OWNER[function_name: ""@dremio".protect_ssn" args: "state" column_name: "name"][]
36b8fcf5-78fa-4d78-9b5b-bad77b218895f8c65f84-c4da-40df-8b90-c5c5e716b1e4nyc-taxiempty text[test-space, nyc-taxi]bc7c91ee-e46f-49d5-a1a3-f52af0b08e1cVIRTUAL_DATASET2022-02-01 06:02:35.407SELECT * FROM "NYC-taxi-trips"Samples.samples.dremio.com80702009-37c5-454c-93f2-ec41ea1722edUSER_OWNER[][]
c84ea3fc-b962-4b8d-9d38-63a39d1097f8f8c65f84-c4da-40df-8b90-c5c5e716b1e4test-dataset2empty text[test-space, test-dataset2]62bf4c5a-2b5d-4b8f-873a-ab9e5aa81469VIRTUAL_DATASET2022-02-01 05:57:07.062SELECT * FROM "NYC-taxi-trips"Samples.samples.dremio.com80702009-37c5-454c-93f2-ec41ea1722edUSER_OWNER[][]

Fields

FieldData TypeDescription
view_idvarcharThe UUID to identify the view.
space_idvarcharThe UUID to identify the parent space that the view is saved under.
view_namevarcharThe user- or system-defined name of the view.
schema_idvarcharThe UUID for the schema/folder in which the view is contained.
pathvarcharThe string array representation of the path of the view.
tagvarcharThe UUID that is generated to identify the instance of the view. Dremio changes this tag whenever a change is made to the view.
typevarcharThe type of view.
Enum: VIRTUAL_DATASET, NESSIE_VIEW
createdtimestampThe date and time that the view was created.
sql_definitionvarcharThe DDL statement that was used to create the view.
sql_contextvarcharThe context for the SQL definition.
owner_idvarcharThe UUID for the owner (user or role) of the view. This UUID corresponds to the id in the users or roles system table.
owner_typevarcharThe type of owner of the view. This value will be $unowned$ if ownership has not been granted for the view.
Enum: USER_OWNER, ROLE_OWNER, $unowned$
masking_policiesvarcharThe masking policies set on the view.
row_access_policiesvarcharThe row-access policies set on the view.