https://datahubproject.io logo
#integrate-tableau-datahub
Title
# integrate-tableau-datahub
c

careful-insurance-60247

02/18/2022, 3:44 PM
Seeing an issue with the tableau source.
Copy code
Traceback (most recent call last):
  File "/usr/local/bin/datahub", line 8, in <module>
    sys.exit(datahub())
  File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/datahub/telemetry/telemetry.py", line 196, in wrapper
    raise e
  File "/home/ec2-user/.local/lib/python3.7/site-packages/datahub/telemetry/telemetry.py", line 190, in wrapper
    res = func(*args, **kwargs)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/datahub/cli/ingest_cli.py", line 87, in run
    pipeline.run()
  File "/home/ec2-user/.local/lib/python3.7/site-packages/datahub/ingestion/run/pipeline.py", line 182, in run
    self.source.get_workunits(), 10 if self.preview_mode else None
  File "/home/ec2-user/.local/lib/python3.7/site-packages/datahub/ingestion/source/tableau.py", line 807, in get_workunits
    yield from self.emit_workbooks(10)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/datahub/ingestion/source/tableau.py", line 197, in emit_workbooks
    yield from self.emit_sheets_as_charts(workbook)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/datahub/ingestion/source/tableau.py", line 657, in emit_sheets_as_charts
    get_field_value_in_sheet(field, "description"),
  File "/home/ec2-user/.local/lib/python3.7/site-packages/datahub/ingestion/source/tableau_common.py", line 423, in get_field_value_in_sheet
    field_value = field.get("remoteField", {}).get(field_name, "")
AttributeError: 'NoneType' object has no attribute 'get'
Adding an additional check in tableau_common.py seemed to help. Not sure of the downstream impacts though.
Copy code
def get_field_value_in_sheet(field, field_name):
    if field.get("__typename", "") == "DatasourceField" and field.get("remoteField") is not None:
        field_value = field.get("remoteField", {}).get(field_name, "")
    else:
        field_value = field.get(field_name, "")
    return field_value
6 Views