When I run the create external table
query, I have to provide a directory for the 'Location' attribute. But if the directory I point to has more than one file, then it reads both files. For example, if I put LOCATION 'dir1/'
, and dir1 contains file1 and file2, both files will be read.
To avoid this, I want to point to a single file. When I tried LOCATION 'dir1/file1'
, it gave me an error that the file path is not a directory or unable to create one. Is there a way to point to just the single file?