本文介绍了外部表:Azure Blob存储:CREATE EXTERNAL TABLE连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在创建外部表时,我一直在低于错误 


创建外部数据源sql2016ds 

WITH



TYPE = HADOOP,

LOCATION ='wasbs://[email protected]/',

CREDENTIAL   = cred_azstorage);
$
GO



创建外部文件格式CSV 

WITH( 

   FORMAT_TYPE = DELIMITEDTEXT, 

   FORMAT_OPTIONS( 

     FIELD_TERMINATOR =','

  ) 

);



创建外部表Test20126 

( 

   Name VARCHAR(255),

   Country VARCHAR(255),

   MobileNumber VARCHAR(255)

) 

WITH 

( 

  ;  LOCATION ='/ dbproxsqlcontainer', 

   DATA_SOURCE = sql2016ds, 

   FILE_FORMAT = CSV,

REJECT_TYPE = value, 

   REJECT_VALUE = 1 


错误:



  1. Msg
    102
    Level
    15
    State
    1
    31


  2. 附近的语法错误
    'CREDENTIAL'





Mohd Sufian www.sqlship.wordpress.com如果有帮助,请将帖子标记为已回复。

解决方案

While creating External Table i am continuously getting below error 

CREATE EXTERNAL DATA SOURCE sql2016ds 
WITH
(
TYPE = HADOOP,
LOCATION = 'wasbs://[email protected]/',
CREDENTIAL  = cred_azstorage);
GO

CREATE EXTERNAL FILE FORMAT CSV 
WITH ( 
    FORMAT_TYPE = DELIMITEDTEXT, 
    FORMAT_OPTIONS ( 
        FIELD_TERMINATOR = ','
    ) 
);

CREATE EXTERNAL TABLE Test20126 

    Name VARCHAR(255),
    Country VARCHAR(255),
    MobileNumber VARCHAR(255)

WITH 

    LOCATION = '/dbproxsqlcontainer', 
    DATA_SOURCE = sql2016ds, 
    FILE_FORMAT = CSV,
REJECT_TYPE = value, 
    REJECT_VALUE=1 
)

ERROR:

  1. Msg102, Level 15, State 1, Line 31
  2. Incorrect syntax near'CREDENTIAL'.

Mohd Sufian www.sqlship.wordpress.com Please mark the post as Answered if it helped.

解决方案


这篇关于外部表:Azure Blob存储:CREATE EXTERNAL TABLE连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 21:47