paimon,基础查询语句测试

embedded/2024/10/16 2:16:19/

基础设置

-- 创建catalog/加载catalog,如果这个catalog已经存在就不会创建,自动加载元数据信息CREATE CATALOG fs_paimon_catalog WITH (
'type' = 'paimon',
'warehouse' = 'hdfs://wsl01:8020/paimon/catalog'
);
-- 使用catalog
use catalog fs_paimon_catalog;-- sqlClinet使用
-- 设置为批处理模式
SET 'execution.runtime-mode' = 'batch';
-- 设置为流处理模式
SET 'execution.runtime-mode' = 'streaming';
-- 设置查询结果显示方式,sql-clinet 特有
SET 'sql-client.execution.result-mode' = 'tableau';
-- 设置checkpoint,如果使用流模式,必须设置
SET 'execution.checkpointing.interval' = '10 s';root@wsl01:~/soft/paimon/flink-1.17.0# cat fs_catalog.sql
CREATE CATALOG fs_catalog WITH ('type'='paimon','warehouse'='file:/mnt/d/wsl/soft/paimon/catalog'-- 'warehouse' = 'hdfs://wsl01:8020/paimon/catalog'
);
use catalog fs_catalog ;
SET 'sql-client.execution.result-mode' = 'tableau';
-- 默认批处理
SET 'execution.runtime-mode' = 'batch';-- 指定默认启动catalog
bin/sql-client.sh -i fs_catalog.sql

DDL

创建普通表

-- 普通表,没有主键CREATE TABLE t_sample (user_id BIGINT,item_id BIGINT,behavior STRING,dt STRING,hh STRING
);

创建主键表

CREATE TABLE t_pk (user_id BIGINT,item_id BIGINT,behavior STRING,dt STRING,hh STRING,PRIMARY KEY (dt, hh, user_id) NOT ENFORCED
);

创建分区表

-- 分区表的分区字段必须是主键的子集CREATE TABLE t_partition (user_id BIGINT,item_id BIGINT,behavior STRING,dt STRING,hh STRING,PRIMARY KEY (dt, hh, user_id) NOT ENFORCED
) PARTITIONED BY (dt, hh);

创建临时表

-- 如果进入paimon创建的catalog后,无法创建非paimon类型的表,如果需要借助第三方的表,需要创建临时表来使用CREATE TEMPORARY TABLE t_temporary (user_id BIGINT,item_id BIGINT,behavior STRING,dt STRING,hh STRING,PRIMARY KEY (dt, hh, user_id) NOT ENFORCED
) WITH ('connector' = 'filesystem','path' = 'file:///mnt/d/wsl/soft/paimon/temp_table.csv','format' = 'csv'
);

复制表-AS,create table as


-- create as 创建主键表,CREATE TABLE t_create_as_pk AS SELECT * FROM t_pk;
show create table t__pk;
show create table t_create_as_pk;-- create as 创建分区表
show create table t_partition ;
CREATE TABLE t_create_as_partition AS SELECT * FROM t_partition;
show create table t_create_as_partition ;

上述执行结果告诉我们,create as 的表,只保留原表的字段,不保留其他属性信息


-- 通过with 重新指定,关于with的用法,参考flink
CREATE TABLE t_create_as_with with ('primary-key' = 'dt,hh','partition' = 'dt') AS SELECT * FROM t_pk  ;
show create table t_create_as_with;

上述执行结果告诉我们,create as 的表可以通过with 重新指定属性信息

复制表-LIKE,create table like

CREATE TABLE t_create_like like t_pk;
show create table t_pk;
show create table t_create_like;

上述执行结果告诉我们,create like 的表,保留全部信息

DML

常用管理语句

desc #{name}
show create table #{name}
show catalogs;
show databases;
show tables;

新增-普通表

insert into t_sample(user_id,item_id,behavior,dt,hh) values(100,100,'sing-sample','1','2');insert into t_sample  values(101,101,'jump-sample','1','2');insert into t_sample  select 102,102,'rap-sample','1','2';Flink SQL> select * from t_sample;
+---------+---------+-------------+----+----+
| user_id | item_id |    behavior | dt | hh |
+---------+---------+-------------+----+----+
|     100 |     100 | sing-sample |  1 |  2 |
|     101 |     101 | jump-sample |  1 |  2 |
|     102 |     102 |  rap-sample |  1 |  2 |
+---------+---------+-------------+----+----+
3 rows in set

