get_column_statistics_for_table方法的EntityNotFoundException错误AWS胶
我试图从S3位置的桌子上拉出元数据。我正在尝试在AWS胶水中使用get_column_statistics_for_table()方法,但它给我带来了EntityNotFoundException错误。
我可以使用其他方法,例如-create_crawler(),start_crawler()等。get_column_statistics_for_table()方法仅使用4个参数,其中只需要3个参数 - 数据库名称,表名和列名。我知道我正在传递正确的论点,因为我直接从AWS控制台复制了它们。我已经在So和其他网站上进行了搜索,但是我没有找到这个特殊的问题。
我需要与S3建立胶水“连接”吗?
到目前为止的代码 -
client = boto3.client('glue', region_name="us-east-1")
response = client.get_column_statistics_for_table(
DatabaseName='Name_of_Database',
TableName='Name_of_my_table',
ColumnNames=[
'Column_name_1'
]
)
print(response)
response that I am getting --
{'ColumnStatisticsList': [], 'Errors': [{'ColumnName': 'Column_name_1', 'Error': {'ErrorCode': 'EntityNotFoundException', 'ErrorMessage': 'Statistics do not exist for this column'}}], 'ResponseMetadata': {'RequestId': 'Some_alphanumeric no', 'HTTPStatusCode': 200, 'HTTPHeaders': 'common HTTP Headers'}, 'RetryAttempts': 0}}
I am trying to pull metadata from a table in S3 location. I am trying to use get_column_statistics_for_table() method in AWS glue but its giving me EntityNotFoundException error.
I am able to use other methods such as - create_crawler(), start_crawler() etc. The get_column_statistics_for_table() method uses just 4 arguments out of which only 3 are required - database name, table name and column names. I know I am passing the correct arguments because I directly copied them from the AWS console. I have searched on SO and on other website but I haven't find this particular question.
Am I required to make a Glue "connection" to S3 ??
Code so far -
client = boto3.client('glue', region_name="us-east-1")
response = client.get_column_statistics_for_table(
DatabaseName='Name_of_Database',
TableName='Name_of_my_table',
ColumnNames=[
'Column_name_1'
]
)
print(response)
response that I am getting --
{'ColumnStatisticsList': [], 'Errors': [{'ColumnName': 'Column_name_1', 'Error': {'ErrorCode': 'EntityNotFoundException', 'ErrorMessage': 'Statistics do not exist for this column'}}], 'ResponseMetadata': {'RequestId': 'Some_alphanumeric no', 'HTTPStatusCode': 200, 'HTTPHeaders': 'common HTTP Headers'}, 'RetryAttempts': 0}}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论