You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/02/17 23:11:44 UTC

[jira] [Commented] (DRILL-5258) Allow "extended" mock tables access from SQL queries

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

ASF GitHub Bot commented on DRILL-5258:
---------------------------------------

GitHub user paul-rogers opened a pull request:

    https://github.com/apache/drill/pull/752

    DRILL-5258: Access mock data definition from SQL

    Extends the mock data source to allow using the full power of the mock
    data source from an SQL query by referencing the JSON definition
    file. See JIRA and package-info for details.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/paul-rogers/drill DRILL-5258

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/752.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #752
    
----
commit eb9860d4365f60da3b3c22fc0f96a9acfd31ed5c
Author: Paul Rogers <pr...@maprtech.com>
Date:   2017-02-14T18:02:13Z

    DRILL-5258: Access mock data definition from SQL
    
    Extends the mock data source to allow using the full power of the mock
    data source from an SQL query by referencing the JSON definition
    file. See JIRA and package-info for details.

----


> Allow "extended" mock tables access from SQL queries
> ----------------------------------------------------
>
>                 Key: DRILL-5258
>                 URL: https://issues.apache.org/jira/browse/DRILL-5258
>             Project: Apache Drill
>          Issue Type: Improvement
>    Affects Versions: 1.10
>            Reporter: Paul Rogers
>            Assignee: Paul Rogers
>            Priority: Minor
>             Fix For: 1.10
>
>
> DRILL-5152 provided a simple way to generate sample data in SQL using a new, simplified version of the mock data generator. This approach is very convenient, but is inherently limited. For example, the limited syntax available in SQL does not encoding much information about columns such as repeat count, data generator or so on. The simple SQL approach does not allow generating multiple groups of data.
> However, all these features are present in the original mock data source via a special JSON configuration file. Previously, only physical plans could access that extended syntax.
> This ticket requests a SQL interface to the extended mock data source:
> {code}
> SELECT * FROM `mock`.`example/mock-options.json`
> {code}
> Mock data source options are always stored as a JSON file. Since the existing mock data generator for SQL never uses JSON files, a simple rule is that if the table name ends in ".json" then it is a specification, else the information is encoded in table and column names.
> The format of the data generation syntax is documented in the mock data source classes.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)