新增-主键表

insert into t_pk values(1,1,'sing','1','2');
insert into t_pk values(2,2,'jump','1','2');
insert into t_pk values(3,3,'rap','1','2');
Flink SQL> select * from t_pk;
+---------+---------+----------+----+----+
| user_id | item_id | behavior | dt | hh |
+---------+---------+----------+----+----+
|       1 |       1 |     sing |  1 |  2 |
|       2 |       2 |     jump |  1 |  2 |
|       3 |       3 |      rap |  1 |  2 |
+---------+---------+----------+----+----+
3 rows in set
insert into t_pk values(3,3,'basketball','1','2');
Flink SQL>  select * from t_pk;
+---------+---------+------------+----+----+
| user_id | item_id |   behavior | dt | hh |
+---------+---------+------------+----+----+
|       1 |       1 |       sing |  1 |  2 |
|       2 |       2 |       jump |  1 |  2 |
|       3 |       3 | basketball |  1 |  2 |
+---------+---------+------------+----+----+
3 rows in set-- 我们发现,主键表,写入两条相同主键的数据,后者会覆盖前者
-- 主键表有一个默认引擎,默认是就是 'merge-engine' = 'deduplicate',因此才有这个效果

新增-分区表

insert into t_partition partition(dt='2024-10-08',hh='15')(user_id,item_id,behavior) values(1,1,'sing');
insert into t_partition partition(dt='2024-10-08',hh='15')(user_id,item_id,behavior) values(2,2,'jump');
insert into t_partition(user_id,item_id,behavior,dt,hh) values(3,3,'rap','2024-10-08','16');
insert into t_partition values(4,4,'basketball','2024-10-08','16');Flink SQL> select * from t_partition;
+---------+---------+------------+------------+----+
| user_id | item_id |   behavior |         dt | hh |
+---------+---------+------------+------------+----+
|       1 |       1 |       sing | 2024-10-08 | 15 |
|       2 |       2 |       jump | 2024-10-08 | 15 |
|       3 |       3 |        rap | 2024-10-08 | 16 |
|       4 |       4 | basketball | 2024-10-08 | 16 |
+---------+---------+------------+------------+----+
4 rows in setinsert into t_partition as select * from t_sample;insert into t_partition partition(dt='2099-10-08',hh='15')(user_id,item_id,behavior) select user_id,item_id,behavior from t_sample;Flink SQL> select * from t_partition;
+---------+---------+-------------+------------+----+
| user_id | item_id |    behavior |         dt | hh |
+---------+---------+-------------+------------+----+
|       1 |       1 |        sing | 2024-10-08 | 15 |
|       2 |       2 |        jump | 2024-10-08 | 15 |
|     100 |     100 | sing-sample | 2099-10-08 | 15 |
|     101 |     101 | jump-sample | 2099-10-08 | 15 |
|     102 |     102 |  rap-sample | 2099-10-08 | 15 |
|       3 |       3 |         rap | 2024-10-08 | 16 |
|       4 |       4 |  basketball | 2024-10-08 | 16 |
|     100 |     100 | sing-sample |          1 |  2 |
|     101 |     101 | jump-sample |          1 |  2 |
|     102 |     102 |  rap-sample |          1 |  2 |
+---------+---------+-------------+------------+----+
10 rows in setFlink SQL> insert overwrite t_partition(user_id,item_id,behavior) values(5,5,'non-partition');
[ERROR] Could not execute SQL statement. Reason:
org.apache.calcite.sql.validate.SqlValidatorException: Column 'dt' has no default value and does not allow NULLs

以上多种写入方式都支持,把分区字段当成普通字段用就行,但是分区字段不能为空

新增-覆盖写入

Flink SQL> select * from t_pk;
+---------+---------+------------+----+----+
| user_id | item_id |   behavior | dt | hh |
+---------+---------+------------+----+----+
|       1 |       1 |       sing |  1 |  2 |
|       2 |       2 |       jump |  1 |  2 |
|       3 |       3 | basketball |  1 |  2 |
+---------+---------+------------+----+----+insert into t_pk values(10,10,'overwrite','1','2');Flink SQL> select * from t_pk;
+---------+---------+-----------+----+----+
| user_id | item_id |  behavior | dt | hh |
+---------+---------+-----------+----+----+
|      10 |      10 | overwrite |  1 |  2 |
+---------+---------+-----------+----+----+
1 row in set

