Ritesh
Ritesh

Reputation: 1034

How to create External table in Azure without the location path exist

Is there anyway to create External table in Azure SQL DWH even though the location path mentioned in external table statement doesn't exist.

For eg:- location '/src/temp' doesn't exist still I want external table to be created.

create external table ext.dummy(
PERSON_ID   varchar(500) ,
ASSIGNMENT_ID varchar(500)
)
WITH 
(
    LOCATION='/src/temp',
    DATA_SOURCE = YasCdpBlobStorage,
    FILE_FORMAT = ExtTableTextFileFormat,
    REJECT_TYPE = VALUE,
    REJECT_VALUE = 0
);

Upvotes: 1

Views: 1908

Answers (1)

wBob
wBob

Reputation: 14389

No, this is not possible. The external location whether it is a folder or a filepath must exist before you create the external table.

Although the documentation does not state this explicitlly, it is implied by the term "actual", ie

LOCATION = 'folder_or_filepath'

Specifies the folder or the file path and file name for the actual data in Hadoop or Azure blob storage.

Upvotes: 2

Related Questions