get_column_statistics_for_table方法的EntityNotFoundException错误AWS胶

发布于 2025-02-13 01:02:09 字数 962 浏览 1 评论 0原文

我试图从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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文