【发布时间】:2018-05-08 14:45:46
【问题描述】:
我将用户定义类型定义为
namespace AddOns{
[SqlUserDefinedType(typeof(JsonObjectFormatter))]
public class JsonObject
{
public string Value {get;set;}
... // this is just a dummy representation
}
}
我想定义一个返回数据类型的表值函数
REFERENCE ASSEMBLY [AddOns];
CREATE TYPE Insight.dbo.JsonRow
AS TABLE
(
[Id] Guid,
[Value] AddOns.JsonObject
);
但是我得到一个错误
'E_CSC_USER_INVALIDCOLUMNTYPE: 'AddOns.JsonObject' cannot be used as column type.
Description:
The column type must be a supported scalar, complex or user defined type.
Resolution:
Ensure the column type is a supported type. For a user defined type, make sure the type is registered, the type name is fully qualified, and the required assembly is referenced by the script.'
*** Compile failed !
我已经在我的本地 ADLA 实例中注册了适当的 DLL,并且当我将数据保存到文件时,我能够访问过程 SELECT 语句中的类型。但不能将其作为 TVF 返回类型返回
【问题讨论】:
标签: azure-data-lake u-sql