![](/img/trans.png)
[英]boto3 glue get_job_runs - check execution with certain date exists in the response object
[英]list_schemas() method missing on Boto3 Glue client object
所以,我認為我遇到了過時文檔的問題。 根據此處的文檔,我應該能夠使用list_schemas()
獲取 Hive 數據目錄中定義的模式列表: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/glue .html#Glue.Client.list_schemas
但是,這種方法似乎不存在:
import boto3
glue = boto3.client('glue')
glue.list_schemas()
AttributeError: 'Glue' object has no attribute 'list_schemas'
其他方法(例如list_crawlers()
)似乎仍然存在並且工作得很好。 這個方法被移動了嗎? 我需要安裝一些額外的 boto3 庫才能工作嗎?
根據評論。
該問題是由使用舊的 boto3引起的。 升級到較新版本解決了這個問題。
你應該先制作一個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.