You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/purview/tutorial-custom-types.md
+17-12Lines changed: 17 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ For example:
62
62
63
63
***DataSet**: This type extends Referenceable and Asset. Conceptually, it can be used to represent a type that stores data. Types that extend DataSet can be expected to have a Schema. For example, a SQL table.
:::image type="content" source="./media/tutorial-custom-types/base-model-diagram.png" alt-text="Diagram showing the relationships between system types." border="false":::
66
66
67
67
## 2 - Example of a *Type* definition, explained
68
68
@@ -132,15 +132,15 @@ Based on the JSON type definition above, let us look at some properties:
132
132
133
133
This field is particularly useful when browsing assets *by source type* in Purview:
:::image type="content" source="./media/tutorial-custom-types/browse-assets.png" alt-text="Screenshot of the portal showing the path from Data Catalog to Browse to By source type and the asset highlighted.":::
136
136
137
137
***SuperTypes** describes the *"parent"* types you want to "*inherit*" from.
138
138
139
139
***schemaElementsAttributes** from **options** influences what appears in the **Schema** tab of your asset in Purview.
140
140
141
141
Below you can see an example of how the **Schema** tab looks like for an asset of type Azure SQL Table:
:::image type="content" source="./media/tutorial-custom-types/schema-tab.png" alt-text="Screenshot of the schema tab for an Azure SQL Table asset.":::
144
144
145
145
In our JSON above, we can see that **schemaElementsAttributes** points to the relationship attribute called **columns**, which can be seen in the **relationshipAttributeDefs** array:
146
146
@@ -223,10 +223,12 @@ Below you can see a simplified JSON result:
223
223
As we understood above, the information that shows up in the Schema tab of an Azure SQL Table comes from the Azure SQL Column themselves.
224
224
225
225
Selecting one column item, we would see the following:
:::image type="content" source="./media/tutorial-custom-types/azure-sql-column.png" alt-text="Screenshot of the addressID column page with the properties tab open and the data type highlighted.":::
227
228
228
229
The question is, how did Purview select the *data_tye* property from the column and showed it in the Schema tab of the table?
229
-

230
+
231
+
:::image type="content" source="./media/tutorial-custom-types/schema-tab-data-type.png" alt-text="Screenshot of the Azure SQL Table page with the schema page open.":::
230
232
231
233
You can get the type definition of an Azure SQL Column by making a `GET` request to the [endpoint](/rest/api/purview/catalogdataplane/types/get-type-definition-by-name):
:::image type="content" source="./media/tutorial-custom-types/custom-types-objects.png" alt-text="Screenshot showing the path from the Data Catalog to Browse assets with the filter narrowed to Sample-Custom-Types.":::
:::image type="content" source="./media/tutorial-custom-types/children.png" alt-text="Screenshot of the properties tab with the related assets highlighted, showing one child asset.":::
506
+
504
507
You can see the *First_child_object* being linked there.
:::image type="content" source="./media/tutorial-custom-types/first-child-object.png" alt-text="Screenshot of the First_child_object page, showing the overview tab.":::
:::image type="content" source="./media/tutorial-custom-types/parent.png" alt-text="Screenshot of the properties page, showing the related assets with a single parent asset.":::
511
516
512
517
You can see the Parent object being linked there.
513
518
514
519
Similarly, you can select the *Related* tab and will see the relationship between the two objects:
:::image type="content" source="./media/tutorial-custom-types/relationship.png" alt-text="Screenshot of the Related tab, showing the relationship between the child and parent.":::
517
522
518
523
You can create multiple children by following the step 6.2 and 6.3 again.
519
524
520
525
>[!NOTE]
521
526
>The *qualifiedName* is unique per asset, therefore, the second child should be called differently, such as: *custom//custom_type_child:Second_child_object*
:::image type="content" source="./media/tutorial-custom-types/two_children.png" alt-text="Screenshot of the First_parent_object, showing the two child assets highlighted.":::
524
529
525
530
>[!TIP]
526
531
> If you delete the *First_parent_object* you will notice that the children will also be removed, due to the *COMPOSITION* relationship that we chose in the definition.
0 commit comments