rahulraina7 commented on a change in pull request #16012:
URL: https://github.com/apache/airflow/pull/16012#discussion_r638441983
##########
File path: airflow/providers/amazon/aws/hooks/glue_crawler.py
##########
@@ -105,7 +105,8 @@ def create_crawler(self, **crawler_kwargs) -> str:
"""
crawler_name = crawler_kwargs['Name']
self.log.info("Creating crawler: %s", crawler_name)
- return
self.glue_client.create_crawler(**crawler_kwargs)['Crawler']['Name']
Review comment:
This is wrong and would lead to ```KeyError```
```
File
"/usr/local/lib/python3.8/site-packages/airflow/providers/amazon/aws/hooks/glue_crawler.py",
line 108, in create_crawler
return
self.glue_client.create_crawler(**crawler_kwargs)['Crawler']['Name']
KeyError: 'Crawler'
```
According to :
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/glue.html#Glue.Client.create_crawler
This returns an empty dict
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]