Skip to content

Commit

Permalink
fix nested schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
shirshanka committed Mar 3, 2025
1 parent 2ebae89 commit 777b86f
Show file tree
Hide file tree
Showing 4 changed files with 227 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
{ "name": "referer", "type": ["string", "null"] },
{ "name": "user_agent", "type": ["string", "null"] },
{ "name": "user_id", "type": ["string", "null"] },
{ "name": "session_id", "type": ["string", "null"] }
{ "name": "session_id", "type": ["string", "null"] },
{
"name": "locator", "type": {
"type": "record",
"name": "Locator",
"fields": [
{ "name": "latitude", "type": "float" },
{ "name": "longitude", "type": "float" }
]
}
}
]
}
39 changes: 24 additions & 15 deletions metadata-ingestion/examples/structured_properties/dataset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,25 @@
schema:
file: examples/structured_properties/click_event.avsc
fields:
- id: ip
- urn: urn:li:schemaField:(urn:li:dataset:(urn:li:dataPlatform:hive,user.clicks,PROD),ip)
structured_properties: # structured properties for schema fields/columns go here
io.acryl.dataManagement.deprecationDate: "2023-01-01"
io.acryl.dataManagement.certifier: urn:li:corpuser:john.doe@example.com
io.acryl.dataManagement.replicationSLA: 90
- id: ip
structured_properties:
io.acryl.dataManagement.deprecationDate: '2023-01-01'
io.acryl.dataManagement.certifier: urn:li:corpuser:john.doe@example.com
io.acryl.dataManagement.replicationSLA: 90.0
type: string
- id: url
structured_properties:
io.acryl.dataManagement.deprecationDate: '2023-01-01'
type: string
- id: locator.latitude
structured_properties:
io.acryl.dataManagement.deprecationDate: '2023-01-01'
type: float
structured_properties: # dataset level structured properties go here
io.acryl.privacy.retentionTime: 365
projectNames:
- Tracking
- DataHub
- Tracking
- DataHub
- id: ClickEvent
platform: events
subtype: Topic
Expand All @@ -27,19 +35,20 @@
project_name: Tracking
namespace: org.acryl.tracking
version: 1.0.0
retention: 30
retention: '30'
structured_properties:
io.acryl.dataManagement.certifier: urn:li:corpuser:john.doe@example.com
schema:
file: examples/structured_properties/click_event.avsc
downstreams:
- urn:li:dataset:(urn:li:dataPlatform:hive,user.clicks,PROD)
- urn:li:dataset:(urn:li:dataPlatform:hive,user.clicks,PROD)
- id: user.clicks
platform: snowflake
schema:
fields:
- id: user_id
structured_properties:
io.acryl.dataManagement.deprecationDate: "2023-01-01"
structured_properties:
io.acryl.dataManagement.replicationSLA: 90
schema:
fields:
- id: user_id
structured_properties:
io.acryl.dataManagement.deprecationDate: '2023-01-01'
type: string
Loading

0 comments on commit 777b86f

Please sign in to comment.