breezy-portugal-43538
05/09/2022, 7:38 AMdatahub get --urn command and retrieving urn name in general.
I was able to ingest data to datahub but after clicking the icon on a website to get urn name, nothing is copied and the button does not seem to take any effect. I had tested this on three different web browsers.
After trying to get the urn name by running the datahub get --urn command I receive following error:
$ datahub get --urn "urn urn:li:dataset:(urn:li:dataPlatform:s3,incoming_data/case_1/test/2022-05-06T14-30-26Z/data_2022-05-06T14-30-26Z/some_data/results/data_info.csv,DEV)"
/home/mluser/.local/lib/python3.8/site-packages/cryptography/hazmat/backends/openssl/x509.py:14: CryptographyDeprecationWarning: This version of cryptography contains a temporary pyOpenSSL fallback path. Upgrade pyOpenSSL now.
warnings.warn(
[2022-05-09 10:24:11,560] ERROR {datahub.entrypoints:152} - File "/home/mluser/.local/lib/python3.8/site-packages/datahub/entrypoints.py", line 138, in main
135 def main(**kwargs):
136 # This wrapper prevents click from suppressing errors.
137 try:
--> 138 sys.exit(datahub(standalone_mode=False, **kwargs))
139 except click.exceptions.Abort:
..................................................
kwargs = {}
datahub = <Group datahub>
click.exceptions.Abort = <class 'click.exceptions.Abort'>
..................................................
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
1135 def __call__(self, *args: t.Any, **kwargs: t.Any) -> t.Any:
(...)
--> 1137 return self.main(*args, **kwargs)
..................................................
self = <Group datahub>
args = ()
t.Any = typing.Any
kwargs = {'standalone_mode': False}
..................................................
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/home/mluser/.local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/telemetry/telemetry.py", line 304, in wrapper
247 def wrapper(*args: Any, **kwargs: Any) -> Any:
(...)
300 "status": "error",
301 "error": get_full_class_name(e),
302 },
303 )
--> 304 raise e
..................................................
args = (<click.core.Context object at 0x7f82fa591940>, )
Any = typing.Any
kwargs = {'urn': 'urn urn:li:dataset:(urn:li:dataPlatform:s3,incoming_data/case_1/test/2022-05-06T14-30-26Z/data_2022-05-06T14-30-26Z/s
ome_data/results/data_info.csv,DEV)',
'aspect': ()}
..................................................
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/telemetry/telemetry.py", line 256, in wrapper
247 def wrapper(*args: Any, **kwargs: Any) -> Any:
(...)
252 telemetry_instance.ping(
253 "function-call", {"function": function, "status": "start"}
254 )
255 try:
--> 256 res = func(*args, **kwargs)
257 telemetry_instance.ping(
..................................................
args = (<click.core.Context object at 0x7f82fa591940>, )
Any = typing.Any
kwargs = {'urn': 'urn urn:li:dataset:(urn:li:dataPlatform:s3,incoming_data/case_1/test/2022-05-06T14-30-26Z/data_2022-05-06T14-30-26Z/s
ome_data/results/data_info.csv,DEV)',
'aspect': ()}
telemetry_instance.ping = <method 'Telemetry.ping' of <datahub.telemetry.telemetry.Telemetry object at 0x7f82eca5eb20> telemetry.py:201>
function = 'datahub.cli.get_cli.get'
func = <function 'get' get_cli.py:14>
..................................................
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/cli/get_cli.py", line 38, in get
25 def get(ctx: Any, urn: Optional[str], aspect: List[str]) -> None:
(...)
34 urn = ctx.args[0]
35 logger.debug(f"Using urn from args {urn}")
36 click.echo(
37 json.dumps(
--> 38 get_aspects_for_entity(entity_urn=urn, aspects=aspect, typed=False),
39 sort_keys=True,
..................................................
get = <Command get>
ctx = <click.core.Context object at 0x7f82fa591940>
Any = typing.Any
urn = 'urn urn:li:dataset:(urn:li:dataPlatform:s3,incoming_data/case_1/test/2022-05-06T14-30-26Z/data_2022-05-06T14-30-26Z/s
ome_data/results/data_info.csv,DEV)'
Optional = typing.Optional
aspect = ()
List = typing.List
ctx.args = []
logger.debug = <method 'Logger.debug' of <Logger datahub.cli.get_cli (INFO)> __init__.py:1424>
json.dumps = <function 'dumps' __init__.py:183>
..................................................
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/cli/cli_utils.py", line 658, in get_aspects_for_entity
648 def get_aspects_for_entity(
649 entity_urn: str,
650 aspects: List[str],
651 typed: bool = False,
652 cached_session_host: Optional[Tuple[Session, str]] = None,
653 ) -> Dict[str, Union[dict, DictWrapper]]:
654 # Process non-timeseries aspects
655 non_timeseries_aspects: List[str] = [
656 a for a in aspects if a not in timeseries_class_to_aspect_name_map.values()
657 ]
--> 658 entity_response = get_entity(
659 entity_urn, non_timeseries_aspects, cached_session_host
..................................................
entity_urn = 'urn urn:li:dataset:(urn:li:dataPlatform:s3,incoming_data/case_1/test/2022-05-06T14-30-26Z/data_2022-05-06T14-30-26Z/s
ome_data/results/data_info.csv,DEV)'
aspects = ()
List = typing.List
typed = False
cached_session_host = None
Optional = typing.Optional
Tuple = typing.Tuple
Session = <class 'requests.sessions.Session'>
Dict = typing.Dict
Union = typing.Union
DictWrapper = <class 'avrogen.dict_wrapper.DictWrapper'>
non_timeseries_aspects = []
..................................................
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/cli/cli_utils.py", line 508, in get_entity
492 def get_entity(
493 urn: str,
494 aspect: Optional[List] = None,
495 cached_session_host: Optional[Tuple[Session, str]] = None,
496 ) -> Dict:
(...)
504 encoded_urn: str = urn
505 elif urn.startswith("urn:"):
506 encoded_urn = urllib.parse.quote(urn)
507 else:
--> 508 raise Exception(
509 f"urn {urn} does not seem to be a valid raw (starts with urn:) or encoded urn (starts with urn%3A)"
..................................................
urn = 'urn urn:li:dataset:(urn:li:dataPlatform:s3,incoming_data/case_1/test/2022-05-06T14-30-26Z/data_2022-05-06T14-30-26Z/s
ome_data/results/data_info.csv,DEV)'
aspect = []
Optional = typing.Optional
List = typing.List
cached_session_host = None
Tuple = typing.Tuple
Session = <class 'requests.sessions.Session'>
Dict = typing.Dict
urllib.parse.quote = <function 'quote' parse.py:799>
..................................................
---- (full traceback above) ----
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/entrypoints.py", line 138, in main
sys.exit(datahub(standalone_mode=False, **kwargs))
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/home/mluser/.local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/telemetry/telemetry.py", line 304, in wrapper
raise e
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/telemetry/telemetry.py", line 256, in wrapper
res = func(*args, **kwargs)
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/cli/get_cli.py", line 38, in get
get_aspects_for_entity(entity_urn=urn, aspects=aspect, typed=False),
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/cli/cli_utils.py", line 658, in get_aspects_for_entity
entity_response = get_entity(
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/cli/cli_utils.py", line 508, in get_entity
raise Exception(
Exception: urn urn urn:li:dataset:(urn:li:dataPlatform:s3,incoming_data/case_1/test/2022-05-06T14-30-26Z/data_2022-05-06T14-30-26Z/some_data/results/data_info.csv,DEV) does not seem to be a valid raw (starts with urn:) or encoded urn (starts with urn%3A)
[2022-05-09 10:24:11,561] INFO {datahub.entrypoints:161} - DataHub CLI version: 0.8.31.6 at /home/mluser/.local/lib/python3.8/site-packages/datahub/__init__.py
[2022-05-09 10:24:11,561] INFO {datahub.entrypoints:164} - Python version: 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0] at /usr/bin/python3 on Linux-5.4.0-96-generic-x86_64-with-glibc2.29
[2022-05-09 10:24:11,561] INFO {datahub.entrypoints:167} - GMS config {}
The gms logs after running docker logs -f datahub-gms does not update when I am either clicking the get urn running the website button or when running the command mentioned above. There are no logs pointing to any error.
This issue was mentioned earlier in my older threads and @hundreds-photographer-13496 was investigating the server logs that I had provided (by the way huge thanks for help!).
Could you take a look and help resolve this issue or give some steps on how to get more info about the problem?
Thanks in advance!helpful-optician-78938
05/09/2022, 5:14 PMurn prefix part pf the value of the urn param datahub get --urn "urn urn:li:dataset:...". It should look like datahub get --urn "urn:li:dataset:...".orange-night-91387
05/09/2022, 6:10 PMbreezy-portugal-43538
05/10/2022, 5:10 AM$ datahub get --urn "urn:li:dataset:(urn:li:dataPlatform:s3,incoming_data/case_1/test/2022-05-06T14-30-26Z/data_2022-05-06T14-30-26Z/some_data/results/data_info.csv,DEV)"
/home/mluser/.local/lib/python3.8/site-packages/cryptography/hazmat/backends/openssl/x509.py:14: CryptographyDeprecationWarning: This version of cryptography contains a temporary pyOpenSSL fallback path. Upgrade pyOpenSSL now.
warnings.warn(
[2022-05-10 08:02:15,169] ERROR {datahub.entrypoints:152} - File "/home/mluser/.local/lib/python3.8/site-packages/datahub/entrypoints.py", line 138, in main
135 def main(**kwargs):
136 # This wrapper prevents click from suppressing errors.
137 try:
--> 138 sys.exit(datahub(standalone_mode=False, **kwargs))
139 except click.exceptions.Abort:
..................................................
kwargs = {}
datahub = <Group datahub>
click.exceptions.Abort = <class 'click.exceptions.Abort'>
..................................................
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
1135 def __call__(self, *args: t.Any, **kwargs: t.Any) -> t.Any:
(...)
--> 1137 return self.main(*args, **kwargs)
..................................................
self = <Group datahub>
args = ()
t.Any = typing.Any
kwargs = {'standalone_mode': False}
..................................................
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/home/mluser/.local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/telemetry/telemetry.py", line 304, in wrapper
247 def wrapper(*args: Any, **kwargs: Any) -> Any:
(...)
300 "status": "error",
301 "error": get_full_class_name(e),
302 },
303 )
--> 304 raise e
..................................................
args = (<click.core.Context object at 0x7f6604aaf940>, )
Any = typing.Any
kwargs = {'urn': 'urn:li:dataset:(urn:li:dataPlatform:s3,incoming_data/case_1/test/2022-05-06T14-30-26Z/data_2022-05-06T14-30-26Z/some_
data/results/data_info.csv,DEV)',
'aspect': ()}
..................................................
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/telemetry/telemetry.py", line 256, in wrapper
247 def wrapper(*args: Any, **kwargs: Any) -> Any:
(...)
252 telemetry_instance.ping(
253 "function-call", {"function": function, "status": "start"}
254 )
255 try:
--> 256 res = func(*args, **kwargs)
257 telemetry_instance.ping(
..................................................
args = (<click.core.Context object at 0x7f6604aaf940>, )
Any = typing.Any
kwargs = {'urn': 'urn:li:dataset:(urn:li:dataPlatform:s3,incoming_data/case_1/test/2022-05-06T14-30-26Z/data_2022-05-06T14-30-26Z/some_
data/results/data_info.csv,DEV)',
'aspect': ()}
telemetry_instance.ping = <method 'Telemetry.ping' of <datahub.telemetry.telemetry.Telemetry object at 0x7f65f6f7cb20> telemetry.py:201>
function = 'datahub.cli.get_cli.get'
func = <function 'get' get_cli.py:14>
..................................................
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/cli/get_cli.py", line 38, in get
25 def get(ctx: Any, urn: Optional[str], aspect: List[str]) -> None:
(...)
34 urn = ctx.args[0]
35 logger.debug(f"Using urn from args {urn}")
36 click.echo(
37 json.dumps(
--> 38 get_aspects_for_entity(entity_urn=urn, aspects=aspect, typed=False),
39 sort_keys=True,
..................................................
get = <Command get>
ctx = <click.core.Context object at 0x7f6604aaf940>
Any = typing.Any
urn = 'urn:li:dataset:(urn:li:dataPlatform:s3,incoming_data/case_1/test/2022-05-06T14-30-26Z/data_2022-05-06T14-30-26Z/some_
data/results/data_info.csv,DEV)'
Optional = typing.Optional
aspect = ()
List = typing.List
ctx.args = []
logger.debug = <method 'Logger.debug' of <Logger datahub.cli.get_cli (INFO)> __init__.py:1424>
json.dumps = <function 'dumps' __init__.py:183>
..................................................
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/cli/cli_utils.py", line 661, in get_aspects_for_entity
648 def get_aspects_for_entity(
649 entity_urn: str,
650 aspects: List[str],
651 typed: bool = False,
652 cached_session_host: Optional[Tuple[Session, str]] = None,
653 ) -> Dict[str, Union[dict, DictWrapper]]:
(...)
657 ]
658 entity_response = get_entity(
659 entity_urn, non_timeseries_aspects, cached_session_host
660 )
--> 661 aspect_list: Dict[str, dict] = entity_response["aspects"]
662
..................................................
entity_urn = 'urn:li:dataset:(urn:li:dataPlatform:s3,incoming_data/case_1/test/2022-05-06T14-30-26Z/data_2022-05-06T14-30-26Z/some_
data/results/data_info.csv,DEV)'
aspects = ()
List = typing.List
typed = False
cached_session_host = None
Optional = typing.Optional
Tuple = typing.Tuple
Session = <class 'requests.sessions.Session'>
Dict = typing.Dict
Union = typing.Union
DictWrapper = <class 'avrogen.dict_wrapper.DictWrapper'>
entity_response = {'exceptionClass': 'com.linkedin.restli.server.RestLiServiceException',
'stackTrace': 'com.linkedin.restli.server.RestLiServiceException [HTTP Status:404]\n\tat com.linkedin.restli.server.Res
tLiServiceException.fromThrowable(RestLiServiceException.java:315)\n\tat com.linkedin.restli.server.BaseRestLiServer.bui
ldPreRoutingError(BaseRestLiServer.java:202)\n\tat com.linkedin.restli.server.RestRestLiServer.buildPreRoutingRestExcept
ion(RestRestLiServer.java:254)\n\tat com.linkedin.restli.server.RestRestLiServer.handleResourceRequest(RestRestLiServer.
java:228)\n\tat com.linkedin.restli.server.RestRestLiServer.doHandleRequest(RestRestLiServer.java:215)\n\tat com.linkedi
n.restli.server.RestRestLiServer.handleRequest(RestRestLiServer.java:171)\n\tat com.linkedin.restli.server.RestLiServer.
handleRequest(RestLiServer.java:130)\n\tat com.linkedin.restli.server.DelegatingTransportDispatcher.handleRestRequest(De
legatingTransportDispatcher.java:70)\n\tat com.linkedin.r2.filter.transport.DispatcherRequestFilter.onRestRequest(Dispat
cherRequestFilter.java:70)\n\tat com.linkedin.r2.filter.TimedRestFilter.onRestRequest(TimedRestFilter.java:76)\n\tat com
.linkedin.r2.filter.FilterChainIterator$FilterCh...
non_timeseries_aspects = []
..................................................
---- (full traceback above) ----
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/entrypoints.py", line 138, in main
sys.exit(datahub(standalone_mode=False, **kwargs))
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/mluser/.local/lib/python3.8/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/home/mluser/.local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/telemetry/telemetry.py", line 304, in wrapper
raise e
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/telemetry/telemetry.py", line 256, in wrapper
res = func(*args, **kwargs)
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/cli/get_cli.py", line 38, in get
get_aspects_for_entity(entity_urn=urn, aspects=aspect, typed=False),
File "/home/mluser/.local/lib/python3.8/site-packages/datahub/cli/cli_utils.py", line 661, in get_aspects_for_entity
aspect_list: Dict[str, dict] = entity_response["aspects"]
KeyError: 'aspects'
[2022-05-10 08:02:15,170] INFO {datahub.entrypoints:161} - DataHub CLI version: 0.8.31.6 at /home/mluser/.local/lib/python3.8/site-packages/datahub/__init__.py
[2022-05-10 08:02:15,170] INFO {datahub.entrypoints:164} - Python version: 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0] at /usr/bin/python3 on Linux-5.4.0-96-generic-x86_64-with-glibc2.29
[2022-05-10 08:02:15,170] INFO {datahub.entrypoints:167} - GMS config {}
And regarding the demo question - yes demo works for me fine. When this error is happening no new logs in docker logs -f datahub-gms are visible.orange-night-91387
05/10/2022, 6:08 PMbreezy-portugal-43538
05/11/2022, 2:39 PMorange-night-91387
05/11/2022, 5:26 PMbreezy-portugal-43538
05/12/2022, 6:48 AMentity_response contains and why aspects are missing?hundreds-photographer-13496
05/12/2022, 6:58 AMhundreds-photographer-13496
05/12/2022, 7:30 AMdatahub ingest list-runs and see if it works.breezy-portugal-43538
05/13/2022, 6:41 AMdatahub ingest list-runs I receive this output:
$ datahub ingest list-runs
/home/mluser/.local/lib/python3.8/site-packages/cryptography/hazmat/backends/openssl/x509.py:14: CryptographyDeprecationWarning: This version of cryptography contains a temporary pyOpenSSL fallback path. Upgrade pyOpenSSL now.
warnings.warn(
+--------------------+--------+----------------------------+
| runId | rows | created at |
+====================+========+============================+
| no-run-id-provided | 60 | 2022-05-12 14:28:53 (EEST) |
+--------------------+--------+----------------------------+
I can double check the setup, but could you pinpoint the bullets that could have impact on this?
Also, I had checked if the deletion of the urn works properly - it does. After using datahub delete --urn <urn> soft I receive correct response and urn is deleted.hundreds-photographer-13496
05/17/2022, 5:04 AMbreezy-portugal-43538
05/18/2022, 2:03 PMdatahub get --urn "urn:li:dataset:(urn:li:dataPlatform:s3,incoming_data/case_1/test/2022-05-06T14-30-26Z/data_2022-05-06T14-30-26Z/some_data/results/data_info.csv,DEV)"
I receive an error mentioned before, but after changing the '/' character to %2f as it's defined in the actual http url then everything works properly:
datahub get --urn "urn:li:dataset:(urn:li:dataPlatform:s3,incoming_data%2Fcase_1%2Ftest%2F2022-05-06T14-30-26Z%2Fdata_2022-05-06T14-30-26Z%2Fsome_data%2Fresults%2Fdata_info.csv,DEV)"
for some reason when I upload the data from S3 as a source it takes the web url and transfers the '/' to %2f, but datahub requires the '.' character as a folder separator. I think this can be easily solved by replacing the / to . in url when S3 is a source. What do you think, could it be root cause?
Thanks again for all the help : )breezy-portugal-43538
05/27/2022, 6:03 AMhundreds-photographer-13496
05/27/2022, 8:17 AMbreezy-portugal-43538
05/31/2022, 7:04 AM