Azure SQL数据仓库:varchar类型的最大大小 [英] Azure SQL Data Warehouse: max size of varchar type

查看:51
本文介绍了Azure SQL数据仓库:varchar类型的最大大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Azure的新手,并且在Azure SQL数据仓库的表中有此字段:

I am new to Azure and I have this field in my table in Azure SQL Data Warehouse:

[AnnotationText] varchar(MAX) NULL,

基于我从

  • varchar [(n | max)]可变大小的字符串数据.使用n来定义字符串大小(以字节为单位),并且可以是1到8,000之间的值,或者使用max来指示列约束大小,最大存储量为2 ^ 31-1字节(2 GB).
  • 但是我看到的是这种错误消息类型的大小为8000:

    But what I am seeing is the size of 8000 with this type of error message:

    Too long string in column [-1]: Actual len = [11054]. MaxLEN=[8000]
    

    我试图对大小进行硬编码,但是任何大于8000的数字都无法按照文档中的说明工作.

    I tried to hardcode the size but any number bigger than 8000 isn't working as written in the document.

    我还发现一些文档说在表创建中应该使用HEAP或CLUSTERED INDEX类型,但这也无济于事

    Also I found some docs saying that HEAP or CLUSTERED INDEX type should be used in the table creation but it didn't help either

    知道发生了什么事吗?

    推荐答案

    ADF

    ADF documents that (max) data types are not supported for Polybase.

    一种常用的技术是在ADF中拆分文件,使用Polybase批量加载LOB数据,然后再使用另一种技术在以后添加LOB数据.另一种技术-更快-是使用ADF拆分,然后在摄取时使用位于外部表上的视图重新组装它.

    One commonly used technique is to split the file in ADF, using Polybase to bulk load the LOB data, then an alternative technique to add the LOB data later. Another technique - faster - is to split the column using ADF, and reassemble it using a view layered over the external table at the point of ingestion.

    更好的方法可能是质疑为什么在数据仓库中需要LOB数据.根据LOB的类型,是否可以使用其他方法?例如,如果LOB代表文档,是否可以将其外部化到DW表中具有链接的Blob存储中?

    A better approach may be to question why LOB data is required in the data warehouse. Is there an alternative approach that could be used, depending on the type of the LOB? For example, if the LOB represents a document, could it be externalised to a blob store with a link in the DW table?

    这篇关于Azure SQL数据仓库:varchar类型的最大大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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