Questions tagged [external-tables]

To be used for External tables. These tables don't necessarily have data in the data warehouse(or database directory).

Hive

An EXTERNAL table points to any HDFS location for its storage, rather than being stored in a folder specified by the configuration property hive.metastore.warehouse.dir(Location of default database for the warehouse). See also official Hive docs on Managed vs External Tables

Oracle

External tables allow Oracle to query data that is stored outside the database in flat files. The ORACLE_LOADER driver can be used to access any data stored in any format that can be loaded by SQL*Loader. No DML can be performed on external tables but they can be used for query, join and sort operations.

381 questions
2
votes
1 answer

Snowflake External Table failed to cast variant value NULL to DATETIME/TIMESTAMP_NTZ type

Created an external table with a column of type datetime (TIMESTAMP_NTZ type), the external stage has a csv file with null value in the column. Selecting from the external table is giving "Failed to cast variant value "null" to…
2
votes
1 answer

Why is External Table syntax different in SQL Server 2019 vs Azure SQL Database? `

I have to perform cross DB querying in SQL Server 2019 as well as Azure SQL. I am able to create External data source and external tables in both databases, however the syntax seem to be different. Can someone please guide me if there is one…
2
votes
1 answer

Snowflake External Table : Add new column

I created a snowflake external table successfully and was able to load the data from s3. I want to add a column to this external table. In the Snowflake documentation they say that - "Alter an existing external table to add or remove columns using…
2
votes
0 answers

Oracle 18c external table importing csv file from UNC path

Preface This script has worked previously when importing a csv file into an external table when using a local path for the created directory (with a local drive like F:\stats) instead of a UNC path (\\station-1\...) Script CREATE OR REPLACE…
Frazic
  • 77
  • 9
2
votes
1 answer

Access Data from Azure Data Lake Store using Polybase with Azure Data Warehouse

I get a error when create external table https://exoticbaryon.anset.org/2017/06/26/access-data-from-azure-data-lake-store-using-polybase-with-azure-data-warehouse/#comment-157 CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'xxxxx' CREATE DATABASE…
Shuai
  • 21
  • 1
2
votes
1 answer

HIVE - create external tables where string itself contains commas

I am new to Hive and am creating external tables on csv file. One of the issues I am coming across are values that contain multiple commas within string itself. For example, the csv file contains the following: CSV File When I create an external…
Rspktcod
  • 23
  • 6
2
votes
1 answer

Can we check the hive deleted table history or detailed information around it?

I have came across one scenario where someone dropped/deleted hive table from production environment by mistake. How can I track the history and get the details i.e.(who has deleted and when it got deleted). Any Suggestions?
code
  • 123
  • 3
  • 11
2
votes
0 answers

Azure PolyBase external table from binary blob data?

I have several million image blobs stored in a Azure storage container. The blobs have a predictable name ([unique key].jpg.) Examples: 1234.jpg, 230.jpg & so on. If possible, how can I create an external table using this data which can be…
jujiro
  • 190
  • 1
  • 1
  • 11
2
votes
2 answers

Azure SQL db query external Azure SQL DB - PPDwManagedToNativeInteropException

I have one Azure SQL server where I have several databases. I need to be able to query across these databases, and have at the moment solves this through external tables. A challange with this solution is that external tables does not support all…
Refi
  • 79
  • 11
2
votes
0 answers

SQL server 2016 external data source - Incorrect syntax near 'external'

I have a SQL server 2016 with a DB running on it. The SQL server runs on a Windows server 2016 as a VM through Azure. Within that DB I'd like to create an external data source that reference a DB on another server remote server. I have created the…
Refi
  • 79
  • 11
2
votes
1 answer

Athena - creating external table with field name different from parquet column name

I'm trying to create an external table using Athena. The data being read is formatted as parquet and my external table script is : CREATE EXTERNAL TABLE IF NOT EXISTS my_table ( a string, b string, y string ) PARTITIONED BY ( …
Rodrigo Ney
  • 353
  • 4
  • 20
2
votes
1 answer

Droped and recreated hive external table, but no data shown

First a hive external table is created: create external table user_tables.test (col1 string, col2 string) partitioned by (date_partition date); records are inserted: INSERT INTO TABLE user_tables.test PARTITION (date_partition='2017-11-16') VALUES…
Ani Menon
  • 27,209
  • 16
  • 105
  • 126
2
votes
1 answer

Decimal fields in Oracle external table

I build an external table in Oracle 12c using the following code CREATE TABLE T_EXT_TABLE ( "ENTIDADE_NAME" VARCHAR2(50 BYTE), "ENTIDADE_AGE" NUMBER(*,0) ) ORGANIZATION EXTERNAL ( TYPE ORACLE_LOADER DEFAULT DIRECTORY "EXTTBL_DATA_DIRECTORY" …
miduarte
  • 83
  • 1
  • 8
2
votes
0 answers

External References to SQL tables in Visual Studio 2017 causes schema compare to not allow updates

I have created a database project in the latest version of SSDT in visual studio 2017 (side note: please sort out your naming Microsoft as there are 2 products called SSDT!). I have connected to an Azure SQL PaaS database, which works fine and…
2
votes
0 answers

SQL Server 2016 errror Incorrect syntax near 'EXTERNAL'

I have two SQL Server 2016 VMs in Azure. I am trying to connect these two sql server instances using External datasource. I can safely connect the two instances from my local pc, remotely. While querying using external table/data source, I am…