Skip to content

Commit 90a8b44

Browse files
committed
[DOP-28075] Add dataset tags to entities documentation
1 parent 0915f54 commit 90a8b44

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

docs/entities/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ That's why the information about datasets is very limited:
112112
- ``location: Location`` - Location where data is actually stored in, like RDMBS instance or cluster.
113113
- ``name: str`` - qualified name of Dataset, like ``mydb.myschema.mytable`` or ``/app/warehouse/hive/managed/myschema.df/mytable``
114114
- ``schema: Schema | None`` - schema of dataset.
115+
- ``tags: list[Tag]`` - tags of dataset.
115116

116117
.. image:: dataset_list.png
117118

@@ -145,6 +146,18 @@ It contains following fields:
145146

146147
.. image:: dataset_schema.png
147148

149+
Dataset tags
150+
^^^^^^^^^^^^
151+
152+
Dataset can have multiple tags which are arbitrary ``key: value`` pairs.
153+
154+
- ``id: int`` - tag identifier
155+
- ``name: str`` - tag name, usually in format ``source.name``, e.g. ``airflow.tag``, ``company.team``
156+
- ``values: list[TagValue]`` - tag values bound to dataset:
157+
158+
- ``id: int`` - tag value identifier
159+
- ``value: str`` - tag value, e.g. ``production``, ``Some team``
160+
148161
Job
149162
~~~
150163

docs/reference/database/structure.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,26 @@ Database structure
156156
fingerprint: uuid(v5)
157157
}
158158

159+
entity tag {
160+
* id: bigint
161+
----
162+
* name: varchar(64)
163+
}
164+
165+
entity tag_value {
166+
* id: bigint
167+
----
168+
* tag_id: bigint
169+
* value: varchar(256)
170+
}
171+
172+
entity dataset_tag {
173+
* id: bigint
174+
----
175+
* dataset_id: bigint
176+
* tag_value_id: bigint
177+
}
178+
159179
entity personal_token {
160180
* id: uuid(v7)
161181
----
@@ -201,6 +221,9 @@ Database structure
201221
column_lineage "target_dataset_id" ||--o{ dataset
202222
column_lineage "fingerprint" ||--o{ dataset_column_relation
203223

224+
tag_value ||--o{ tag
225+
dataset_tag ||--o{ tag_value
226+
204227
personal_token ||--o{ user
205228

206229
@enduml

0 commit comments

Comments
 (0)