调试FakeSource,LocalFile
# Set the basic configuration of the task to be performed
env {execution.parallelism = 1job.mode = "BATCH"
}# Create a source to connect to Mongodb
source {# This is a example source plugin **only for test and demonstrate the feature source plugin**FakeSource {parallelism = 2result_table_name = "fake"row.num = 16schema = {fields {name = "string"age = "int"}}}
}sink {LocalFile {path = "/tmp/seatunnel/excel"file_format_type="excel"
}
}
调试前准备工作:
1.导入需要的connector
2.启动依赖Hadoop,设置Hadoop环境变量,记得安装Hadoop,放入winutils.exe
3.将配置文件放入到代码里面的resource目录下
4.运行类
org.apache.seatunnel.example.engine.SeaTunnelEngineExample