Description

StreamOperator to sink data a file in plain text lines.

Parameters

Name Description Type Required? Default Value
filePath File path String
overwriteSink Whether to overwrite existing data. Boolean false
numFiles Number of files Integer 1

Script Example

Script

  1. URL = "http://alink-testdata.cn-hangzhou.oss.aliyun-inc.com/csv/iris_vec.csv";
  2. SCHEMA_STR = "features string, label double"
  3. data = CsvSourceStreamOp().setFilePath(URL).setSchemaStr(SCHEMA_STR)
  4. sink = TextSinkSteamOp().setFilePath('/tmp/text.csv')
  5. data.select('features').link(sink)
  6. StreamOperator.execute()