Skip to content

Commit

Permalink
fix(ingest/mongodb): Add Collection Name as Dataset Name in MongoDB
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajmahato-visa committed Oct 23, 2024
1 parent 8d4bc73 commit aae415a
Show file tree
Hide file tree
Showing 2 changed files with 518 additions and 0 deletions.
259 changes: 259 additions & 0 deletions metadata-ingestion/tests/integration/mongodb/mongodb_mces_golden.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,60 @@
[
{
"entityType": "container",
"entityUrn": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed",
"changeType": "UPSERT",
"aspectName": "containerProperties",
"aspect": {
"json": {
"customProperties": {
"platform": "mongodb",
"instance": "instance",
"env": "PROD",
"database": "mngdb"
},
"name": "mngdb",
"env": "PROD"
}
},
"systemMetadata": {
"lastObserved": 1615443388097,
"runId": "mongodb-test",
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "container",
"entityUrn": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed",
"changeType": "UPSERT",
"aspectName": "status",
"aspect": {
"json": {
"removed": false
}
},
"systemMetadata": {
"lastObserved": 1615443388097,
"runId": "mongodb-test",
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "container",
"entityUrn": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed",
"changeType": "UPSERT",
"aspectName": "dataPlatformInstance",
"aspect": {
"json": {
"platform": "urn:li:dataPlatform:mongodb",
"instance": "urn:li:dataPlatformInstance:(urn:li:dataPlatform:mongodb,instance)"
}
},
"systemMetadata": {
"lastObserved": 1615443388097,
"runId": "mongodb-test",
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.emptyCollection,PROD)",
Expand Down Expand Up @@ -48,6 +104,22 @@
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.emptyCollection,PROD)",
"changeType": "UPSERT",
"aspectName": "container",
"aspect": {
"json": {
"container": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed"
}
},
"systemMetadata": {
"lastObserved": 1615443388097,
"runId": "mongodb-test",
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.emptyCollection,PROD)",
Expand All @@ -65,6 +137,70 @@
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "container",
"entityUrn": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed",
"changeType": "UPSERT",
"aspectName": "subTypes",
"aspect": {
"json": {
"typeNames": [
"Database"
]
}
},
"systemMetadata": {
"lastObserved": 1615443388097,
"runId": "mongodb-test",
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "container",
"entityUrn": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed",
"changeType": "UPSERT",
"aspectName": "browsePathsV2",
"aspect": {
"json": {
"path": [
{
"id": "urn:li:dataPlatformInstance:(urn:li:dataPlatform:mongodb,instance)",
"urn": "urn:li:dataPlatformInstance:(urn:li:dataPlatform:mongodb,instance)"
}
]
}
},
"systemMetadata": {
"lastObserved": 1615443388097,
"runId": "mongodb-test",
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.emptyCollection,PROD)",
"changeType": "UPSERT",
"aspectName": "browsePathsV2",
"aspect": {
"json": {
"path": [
{
"id": "urn:li:dataPlatformInstance:(urn:li:dataPlatform:mongodb,instance)",
"urn": "urn:li:dataPlatformInstance:(urn:li:dataPlatform:mongodb,instance)"
},
{
"id": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed",
"urn": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed"
}
]
}
},
"systemMetadata": {
"lastObserved": 1615443388097,
"runId": "mongodb-test",
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.firstCollection,PROD)",
Expand Down Expand Up @@ -379,6 +515,22 @@
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.firstCollection,PROD)",
"changeType": "UPSERT",
"aspectName": "container",
"aspect": {
"json": {
"container": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed"
}
},
"systemMetadata": {
"lastObserved": 1615443388097,
"runId": "mongodb-test",
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.firstCollection,PROD)",
Expand Down Expand Up @@ -4028,6 +4180,22 @@
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.largeCollection,PROD)",
"changeType": "UPSERT",
"aspectName": "container",
"aspect": {
"json": {
"container": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed"
}
},
"systemMetadata": {
"lastObserved": 1615443388097,
"runId": "mongodb-test",
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.largeCollection,PROD)",
Expand All @@ -4049,6 +4217,31 @@
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.firstCollection,PROD)",
"changeType": "UPSERT",
"aspectName": "browsePathsV2",
"aspect": {
"json": {
"path": [
{
"id": "urn:li:dataPlatformInstance:(urn:li:dataPlatform:mongodb,instance)",
"urn": "urn:li:dataPlatformInstance:(urn:li:dataPlatform:mongodb,instance)"
},
{
"id": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed",
"urn": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed"
}
]
}
},
"systemMetadata": {
"lastObserved": 1615443388097,
"runId": "mongodb-test",
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.largeCollection,PROD)",
Expand All @@ -4066,6 +4259,47 @@
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.largeCollection,PROD)",
"changeType": "UPSERT",
"aspectName": "browsePathsV2",
"aspect": {
"json": {
"path": [
{
"id": "urn:li:dataPlatformInstance:(urn:li:dataPlatform:mongodb,instance)",
"urn": "urn:li:dataPlatformInstance:(urn:li:dataPlatform:mongodb,instance)"
},
{
"id": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed",
"urn": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed"
}
]
}
},
"systemMetadata": {
"lastObserved": 1615443388097,
"runId": "mongodb-test",
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.secondCollection,PROD)",
"changeType": "UPSERT",
"aspectName": "container",
"aspect": {
"json": {
"container": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed"
}
},
"systemMetadata": {
"lastObserved": 1615443388097,
"runId": "mongodb-test",
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.secondCollection,PROD)",
Expand Down Expand Up @@ -4241,6 +4475,31 @@
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.secondCollection,PROD)",
"changeType": "UPSERT",
"aspectName": "browsePathsV2",
"aspect": {
"json": {
"path": [
{
"id": "urn:li:dataPlatformInstance:(urn:li:dataPlatform:mongodb,instance)",
"urn": "urn:li:dataPlatformInstance:(urn:li:dataPlatform:mongodb,instance)"
},
{
"id": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed",
"urn": "urn:li:container:f5ff6ace1ed73cb3fd4c73dc718c39ed"
}
]
}
},
"systemMetadata": {
"lastObserved": 1615443388097,
"runId": "mongodb-test",
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:mongodb,instance.mngdb.emptyCollection,PROD)",
Expand Down
Loading

0 comments on commit aae415a

Please sign in to comment.