apache / paimon

Apache Paimon is a lake format that enables building a Realtime Lakehouse Architecture with Flink and Spark for both streaming and batch operations.
https://paimon.apache.org/
Apache License 2.0
2.1k stars 834 forks source link

[Feature] org.apache.paimon.table.Table add listTags & listPartitions api #3626

Open melin opened 5 days ago

melin commented 5 days ago

Search before asking

Motivation

need to collect tag and partition information about the paimon table. It is inconvenient to query these information using spark or flink sql. Can the java api be supported to read this information?

Solution

No response

Anything else?

No response

Are you willing to submit a PR?

melin commented 4 days ago

cc @yuzelin

melin commented 1 day ago

有API 能够获取到tags 信息,没有api 获取分区信息:

Identifier identifier = Identifier.create("bigdata", "paimon_order_pt_tag");
FileStoreTable table = (FileStoreTable) catalog.getTable(identifier);
System.out.println(table.bucketMode());

TagManager tagManager = table.tagManager();
List<Pair<Tag, String>> tags = tagManager.tagObjects();