U-SQL外部表错误:'无法将'System.DBNull'类型的对象强制转换为'System.Type'。' [英] U-SQL External table error: 'Unable to cast object of type 'System.DBNull' to type 'System.Type'.'
问题描述
您好,
我无法为两个特定的表创建外部表,
I'm failing to create external tables to two specific tables,
我已经创建了几个外部表没问题,
I already created few external tables with no issues,
我在失败和成功的外部表之间看到的唯一区别是失败的表包含地理类型列,所以我认为这是问题,但我是不确定。
The only difference I can see between the failed and the successful external tables is that the tables that failed contains geography type columns, so I think this is the issue but i'm not sure.
无论如何,这是我部署U-SQL数据库时遇到的错误:
Anyway, this is the error I get when i deploy the U-SQL DB:
Failed to connect to data source: 'SqlDbSource', with error(s): 'Unable to cast object of type 'System.DBNull' to type 'System.Type'.'
这是用于创建外部表的U-SQL代码:
This is the U-SQL code to create the external table:
CREATE EXTERNAL TABLE IF NOT EXISTS [Data].[Devices]
(
[Id] int
)
FROM SqlDbSource LOCATION "[Data].[Devices]";
希望有人会提出解决方案或任何想法可能会出现问题,
Hope someone will come with solution or any idea to what could be the problem,
提前致谢,
Dor Meiri
Dor Meiri
推荐答案
Hi Dor,
Hi Dor,
请在
您打开的其他主题。除此之外,我还建议你看看
如何使用查询创建表。在查询中,您应该能够使用"提取器"。在查询中创建表。要了解有关提取器的更多信息,请查看 这个
doc 。
Please have a look at my answer on the other thread opened by you. To add to that, I would also recommend you to have a look at how to create a table using a query. In the query, you should be able to use "extractors" in the query to create the tables. To read more about extractors, please have a look at this doc.
希望这会有所帮助。
这篇关于U-SQL外部表错误:'无法将'System.DBNull'类型的对象强制转换为'System.Type'。'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!