SYS.VIEWS
The sys.views table contains metadata for views in the Dremio instance.
SyntaxSELECT *
FROM sys.views
Example Output
view_id | space_id | view_name | schema_id | path | tag | type | created | sql_definition | sql_context | owner_id | owner_type | masking_policies | row_access_policies |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
26d8ac0d-3f33-4826-862c-af31602d1f90 | 4d78cc0a-0319-47d1-8745-558580857a17 | v1 | efbc84c3-e70a-4126-b098-2fe2475c04dc | [testsource, FolderA, v1] | 00000-7eb99863-72ea-457e-b150-0c3e1d3e5980 | NESSIE_VIEW | 2023-12-04 23:04:10.973 | SELECT * FROM Police.PoliceIncidents | [testsource, FolderA] | $unowned$ | $unowned$ | [] | [] |
e15aa988-fb0a-42a9-91ce-e8212144a2c3 | f8c65f84-c4da-40df-8b90-c5c5e716b1e4 | incidents | empty text | [test-space, incidents] | a85f94a3-176b-40da-bb07-6c2c70cedd6f | VIRTUAL_DATASET | 2022-02-01 06:15:53.988 | SELECT * FROM "SF_incidents2016.json" | Samples.samples.dremio.com | 80702009-37c5-454c-93f2-ec41ea1722ed | USER_OWNER | [function_name: ""@dremio".protect_ssn" args: "state" column_name: "name"] | [] |
36b8fcf5-78fa-4d78-9b5b-bad77b218895 | f8c65f84-c4da-40df-8b90-c5c5e716b1e4 | nyc-taxi | empty text | [test-space, nyc-taxi] | bc7c91ee-e46f-49d5-a1a3-f52af0b08e1c | VIRTUAL_DATASET | 2022-02-01 06:02:35.407 | SELECT * FROM "NYC-taxi-trips" | Samples.samples.dremio.com | 80702009-37c5-454c-93f2-ec41ea1722ed | USER_OWNER | [] | [] |
c84ea3fc-b962-4b8d-9d38-63a39d1097f8 | f8c65f84-c4da-40df-8b90-c5c5e716b1e4 | test-dataset2 | empty text | [test-space, test-dataset2] | 62bf4c5a-2b5d-4b8f-873a-ab9e5aa81469 | VIRTUAL_DATASET | 2022-02-01 05:57:07.062 | SELECT * FROM "NYC-taxi-trips" | Samples.samples.dremio.com | 80702009-37c5-454c-93f2-ec41ea1722ed | USER_OWNER | [] | [] |
Fields
Field | Data Type | Description |
---|---|---|
view_id | varchar | The UUID to identify the view. |
space_id | varchar | The UUID to identify the parent space that the view is saved under. |
view_name | varchar | The user- or system-defined name of the view. |
schema_id | varchar | The UUID for the schema/folder in which the view is contained. |
path | varchar | The string array representation of the path of the view. |
tag | varchar | The UUID that is generated to identify the instance of the view. Dremio changes this tag whenever a change is made to the view. |
type | varchar | The type of view. Enum: VIRTUAL_DATASET, NESSIE_VIEW |
created | timestamp | The date and time that the view was created. |
sql_definition | varchar | The DDL statement that was used to create the view. |
sql_context | varchar | The context for the SQL definition. |
owner_id | varchar | The UUID for the owner (user or role) of the view. This UUID corresponds to the id in the users or roles system table. |
owner_type | varchar | The 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_policies | varchar | The masking policies set on the view. |
row_access_policies | varchar | The row-access policies set on the view. |