overwrite 会直接清空表,不会考虑主键


insert into t_partition partition(dt='2024-10-08',hh='15')(user_id,item_id,behavior) values(1,1,'sing');
insert into t_partition partition(dt='2024-10-08',hh='15')(user_id,item_id,behavior) values(2,2,'jump');
insert into t_partition partition(dt='2024-10-09',hh='15')(user_id,item_id,behavior) values(3,3,'rap');
Flink SQL> select * from t_partition;
+---------+---------+----------+------------+----+
| user_id | item_id | behavior |         dt | hh |
+---------+---------+----------+------------+----+
|       3 |       3 |      rap | 2024-10-09 | 15 |
|       1 |       1 |     sing | 2024-10-08 | 15 |
|       2 |       2 |     jump | 2024-10-08 | 15 |
+---------+---------+----------+------------+----+
3 rows in setinsert overwrite t_partition partition(dt='2024-10-08',hh='15')(user_id,item_id,behavior) values(4,4,'basketball');Flink SQL> select * from t_partition;
+---------+---------+------------+------------+----+
| user_id | item_id |   behavior |         dt | hh |
+---------+---------+------------+------------+----+
|       3 |       3 |        rap | 2024-10-09 | 15 |
|       4 |       4 | basketball | 2024-10-08 | 15 |
+---------+---------+------------+------------+----+
2 rows in set

分区表只会overwrite 当前要写入分区


Flink SQL> select * from t_partition;
+---------+---------+----------+------------+----+
| user_id | item_id | behavior |         dt | hh |
+---------+---------+----------+------------+----+
|       3 |       3 |      rap | 2024-10-09 | 15 |
|       1 |       1 |     sing | 2024-10-08 | 15 |
|       2 |       2 |     jump | 2024-10-08 | 15 |
+---------+---------+----------+------------+----+
3 rows in set
-- 对指定分区写入空记录,没有效果INSERT OVERWRITE t_partition  PARTITION (`dt` = '2024-10-08', `hh` = '15') SELECT user_id,item_id,behavior FROM t_partition WHERE false;Flink SQL> select * from t_partition;
+---------+---------+----------+------------+----+
| user_id | item_id | behavior |         dt | hh |
+---------+---------+----------+------------+----+
|       3 |       3 |      rap | 2024-10-09 | 15 |
|       1 |       1 |     sing | 2024-10-08 | 15 |
|       2 |       2 |     jump | 2024-10-08 | 15 |
+---------+---------+----------+------------+----+
3 rows in set-- 对指定分区写入空记录,指定 /*+ OPTIONS('dynamic-partition-overwrite'='false') */,会清空指定的分区INSERT OVERWRITE t_partition  /*+ OPTIONS('dynamic-partition-overwrite'='false') */  PARTITION (`dt` = '2024-10-08', `hh` = '15') SELECT user_id,item_id,behavior FROM t_partition WHERE false;
Flink SQL> select * from t_partition;
+---------+---------+----------+------------+----+
| user_id | item_id | behavior |         dt | hh |
+---------+---------+----------+------------+----+
|       3 |       3 |      rap | 2024-10-09 | 15 |
+---------+---------+----------+------------+----+
1 row in set-- 不指定分区写入空记录,指定 /*+ OPTIONS('dynamic-partition-overwrite'='false') */,会清空所有分区,truncate
INSERT OVERWRITE t_partition /*+ OPTIONS('dynamic-partition-overwrite'='false') */ SELECT * FROM t_partition WHERE false;Flink SQL> select * from t_partition;
Empty set

/*+ OPTIONS('dynamic-partition-overwrite'='false') */ Flink默认的覆盖模式是动态分区覆盖 (即Paimon只删除覆盖数据中出现的分区)。可以配置动态分区覆盖将其更改为静态覆盖。

paimon 没有truncate,因此我们可以借助overwite+静态覆盖,这个实现truncate

查询


修改

Important table properties setting:

  • Only primary key table supports this feature. 表必须有主键
  • MergeEngine needs to be deduplicate or partial-update to support this feature. 合并引擎必须为deduplicate,以后会支持partial-update
  • Do not support updating primary keys. 不能修改主键
  • Flink 版本1.17 及以上版本才支持
  • 必须是批处理模式
