spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacky Shen (JIRA)" <>
Subject [jira] [Commented] (SPARK-21785) Support create table from a file schema
Date Thu, 05 Oct 2017 17:13:00 GMT


Jacky Shen commented on SPARK-21785:

Yes, we can create table from existing parquet file and it is a good solution.

but for the request itself, the user want to create table with the schema from the given parquet
file and specify a different location to the table. Maybe more other table properties.
that's the "create table ... using parquet" cannot achieve.

spark-sql> create table table2 using parquet options(path '/Users/jacshen/project/git-rep/spark/sql/core/src/test/resources/test-data/dec-in-fixed-len.parquet')
location '/tmp/table1';
Error in query: 
LOCATION and 'path' in OPTIONS are both used to indicate the custom table path, you can only
specify one of them.(line 1, pos 0)


> Support create table from a file schema
> ---------------------------------------
>                 Key: SPARK-21785
>                 URL:
>             Project: Spark
>          Issue Type: Wish
>          Components: SQL
>    Affects Versions: 2.1.1, 2.2.0
>            Reporter: liupengcheng
>              Labels: sql
> Current spark doest not support creating a table from a file schema
> for example:
> {code:java}
> CREATE EXTERNAL TABLE IF NOT EXISTS test LIKE PARQUET '/user/test/abc/a.snappy.parquet'
> '/user/test/def/';
> {code}

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message