Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError in databricks_catalog_dataframe.py #73

Closed
abdale opened this issue Jan 27, 2021 · 1 comment
Closed

TypeError in databricks_catalog_dataframe.py #73

abdale opened this issue Jan 27, 2021 · 1 comment
Labels
bug Something isn't working sample Adding or Updating Sample

Comments

@abdale
Copy link
Contributor

abdale commented Jan 27, 2021

Hello,

I'm seeing the following error when running databricks_catalog_dataframe.py in Databricks:

TypeError: 'EntityTypeDef' object is not subscriptable
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<command-1278818675318490> in <module>
     78    "relationshipDefs":[spark_column_to_df_relationship]
     79   }, 
---> 80   force_update=True)
     81 print(typedef_results)
     82 

/databricks/python/lib/python3.7/site-packages/pyapacheatlas/core/client.py in upload_typedefs(self, typedefs, force_update, **kwargs)
    840                 new_types[cat] = []
    841                 for t in typelist:
--> 842                     if t["name"] in types_from_client[cat]:
    843                         existing_types[cat].append(t)
    844                     else:

TypeError: 'EntityTypeDef' object is not subscriptable
@wjohnson wjohnson added bug Something isn't working sample Adding or Updating Sample labels Jan 27, 2021
@wjohnson
Copy link
Owner

Hi, @abdale Thank you so much for reporting this! I had attempted to modernize the syntax of upload type defs but missed this sample / introduced the bug by not leveraging the kwargs. Please take a look at the latest commit and that should contain the fix and proper syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sample Adding or Updating Sample
Projects
None yet
Development

No branches or pull requests

2 participants