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

1.6k views Asked by At

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
);
1

There are 1 answers

0
wBob On

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.