计数雅典娜桌的全部分区
我的雅典娜和雅典娜冰山桌由多列划分。我想在Python脚本中创建一个逻辑,以破坏数据,如果有100多个分区以插入数据而没有错误。
显示分区table_name
列出了所有分区,但我需要为它们计数。 我需要它是通用的
。 >但它行不通。
有解决方法吗?
I have Athena and Athena Iceberg tables partitioned by multiple columns. I want to create a logic in Python script to break data if have more than 100 total partitions to insert the data without errors.
SHOW PARTITIONS table_name
lists all the partitions but I need the count for them. I need it to be generic to get the count for any table.
I tried select count(*) from information_schema.__internal_partitions__ WHERE table_schema = 'db_name' AND table_name = 'table_name'
but it doesn't work.
Any workarounds?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这适用于Athena Engine V2:
This works for Athena Engine V2: