mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-18 14:16:48 +00:00
fix(docs): formatting of transformers code blocks (#10670)
This commit is contained in:
parent
e66726b9cc
commit
edb9cf61f7
@ -817,8 +817,6 @@ overwrite the previous value.
|
||||
properties:
|
||||
prop1: value1
|
||||
prop2: value2
|
||||
|
||||
|
||||
```
|
||||
- Add dataset-properties, however overwrite the dataset-properties available for the dataset on DataHub GMS
|
||||
```yaml
|
||||
@ -829,8 +827,6 @@ overwrite the previous value.
|
||||
properties:
|
||||
prop1: value1
|
||||
prop2: value2
|
||||
|
||||
|
||||
```
|
||||
- Add dataset-properties, however keep the dataset-properties available for the dataset on DataHub GMS
|
||||
```yaml
|
||||
@ -841,7 +837,6 @@ overwrite the previous value.
|
||||
properties:
|
||||
prop1: value1
|
||||
prop2: value2
|
||||
|
||||
```
|
||||
|
||||
## Add Dataset datasetProperties
|
||||
@ -973,7 +968,7 @@ transformers:
|
||||
`simple_add_dataset_domain` can be configured in below different way
|
||||
|
||||
- Add domains, however replace existing domains sent by ingestion source
|
||||
```yaml
|
||||
```yaml
|
||||
transformers:
|
||||
- type: "simple_add_dataset_domain"
|
||||
config:
|
||||
@ -983,7 +978,7 @@ transformers:
|
||||
- "urn:li:domain:hr"
|
||||
```
|
||||
- Add domains, however overwrite the domains available for the dataset on DataHub GMS
|
||||
```yaml
|
||||
```yaml
|
||||
transformers:
|
||||
- type: "simple_add_dataset_domain"
|
||||
config:
|
||||
@ -993,7 +988,7 @@ transformers:
|
||||
- "urn:li:domain:hr"
|
||||
```
|
||||
- Add domains, however keep the domains available for the dataset on DataHub GMS
|
||||
```yaml
|
||||
```yaml
|
||||
transformers:
|
||||
- type: "simple_add_dataset_domain"
|
||||
config:
|
||||
@ -1032,7 +1027,7 @@ in both of the cases domain should be provisioned on DataHub GMS
|
||||
`pattern_add_dataset_domain` can be configured in below different way
|
||||
|
||||
- Add domains, however replace existing domains sent by ingestion source
|
||||
```yaml
|
||||
```yaml
|
||||
transformers:
|
||||
- type: "pattern_add_dataset_domain"
|
||||
config:
|
||||
@ -1043,7 +1038,7 @@ in both of the cases domain should be provisioned on DataHub GMS
|
||||
'urn:li:dataset:\(urn:li:dataPlatform:postgres,postgres\.public\.t.*': ["urn:li:domain:finance"]
|
||||
```
|
||||
- Add domains, however overwrite the domains available for the dataset on DataHub GMS
|
||||
```yaml
|
||||
```yaml
|
||||
transformers:
|
||||
- type: "pattern_add_dataset_domain"
|
||||
config:
|
||||
@ -1054,7 +1049,7 @@ in both of the cases domain should be provisioned on DataHub GMS
|
||||
'urn:li:dataset:\(urn:li:dataPlatform:postgres,postgres\.public\.t.*': ["urn:li:domain:finance"]
|
||||
```
|
||||
- Add domains, however keep the domains available for the dataset on DataHub GMS
|
||||
```yaml
|
||||
```yaml
|
||||
transformers:
|
||||
- type: "pattern_add_dataset_domain"
|
||||
config:
|
||||
@ -1099,7 +1094,7 @@ transformers:
|
||||
`domain_mapping_based_on_tags` can be configured in below different way
|
||||
|
||||
- Add domains based on tags, however overwrite the domains available for the dataset on DataHub GMS
|
||||
```yaml
|
||||
```yaml
|
||||
transformers:
|
||||
- type: "domain_mapping_based_on_tags"
|
||||
config:
|
||||
@ -1109,7 +1104,7 @@ transformers:
|
||||
'example2': "urn:li:domain:hr"
|
||||
```
|
||||
- Add domains based on tags, however keep the domains available for the dataset on DataHub GMS
|
||||
```yaml
|
||||
```yaml
|
||||
transformers:
|
||||
- type: "domain_mapping_based_on_tags"
|
||||
config:
|
||||
@ -1323,7 +1318,7 @@ Next we need to tell the helper classes which entity types and aspect we are int
|
||||
def entity_types(self) -> List[str]:
|
||||
return ["dataset"]
|
||||
|
||||
def aspect_name(self) -> str:
|
||||
def aspect_name(self) -> str:
|
||||
return "ownership"
|
||||
```
|
||||
|
||||
@ -1332,9 +1327,9 @@ Finally we need to implement the `transform_aspect()` method that does the work
|
||||
```python
|
||||
# add this as a function of AddCustomOwnership
|
||||
|
||||
def transform_aspect( # type: ignore
|
||||
def transform_aspect( # type: ignore
|
||||
self, entity_urn: str, aspect_name: str, aspect: Optional[OwnershipClass]
|
||||
) -> Optional[OwnershipClass]:
|
||||
) -> Optional[OwnershipClass]:
|
||||
|
||||
owners_to_add = self.owners
|
||||
assert aspect is None or isinstance(aspect, OwnershipClass)
|
||||
|
Loading…
x
Reference in New Issue
Block a user