UPDATE table_identifier SET column1 = value1, column2 = value2, ... WHERE condition;Flink SQL> select * from t_partition;
+---------+---------+-------------+----+----+
| user_id | item_id |    behavior | dt | hh |
+---------+---------+-------------+----+----+
|     100 |     100 | sing-sample |  1 |  2 |
|     101 |     101 | jump-sample |  1 |  2 |
|     102 |     102 |  rap-sample |  1 |  2 |
+---------+---------+-------------+----+----+
3 rows in setupdate t_partition set behavior = 'baskteball-sample' where user_id =100;Flink SQL> select * from t_partition;
+---------+---------+-------------------+----+----+
| user_id | item_id |          behavior | dt | hh |
+---------+---------+-------------------+----+----+
|     100 |     100 | baskteball-sample |  1 |  2 |
|     101 |     101 |       jump-sample |  1 |  2 |
|     102 |     102 |        rap-sample |  1 |  2 |
+---------+---------+-------------------+----+----+
3 rows in set

删除


常用属性

CREATE TABLE my_table (user_id BIGINT,item_id BIGINT,behavior STRING,dt STRING,hh STRING,PRIMARY KEY (dt, hh, user_id) NOT ENFORCED
) PARTITIONED BY (dt, hh);

统计数优化

paimon 会默认为每一列添加3个统计属性:最大值、最小值、null值数量

有四种配置来约束统计属性

  • full:为所有数据添加最大值、最小值、null值数量统计
  • truncate(length):截断length长度后,为所有数据添加最大值、最小值、null值数量统计,这个是默认值:默认length 16,为了避免长文本字段的统计
  • counts:只对null值数量统计
  • none:不统计

如果需要修改某个字段的统计属性

  • fields.{field_name}.stats-mode,with ( ‘fields.behavior.stats-mode’ = ‘full’ )

官网原文:https://paimon.apache.org/docs/master/flink/sql-ddl/#specify-statistics-mode
在这里插入图片描述

字段默认值

paimon表可以设置字段默认值,但是 不能 对主键字段设置默认值

如果需要修改某个字段的统计属性

  • fields.{field_name}.default-value
  • with ( ‘fields.behavior.default-value’ = ‘sing’ )

官网原文:https://paimon.apache.org/docs/master/flink/sql-ddl/#field-default-value
在这里插入图片描述

聚类写入

在批作业中配置该参数可以启用聚类写入功能,使数据在特定列上按大小范围聚集分布,从而提升该列的查询速度。只能在批处理或者append table(流处理)中使用。

多个列名请使用英文逗号(,)进行分隔,例如’col1,col2’。

  • sink.clustering.by-columns
  • with ( ‘sink.clustering.by-columns’ = ‘user_id,item_id’ )

也可以使用Hints

  • INSERT INTO my_table /*+ OPTIONS(‘sink.clustering.by-columns’ = ‘a,b’) */ SELECT * FROM source;

动态覆盖

Flink overwrite模式,在分区表中默认是动态分区覆盖,也就是说在使用overwrite时,只覆盖当前写入分区的数据,写入数据为空时,不进行覆盖,我们可以设置为静态覆盖,当写入数据为空时,也会覆盖。如果写入的分区为空则覆盖所有分区!

Hints,跟在表的后边,也就是声明本次sql的执行策略,dynamic-partition-overwrite=false > 静态覆盖,truncate的替代语法(TRUNCATE TABLE my_table 需要flink 1.18 之后才支持)
INSERT OVERWRITE my_table /*+ OPTIONS(‘dynamic-partition-overwrite’=‘false’) */

批处理时间旅行

在批处理模式下,每一个表,在发生数据变化时会保留一份快照信息,我们可以在元数据目录找到
RESET ‘execution.checkpointing.interval’;
SET ‘execution.runtime-mode’ = ‘batch’;

