-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
bugBug reportBug report
Description
Describe the bug
When I try to export dataset definition to Yaml file via CLI, I get a local variable python error.
I tried to use a datahub CLI inside the DH actions container (deployed VIA official Helm Chart, actively used for ingestions) but got the same error.
To Reproduce
Steps to reproduce the behavior:
- configure Datahub CLI via
datahub init - invoke
datahub dataset get --urn "urn:li:dataset:(urn:li:dataPlatform:bigquery,******,PROD)" --to-file dataset.yaml - Recieve an error:
Traceback (most recent call last):
File "/datahub-ingestion/.venv/lib/python3.10/site-packages/datahub/entrypoints.py", line 231, in main
sys.exit(datahub(standalone_mode=False, **kwargs))
File "/datahub-ingestion/.venv/lib/python3.10/site-packages/click/core.py", line 1161, in __call__
return self.main(*args, **kwargs)
File "/datahub-ingestion/.venv/lib/python3.10/site-packages/click/core.py", line 1082, in main
rv = self.invoke(ctx)
File "/datahub-ingestion/.venv/lib/python3.10/site-packages/click/core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/datahub-ingestion/.venv/lib/python3.10/site-packages/click/core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/datahub-ingestion/.venv/lib/python3.10/site-packages/click/core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/datahub-ingestion/.venv/lib/python3.10/site-packages/click/core.py", line 788, in invoke
return __callback(*args, **kwargs)
File "/datahub-ingestion/.venv/lib/python3.10/site-packages/datahub/upgrade/upgrade.py", line 435, in async_wrapper
ret = func(*args, **kwargs)
File "/datahub-ingestion/.venv/lib/python3.10/site-packages/datahub/telemetry/telemetry.py", line 476, in wrapper
raise e
File "/datahub-ingestion/.venv/lib/python3.10/site-packages/datahub/telemetry/telemetry.py", line 424, in wrapper
res = func(*args, **kwargs)
File "/datahub-ingestion/.venv/lib/python3.10/site-packages/datahub/cli/specific/dataset_cli.py", line 56, in get
dataset: Dataset = Dataset.from_datahub(graph=graph, urn=urn)
File "/datahub-ingestion/.venv/lib/python3.10/site-packages/datahub/api/entities/dataset/dataset.py", line 953, in from_datahub
schema=Dataset._schema_from_schema_metadata(graph, urn),
File "/datahub-ingestion/.venv/lib/python3.10/site-packages/datahub/api/entities/dataset/dataset.py", line 865, in _schema_from_schema_metadata
if schema_fields and schema_specification.fields:
UnboundLocalError: local variable 'schema_fields' referenced before assignment
Expected behaviour
Get a dataset.yaml with all metadata
Screenshots
Environment:
- OS: Official DH actions container deployed via official Helm Chart
- DH Version: 1.3.0
- DH CLI Version: 1.3.0
Metadata
Metadata
Assignees
Labels
bugBug reportBug report