KeyError getting table description
See original GitHub issueDescribe the bug
Calling wr.catalog.get_table_description on a Glue table that doesn’t have a description results in a KeyError exception being raised.
To Reproduce
awswrangler==1.5.0
- Create a Glue table without a description.
- Call
wr.catalog.get_table_description
on the table.
Example
The table item
exists, but does not have a description.
>>> wr.catalog.get_table_parameters(database="sa-m2", table="item")
{'CrawlerSchemaDeserializerVersion': '1.0', 'CrawlerSchemaSerializerVersion': '1.0', 'UPDATED_BY_CRAWLER': 'sa-m2', 'averageRecordSize': '25', 'classification': 'parquet', 'compressionType': 'none', 'objectCount': '54', 'recordCount': '12349020', 'sizeKey': '174628122', 'typeOfData': 'file'}
>>> wr.catalog.get_table_description(database="sa-m2", table="item")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/site-packages/awswrangler/catalog.py", line 1670, in get_table_description
desc: str = response["Table"]["Description"]
KeyError: 'Description'
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
KeyError getting table description · Issue #294 - GitHub
Calling wr.catalog.get_table_description on a Glue table that doesn't have a description results in a KeyError exception being raised.
Read more >keyerror in python table - Stack Overflow
After I created table, I cannot use the "incol" function to get all the values. It always give me key error. However, when...
Read more >Python KeyError Exceptions and How to Handle Them
Python's official documentation says that the KeyError is raised when a mapping key is accessed and isn't found in the mapping. A mapping...
Read more >What is KeyError in Python? Dictionary and Handling Them
KeyError in Python is raised when you attempt to access a key that is not in a dictionary. The mapping logic is a...
Read more >How to Fix: KeyError in Pandas - GeeksforGeeks
In this article, we will discuss how to fix the KeyError in pandas. Pandas KeyError occurs when we try to access some column/row...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @kinghuang !
It is totally off-topic, but we are stating a “Who uses AWS Data Wrangler?” section. So feel free to add yourself if you want 😄 .
Released on version 1.6.0!