空字符串应被视为Null,并且Null值必须设置为空字符串 [英] Empty string should be treated as Null and Null value must be set to empty string

查看:138
本文介绍了空字符串应被视为Null,并且Null值必须设置为空字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个数据工厂管道,该管道将从blob存储中获取一个文件并将其放入数据仓库表中.我正在按照GitHub Microsoft学习Azure SQL数据仓库Dat220x的说明进行操作.

I am creating a data factory pipeline that takes a file from a blob storage and puts it into a data warehouse table.  I am following the instructions for the GitHub Microsoft Learning Azure SQL Data Warehouse Dat220x.

当我尝试发布管道时,出现以下错误:

When I try to publish the pipeline I get the following error:

"空字符串应被视为Null,并且Null值必须设置为空字符串.不满足直接运行Polybase复制的条件,请指定存储帐户"

"Empty string should be treated as Null and Null value must be set to empty string. Conditions are not met to run polybase copy directly, please specify storage account"

任何人有任何想法,或者以前遇到过这个问题,或者知道我可以在哪里获得更多信息?

Anyone any idea, come across this before, or know where I could get further information?

感谢您的帮助.

推荐答案

要使用Polybase功能,输入数据类型应遵循其规则.对于您的情况,当从blob文件中读取数据时,应添加将nullvalue视为空设置,并按如下所示对待TreatEmptyAsNull设置.

To use Polybase feature, the input data type should follow its rules. For your case, when reading data from blob file, you should add treat nullvalue as empty setting and treatEmptyAsNull setting as below.

" folderPath" "< blobpath>" "format"" "type"; &; TextFormat""
   
"" ;,//您必须具有此设置

typeProperties": {
"folderPath": "<blobpath>",
"format": {
    
"type": "TextFormat",
    
"nullValue": "", // you must have this setting

//您必须具有此设置

"treatEmptyAsNull": true// you must have this setting

}

您可以对这些文件进行抢劫:

You can take a loot at those documents:

https://docs.microsoft.com/zh-cn/azure/data-factory/connector-azure-sql-data-warehouse#direct-copy-by-using-polybase

https://docs.microsoft.com/en-us/azure/data-factory/connector-azure-sql-data-warehouse#direct-copy-by-using-polybase

https://docs.microsoft.com/zh-cn/azure/data-factory/supported-file-formats-and-compression-codecs#text-format

https://docs.microsoft.com/en-us/azure/data-factory/supported-file-formats-and-compression-codecs#text-format


这篇关于空字符串应被视为Null,并且Null值必须设置为空字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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