You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Paul Rogers (JIRA)" <ji...@apache.org> on 2016/05/09 17:09:12 UTC

[jira] [Commented] (DRILL-4644) Allow setting format options in CTAS

    [ https://issues.apache.org/jira/browse/DRILL-4644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276633#comment-15276633 ] 

Paul Rogers commented on DRILL-4644:
------------------------------------

Two suggestions:

CREATE TABLE <tablename> (type => 'csv', fieldDelimiter => ',') AS <query>;

That is, if SQL does not currently have syntax that allows parens after table name, then putting the options directly after the table would be the most intuitive. The parens act as delimiters for the list.

Else, if we use syntax as a delimiter, then the parens become unnecessary:

CREATE TABLE <tablename> OPTION type => 'csv',
fieldDelimiter => ',' AS <query>;

The material between OPTION and the next keyword must be key/value pairs separated by commas.

I personally prefer the first solution.

> Allow setting format options in CTAS
> ------------------------------------
>
>                 Key: DRILL-4644
>                 URL: https://issues.apache.org/jira/browse/DRILL-4644
>             Project: Apache Drill
>          Issue Type: Improvement
>            Reporter: amit hadke
>            Assignee: amit hadke
>            Priority: Minor
>
> User has to set session options in order to specify how CTAS should store a table.(store.format='json')
> Add a new option in CTAS 'STORE AS' that takes optional parameters similar to format attributes used in table functions.
> For example
> CREATE TABLE <tablename> STORE AS(type => 'csv',
> fieldDelimiter => ',') AS <query>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)