2

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

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 (e.g. list_crawlers()) still appear to be present and work just fine. Has this method been moved? Do I need to install some additional boto3 libraries for this to work?

Adam Luchjenbroers
  • 4,917
  • 2
  • 30
  • 35

2 Answers2

2

Based on the comments.

The issue was caused by using old boto3. Upgrading to the newer version solved the issue.

Marcin
  • 215,873
  • 14
  • 235
  • 294
0

You should make a session first, and use the client method of the session, then it should work:

import boto3
session = boto3.session.Session()
glue_client = session.client('glue')
schemas_name = glue_client.list_schemas()