[英]list_schemas() method missing on Boto3 Glue client object
So, I think I'm running up against an issue with out of date documentation.所以,我认为我遇到了过时文档的问题。 According to the documentation here I should be able to use
list_schemas()
to get a list of schemas defined in the Hive Data Catalog: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/glue.html#Glue.Client.list_schemas根据此处的文档,我应该能够使用
list_schemas()
获取 Hive 数据目录中定义的模式列表: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/glue .html#Glue.Client.list_schemas
However, this method doesn't seem to exist:但是,这种方法似乎不存在:
import boto3
glue = boto3.client('glue')
glue.list_schemas()
AttributeError: 'Glue' object has no attribute 'list_schemas'
Other methods (eg list_crawlers()
) still appear to be present and work just fine.其他方法(例如
list_crawlers()
)似乎仍然存在并且工作得很好。 Has this method been moved?这个方法被移动了吗? Do I need to install some additional boto3 libraries for this to work?
我需要安装一些额外的 boto3 库才能工作吗?
Based on the comments.根据评论。
The issue was caused by using old boto3 .该问题是由使用旧的 boto3引起的。 Upgrading to the newer version solved the issue.
升级到较新版本解决了这个问题。
You should make a session
first, and use the client
method of the session, then it should work:你应该先制作一个
session
,然后使用session的client
方法,然后它应该可以工作:
import boto3
session = boto3.session.Session()
glue_client = session.client('glue')
schemas_name = glue_client.list_schemas()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.