Ed Baker
Ed Baker

Reputation: 663

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

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.

Upvotes: 3

Views: 2007

Answers (1)

Jay Gong
Jay Gong

Reputation: 23792

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

Table data:

enter image description here

Output Dataset:

enter image description here

enter image description here

Generate csv file:

enter image description here

Hope it helps you.

Upvotes: 3

Related Questions