[来自客户的发布问题]
我想使用 Polybase 定期加载到 SQL 数据仓库中。我的计划是创建一个存储过程,该存储过程接受创建外部表的“位置”参数,但该参数由于语法而失败。这是我编写的代码示例:
alter PROCEDURE CETFromNewLocation
as
begin
Declare @location varchar(100)='data/2015/2015831';
Create External TABLE stg_tbl (
[DateId] int NULL
)
WITH (
LOCATION= @location,
DATA_SOURCE = my_external_source,
FILE_FORMAT = my_external_file_format,
REJECT_TYPE = VALUE,
REJECT_VALUE = 0
)
end
我收到的错误消息是:
> Parse error at line: 25, column: 16: Incorrect syntax near
> '@location'.