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
相关推荐
金銀銅鐵39 分钟前
[Python] 从《千字文》中随机挑选汉字cup115 小时前
[技术复盘] Windows Python 打包实战:Nuitka 环境踩坑总结与 CI 自动化构建全指南aqi007 小时前
15天学会AI应用开发(七)有了大模型为什么还要引入RAG金銀銅鐵9 小时前
用 Python 实现 Take-Away 游戏copyer_xyf10 小时前
Agent 流程编排copyer_xyf10 小时前
Agent RAGcopyer_xyf10 小时前
【RAG】向量数据库:milvuscopyer_xyf11 小时前
Agent 记忆管理星云穿梭1 天前
用Python写一个带图形界面的学生管理系统——完整教程