root@wsl01:~/soft/paimon/catalog/default.db/t_pk/snapshot# ll
total 28
drwxrwxrwx 1 root root 4096 Oct  8 17:13 ./
drwxrwxrwx 1 root root 4096 Oct  8 16:58 ../
-rwxrwxrwx 1 root root    1 Oct  8 16:58 EARLIEST*
-rwxrwxrwx 1 root root    1 Oct  8 17:13 LATEST*
-rwxrwxrwx 1 root root  621 Oct  8 16:58 snapshot-1*
-rwxrwxrwx 1 root root  621 Oct  8 16:58 snapshot-2*
-rwxrwxrwx 1 root root  621 Oct  8 16:58 snapshot-3*
-rwxrwxrwx 1 root root  621 Oct  8 16:59 snapshot-4*
-rwxrwxrwx 1 root root  621 Oct  8 17:12 snapshot-5*
-rwxrwxrwx 1 root root  623 Oct  8 17:12 snapshot-6*
-rwxrwxrwx 1 root root  625 Oct  8 17:13 snapshot-7*

我们可以指定快照版本进行查询,比如 我要查询快照1版本的数据和快照2版本的数据有什么区别

Flink SQL> select * from t_pk /*+ OPTIONS('scan.snapshot-id' = '1') */;
+---------+---------+----------+----+----+
| user_id | item_id | behavior | dt | hh |
+---------+---------+----------+----+----+
|       1 |       1 |     sing |  1 |  2 |
+---------+---------+----------+----+----+
1 row in setFlink SQL> select * from t_pk /*+ OPTIONS('scan.snapshot-id' = '2') */;
+---------+---------+----------+----+----+
| user_id | item_id | behavior | dt | hh |
+---------+---------+----------+----+----+
|       1 |       1 |     sing |  1 |  2 |
|       2 |       2 |     jump |  1 |  2 |
+---------+---------+----------+----+----+

通过查询我们可以得知,在1版本写入了一条数据1,在2版本写入了一条数据2
每一个表都有一个快照表,我们可以从快照表中获取所有的快照信息和变化情况


Flink SQL> SELECT * FROM t_pk$snapshots;
+-------------+-----------+--------------------------------+---------------------+-------------+-------------------------+--------------------------------+--------------------------------+-------------------------+--------------------+--------------------+------------------------+----------------------+
| snapshot_id | schema_id |                    commit_user |   commit_identifier | commit_kind |             commit_time |             base_manifest_list |            delta_manifest_list | changelog_manifest_list | total_record_count | delta_record_count | changelog_record_count |            watermark |
+-------------+-----------+--------------------------------+---------------------+-------------+-------------------------+--------------------------------+--------------------------------+-------------------------+--------------------+--------------------+------------------------+----------------------+
|           1 |         0 | 1012627f-bc72-4c6f-a270-5ab... | 9223372036854775807 |      APPEND | 2024-10-08 16:58:41.049 | manifest-list-2b0d3b30-b03c... | manifest-list-2b0d3b30-b03c... |                  <NULL> |                  1 |                  1 |                      0 | -9223372036854775808 |
|           2 |         0 | 7d768bf3-2e13-4e2d-b091-130... | 9223372036854775807 |      APPEND | 2024-10-08 16:58:46.607 | manifest-list-b8a205f2-f890... | manifest-list-b8a205f2-f890... |                  <NULL> |                  2 |                  1 |                      0 | -9223372036854775808 |
|           3 |         0 | e2193b18-9491-493a-8b40-88c... | 9223372036854775807 |      APPEND | 2024-10-08 16:58:56.868 | manifest-list-045c4b86-b7f5... | manifest-list-045c4b86-b7f5... |                  <NULL> |                  3 |                  1 |                      0 | -9223372036854775808 |
|           4 |         0 | 548ab8ae-92dd-496f-a066-e57... | 9223372036854775807 |      APPEND | 2024-10-08 16:59:25.990 | manifest-list-563fe53f-e48b... | manifest-list-563fe53f-e48b... |                  <NULL> |                  4 |                  1 |                      0 | -9223372036854775808 |
|           5 |         0 | 2ead5fde-9367-4e09-95cd-aed... | 9223372036854775807 |      APPEND | 2024-10-08 17:12:47.720 | manifest-list-b87abf82-80ef... | manifest-list-b87abf82-80ef... |                  <NULL> |                  5 |                  1 |                      0 | -9223372036854775808 |
|           6 |         0 | 2ead5fde-9367-4e09-95cd-aed... | 9223372036854775807 |     COMPACT | 2024-10-08 17:12:48.638 | manifest-list-b87abf82-80ef... | manifest-list-b87abf82-80ef... |                  <NULL> |                  4 |                 -1 |                      0 | -9223372036854775808 |
|           7 |         0 | ec784398-da6c-48e9-8525-ea6... | 9223372036854775807 |   OVERWRITE | 2024-10-08 17:13:09.135 | manifest-list-f64997fa-77dc... | manifest-list-f64997fa-77dc... |                  <NULL> |                  1 |                 -3 |                      0 | -9223372036854775808 |
+-------------+-----------+--------------------------------+---------------------+-------------+-------------------------+--------------------------------+--------------------------------+-------------------------+--------------------+--------------------+------------------------+----------------------+
7 rows in setFlink SQL> select * from t_pk /*+ OPTIONS('scan.snapshot-id' = '4') */;
+---------+---------+------------+----+----+
| user_id | item_id |   behavior | dt | hh |
+---------+---------+------------+----+----+
|       1 |       1 |       sing |  1 |  2 |
|       2 |       2 |       jump |  1 |  2 |
|       3 |       3 | basketball |  1 |  2 |
+---------+---------+------------+----+----+
3 rows in set

上述查询结果告诉我们 快照id为4的时候数据最多,有4条,但是查询结果显示只有3条,那是因为批处理模式下,不显示删除的数据,而快照数据都统计了,我们可以查询audit表查询操作明细


Flink SQL> SELECT * FROM t_pk$audit_log /*+ OPTIONS('scan.snapshot-id' = '3') */;
+---------+---------+---------+----------+----+----+
| rowkind | user_id | item_id | behavior | dt | hh |
+---------+---------+---------+----------+----+----+
|      +I |       1 |       1 |     sing |  1 |  2 |
|      +I |       2 |       2 |     jump |  1 |  2 |
|      +I |       3 |       3 |      rap |  1 |  2 |
+---------+---------+---------+----------+----+----+
3 rows in setFlink SQL> SELECT * FROM t_pk$audit_log /*+ OPTIONS('scan.snapshot-id' = '4') */;
+---------+---------+---------+------------+----+----+
| rowkind | user_id | item_id |   behavior | dt | hh |
+---------+---------+---------+------------+----+----+
|      +I |       1 |       1 |       sing |  1 |  2 |
|      +I |       2 |       2 |       jump |  1 |  2 |
|      +I |       3 |       3 | basketball |  1 |  2 |
+---------+---------+---------+------------+----+----+
3 rows in set

我们可以看到在 快照4的时候执行了一个 +I id=3的操作,把原来的id=3覆盖掉了,被覆盖掉的那条数据依然会被统计

流处理时间旅行

在流处理模式下,默认情况下,Streaming read 在第一次启动时会生成表上的最新快照,并继续读取最新的更改。
SET ‘execution.checkpointing.interval’=‘30s’;
SET ‘execution.runtime-mode’ = ‘streaming’;

读取最新的数据

SELECT * FROM ws_t /*+ OPTIONS('scan.mode' = 'latest') */

从指定快照id开始读取变更数据

SELECT * FROM ws_t /*+ OPTIONS('scan.snapshot-id' = '1') */;

常用的元数据表

表结构审计

