文件输出中的NULL为\ N,我希望它们为空 [英] NULLS in File output are \N and I want them to be empty

查看:164
本文介绍了文件输出中的NULL为\ N,我希望它们为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据工厂,该数据工厂从表中读取并将输出作为CSV存储到Blob存储.

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

我注意到,不是将NULL字段留空,而是插入NULL字符\ N..现在,正在摄取此内容的外部系统无法处理\ N.

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"
                }
            }
        ]
    },

谢谢.

推荐答案

设置dataset时,可以将Null value设置为"".请参考我的测试.

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

表数据:

Table data:

输出数据集:

Output Dataset:

生成csv文件:

Generate csv file:

希望它对您有帮助.

这篇关于文件输出中的NULL为\ N,我希望它们为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