Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5258

Allow "extended" mock tables access from SQL queries

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.10.0
    • 1.10.0
    • None

    Description

      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:

      SELECT * FROM `mock`.`example/mock-options.json`
      

      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.

      Attachments

        Issue Links

          Activity

            People

              paul-rogers Paul Rogers
              paul-rogers Paul Rogers
              Sorabh Hamirwasia Sorabh Hamirwasia
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: