NULLS in File output are \N and I want them to be empty

僤鯓⒐⒋嵵緔 提交于 2019-12-10 19:35:31

问题


I have a datafactory that reads from a table and stores the output as a CSV to Blob Storage.

I have noticed that instead of leaving a NULL field blank it inserts the NULL character \N.. Now the external system that is ingesting this can't handle \N.

Is there anyway in my dataset where I can say leave nulls blank.

Below is my dataset properties:

  "typeProperties": {
        "fileName": "MasterFile-{fileDateNameVariable}.csv",
        "folderPath": "master-file-landing",
        "format": {
            "type": "TextFormat",
            "columnDelimiter": ",",
            "firstRowAsHeader": true
        },
        "partitionedBy": [
            {
                "name": "fileDateNameVariable",
                "value": {
                    "type": "DateTime",
                    "date": "SliceStart",
                    "format": "yyyyMMdd"
                }
            }
        ]
    },

Thanks in advance.


回答1:


You could set the Null value to "" when you set your dataset. Please refer to my test.

Table data:

Output Dataset:

Generate csv file:

Hope it helps you.



来源:https://stackoverflow.com/questions/49621990/nulls-in-file-output-are-n-and-i-want-them-to-be-empty

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!