当使用 DelimitedText 格式作为输入数据源时,如果数据文件中的列数超过了定义的列数,就会出现 DelimitedTextMoreColumnsThanDefined 错误。解决方法有两种:
示例代码:
"structure": [ {"name": "col1", "type": "String"}, {"name": "col2", "type": "String"}, {"name": "col3", "type": "String"}, {"name": "col4", "type": "String"}, {"name": "col5", "type": "String"} ]
示例代码:
"structure": [ {"name": "col1", "type": "String"}, {"name": "col2", "type": "String"}, {"name": "col3", "type": "String"}, {"name": "col4", "type": "String", "optional": "true"} ]
以上两种方法都可以解决 DelimitedTextMoreColumnsThanDefined 错误,具体选择哪种方法取决于数据源的实际情况。