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

Support create table as query (CTAS)

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4.0
    • Component/s: None
    • Labels:
      None

      Description

      Support queries like:

      USE dfs.tmp;
      CREATE TABLE nameposTable AS SELECT first_name, last_name, position_id FROM cp.`employee.json`;
      

      Above query will create "nameposTable" directory under the dfs.tmp workspace and it has the data files created from the SELECT query.

      As part of this there is a change in format of workspaces field of storage-plugins.json:

      New workspaces field looks like:

            workspaces: {
              "home" : {
                location: "/",
                writable: false
              },
              "tmp" : {
                location: "/tmp/drilltest",
                writable: true,
                storageformat: "csv"
              }
            },
      

      "storageformat" tells what is the default format of new tables created in this workspace. "writable" tells whether new tables/views are allowed in this workspace.

        Attachments

        1. DRILL-679-1.patch
          148 kB
          Venki Korukanti

          Issue Links

            Activity

              People

              • Assignee:
                vkorukanti Venki Korukanti
                Reporter:
                vkorukanti Venki Korukanti
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: