当前位置:网站首页>使用Flink1.14操作Iceberg0.13
使用Flink1.14操作Iceberg0.13
2022-07-17 02:11:00 【雾岛与鲸】
环境:
flink1.14.5
iceberg0.13.2
hadoop2.6.7
从https://iceberg.incubator.apache.org/releases/下载flink1.14所需的运行jar,放到flink的lib目录下,启动flink集群:
./bin/start-cluster.sh
启动Flink SQL Client:
./bin/sql-client.sh embedded shell
执行操作
Flink SQL> CREATE CATALOG hadoop_catalog WITH (
> 'type'='iceberg',
> 'catalog-type'='hadoop',
> 'cache-enabled'='true',
> 'warehouse'='hdfs://localhost:8020/flink-iceberg/iceberg-hadoop',
> 'property-version'='1'
> );
[INFO] Execute statement succeed.
Flink SQL> CREATE DATABASE hadoop_catalog.iceberg_db;
[INFO] Execute statement succeed.
Flink SQL> CREATE TABLE hadoop_catalog.iceberg_db.sample_test (
> id BIGINT COMMENT 'unique id',
> data STRING,
> PRIMARY KEY(id) NOT ENFORCED
> )
> WITH (
> 'format-version'= '2',
> 'write.format.default'='parquet',
> 'write.parquet.compression-codec'='gzip',
> 'write.upsert.enable'='true'
> );
[INFO] Execute statement succeed.
Flink SQL> INSERT INTO hadoop_catalog.iceberg_db.sample_test VALUES
> (10, 'test10_U'), (11, 'test11'), (12, 'test12');
[INFO] Submitting SQL update statement to the cluster...
[INFO] SQL update statement has been successfully submitted to the cluster:
Job ID: ab22b4fbe1601bafc50f9c581648707f
Flink SQL> select * from hadoop_catalog.iceberg_db.sample_test;
[INFO] Result retrieval cancelled.
查询数据结果:
边栏推荐
- 1. PostgreSQL根据动态表名查询近24小时数据
- 基于Matlab的男女声音信号分析与处理
- Chapter II: news topic classification tasks
- GNOME-BOXES虚拟机创建安装
- Receiver operating curve
- Paper reading: u-net++: redesigning skip connections to exploit multiscale features in image segmentation
- Binary search (leetcode704. very simple and necessary)
- Derivation of PCA principal component analysis (dimension reduction) process
- 运算符、赋值语句、结构说明语句
- Dive into deep learning - 2.2 data preprocessing
猜你喜欢

Wdog and power mode of fs32k148 commissioning

Neural network learning notes 2.2 -- write a simple convolution neural network image classifier with MATLAB

Chapter 4 用户数据分析

Receiver operating curve

Detailed explanation of arrow function and this direction

通过OpenHarmony兼容性测评,大师兄开发板与丰富教培资源已ready

Properties of Gaussian distribution (including code)

爬虫学习(5):手把手教你爬虫requests实战演练

論文閱讀:U-Net++: Redesigning Skip Connections to Exploit Multiscale Features in Image Segmentation

【C语言】0基础教程——文件操作(未完待续)
随机推荐
IEEE754 standard floating point format
About 1000base-t1 1000Base-TX and 100base-t1
Go语言中的Iota关键字怎么使用
论文阅读:U-Net++: Redesigning Skip Connections to Exploit Multiscale Features in Image Segmentation
Game theory of catching lice
VGG (Visual Geometry Group)
MySQL master-slave setup
367. Effective complete square (necessary for entry)
leetcode 222. 完全二叉树的节点个数(必会)
Cmake common commands
Work fishing clock simulator wechat applet source code
Chapter 4 用户数据分析
374. 猜数字大小(入门 必会)
[C language errata] error in getting array length in function
論文閱讀:U-Net++: Redesigning Skip Connections to Exploit Multiscale Features in Image Segmentation
Unity solves the problem of Z-fighting caused by overlapping objects with the same material
S32k148evb about eNet loopback experiment
洛谷每日三题之第三天(第四天补做)
leetcode 222. Number of nodes of a complete binary tree (required)
Boston house price analysis assignment summary