import argparse
import logging
import sys
from pyflink.common import WatermarkStrategy, Encoder, Types
from pyflink.datastream import StreamExecutionEnvironment, RuntimeExecutionMode
from pyflink.datastream.connectors.file_system import FileSource, StreamFormat, FileSink, OutputFileConfig, RollingPolicy
env = StreamExecutionEnvironment.get_execution_environment()
env.set_runtime_mode(RuntimeExecutionMode.BATCH)
# write all the data to one file
env.set_parallelism(1)
ds = env.from_source(
source=FileSource.for_record_stream_format(StreamFormat.text_line_format(),
'./test.csv')
.process_static_file_set().build(),
watermark_strategy=WatermarkStrategy.for_monotonous_timestamps(),
source_name="aaaa"
)
ds.print()
env.execute()
pyflink 读取excel
scan7242024-05-01 13:07
相关推荐
IT=>小脑虎4 分钟前
2026版 Python零基础小白学习知识点【基础版详解】我想吃烤肉肉7 分钟前
Playwright中page.locator和Selenium中find_element区别rabbit_pro11 分钟前
Java使用Mybatis-Plus封装动态数据源工具类Learner24 分钟前
Python运算符一晌小贪欢28 分钟前
Python 精确计算:告别浮点数陷阱,decimal 模块实战指南空城雀35 分钟前
python精通连续剧第一集:简单计算器斯特凡今天也很帅1 小时前
python测试SFTP连通性sunywz1 小时前
【JVM】(4)JVM对象创建与内存分配机制深度剖析wheelmouse77881 小时前
如何设置VSCode打开文件Tab页签换行