brainy-intern-50400
09/06/2022, 7:17 AMreact-dom.production.min.js:216 Error: Unrecognized key NOTEBOOK provided in map {}
at Gt (EntityRegistry.tsx:11:11)
at e.value (EntityRegistry.tsx:153:24)
at renderItem (EntityNameList.tsx:118:53)
at index.js:143:12
at index.js:243:14
at Array.map (<anonymous>)
at A (index.js:242:33)
at ai (react-dom.production.min.js:157:137)
at Xc (react-dom.production.min.js:267:460)
at _s (react-dom.production.min.js:250:347)
here is the data i ingest: #Datahub Emitter
emitter: DatahubRestEmitter = DatahubRestEmitter(gms_server=DATAHUB_SERVER, extra_headers={},)# token=DATAHUB_API_KEY)
emitter.test_connection()
#milliseconds since epoch
now: int = int(time.time() * 1000)
current_timestamp: AuditStampClass = AuditStampClass(time=now, actor="urn:li:corpuser:ingestion")
last_modified = ChangeAuditStampsClass(current_timestamp)
inputs_notebook: List[NotebookCellClass] = [
NotebookCellClass(
type=NotebookCellTypeClass().CHART_CELL,
chartCell=ChartCellClass(
cellId="2",
changeAuditStamps=last_modified,
cellTitle="second",
),
)
]
properties: dict[str,str] = {}
properties = {
'..': '..'
}
notebook_info: NotebookInfoClass = NotebookInfoClass(
title="Janatka Notebook",
changeAuditStamps=last_modified,
customProperties=properties,
externalUrl="",
)
browse_path: BrowsePathsClass = BrowsePathsClass(
["/test/notebook/test/querybook"]
)
#notebook_key: NotebookKeyClass = NotebookKeyClass(
# notebookTool="Zeppelin",
# notebookId="Janatka_Test"
#)
notebook_urn = "urn:li:notebook:(querybook,1234)"
#Construct a MetadataChangeProposalWrapper object with the Notebook aspects.
notebook_info_mce = MetadataChangeProposalWrapper(
entityType="notebook",
changeType=ChangeTypeClass.UPSERT,
entityUrn=notebook_urn,
aspectName="notebookInfo",
aspect=notebook_info,
)
notebook_content_mce = MetadataChangeProposalWrapper(
entityType="notebook",
changeType=ChangeTypeClass.UPSERT,
entityUrn=notebook_urn,
aspectName="notebookContent",
aspect=NotebookContentClass(inputs_notebook),
)
notebook_path_mce = MetadataChangeProposalWrapper(
entityType="notebook",
changeType=ChangeTypeClass.UPSERT,
entityUrn=notebook_urn,
aspectName="browsePaths",
aspect=browse_path,
)
#Emit metadata!
emitter.emit(notebook_info_mce)
emitter.emit(notebook_content_mce)
emitter.emit(notebook_path_mce)helpful-optician-78938
09/06/2022, 5:02 PMvalidate() method on each of the mcpws before emitting them and see if there are any errors?
Eg: notebook_info_mce.validate()brainy-intern-50400
09/07/2022, 2:25 PMbig-carpet-38439
09/08/2022, 4:11 PM