Flink SQL> SELECT * FROM t_pk$schemas;
+-----------+--------------------------------+----------------+-----------------------+---------+---------+-------------------------+
| schema_id |                         fields | partition_keys |          primary_keys | options | comment |             update_time |
+-----------+--------------------------------+----------------+-----------------------+---------+---------+-------------------------+
|         0 | [{"id":0,"name":"user_id","... |             [] | ["dt","hh","user_id"] |      {} |         | 2024-10-08 16:33:10.895 |
+-----------+--------------------------------+----------------+-----------------------+---------+---------+-------------------------+
1 row in set

配置审计

Flink SQL> SELECT * FROM t_pk$options;
Empty set

操作审计

Flink SQL> SELECT * FROM t_pk$audit_log;
+---------+---------+---------+-----------+----+----+
| rowkind | user_id | item_id |  behavior | dt | hh |
+---------+---------+---------+-----------+----+----+
|      +I |      10 |      10 | overwrite |  1 |  2 |
+---------+---------+---------+-----------+----+----+
1 row in set

文件元数据

Flink SQL> SELECT * FROM t_pk$files;
+-----------+--------+--------------------------------+-------------+-----------+-------+--------------+--------------------+------------+------------+--------------------------------+--------------------------------+--------------------------------+---------------------+---------------------+-------------------------+
| partition | bucket |                      file_path | file_format | schema_id | level | record_count | file_size_in_bytes |    min_key |    max_key |              null_value_counts |                min_value_stats |                max_value_stats | min_sequence_number | max_sequence_number |           creation_time |
+-----------+--------+--------------------------------+-------------+-----------+-------+--------------+--------------------+------------+------------+--------------------------------+--------------------------------+--------------------------------+---------------------+---------------------+-------------------------+
|        [] |      0 | data-15fc7fe2-b3e7-485e-b60... |         orc |         0 |     0 |            1 |                948 | [1, 2, 10] | [1, 2, 10] | {behavior=0, dt=0, hh=0, it... | {behavior=overwrite, dt=1, ... | {behavior=overwrite, dt=1, ... |                   0 |                   0 | 2024-10-08 17:13:07.749 |
+-----------+--------+--------------------------------+-------------+-----------+-------+--------------+--------------------+------------+------------+--------------------------------+--------------------------------+--------------------------------+---------------------+---------------------+-------------------------+
1 row in set

标记元数据

Flink SQL> SELECT * FROM t_pk$tags;
Empty set

http://www.ppmy.cn/embedded/128193.html

相关文章

dvwa:xss全系列全难度解析

引号内注入&#xff1a; <select name"default"><option value"English">English</option>^^^^^^^<option value"" disabled"disabled">----</option><option valueEnglish>English</option&g…

Centos7的VNC用户管理

文章目录 1. 准备工作1.1 安装图形化界面1.2 安装Tigervnc 2. 新建用户vnc端口&#xff08;包括root用户&#xff09;2.1 新建系统用户2.2 创建并修改配置文件2.3 加载vnc程序2.4 防火墙设置2.5 开启新端口2.6 远程控制 3. 问题3.1 问题1——端口占用3.2 问题2——更换分辨率 参…

nginx常用功能,网站、反向代理、四层代理、优化方法、python动态页面解析。

nginx的常用功能&#xff1a; 一、网站功能 nginx配置文件的语法&#xff1a; 指令 参数 分号结尾 1. 用户认证 auth_basic "xxx" ; auth_basic_user-file "/path/for/pass" ; htpasswd -c /path/for/pass username1 htpasswd /path/for/pass username2 2…

全面掌握 Linux 服务管理:从入门到精通

全面掌握 Linux 服务管理&#xff1a;从入门到精通 引言 在 Linux 系统中&#xff0c;服务管理是系统管理员和开发者的基本技能之一。无论是启动、停止、重启还是查看服务状态&#xff0c;systemctl 命令都能让你轻松完成这些操作。今天&#xff0c;我们将深入探讨如何使用 sy…

国产 HDMI 发送芯片,兼容 HDMI1.4b 及 HDMI 1.4b 下的视频 3D 传输格式。

最高分辨率高达 4K30Hz&#xff0c;最高采样率达到 300MHz.支持 YUV 和 RGB 之间的色彩空间转 换&#xff0c;数字接口支持 YUV 以及 RGB 格式输入的 IIS 接口以及 S/PDIF 接口支持高清音频的 传输&#xff0c;其中 S/PDIF 接口既可以兼容IEC61937 标准下的压缩音频传输&#x…

如何实现弹出式窗口

文章目录 1 概念介绍2 使用方法3 示例代码我们在上一章回中介绍了Sliver综合示例相关的内容,本章回中将介绍PopupMenuButton组件.闲话休提,让我们一起Talk Flutter吧。 1 概念介绍 我们在本章回中介绍的PopupMenuButton组件位于AppBar右侧,通常显示三个圆点图标,点击该图标…

kibana 删除es指定数据,不是删除索引

1 查询条件查询出满足条件的数据 GET /order_header_idx_202410/_search {"from":0,"size":10,"query":{"bool":{"filter":[{"term":{"oh_tenantId":{"value":"0211000001",&…

NFTScan | 10.07~10.13 NFT 市场热点汇总

欢迎来到由 NFT 基础设施 NFTScan 出品的 NFT 生态热点事件每周汇总。 周期&#xff1a;2024.10.07~ 2024.10.13 NFT Hot News ​01/ 数据&#xff1a;9 月份加密市场大多数指标均出现下降&#xff0c;链上总交易量下降 13% 10 月 7 日&#xff0c;据 The Block 研究总监 la…