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

Allow setting default schema using REST API / Web UI

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.17.0
    • Fix Version/s: 1.18.0
    • Component/s: Web Server
    • Labels:
      None

      Description

      Currently, to set the default schema you must run the `USE <schema>` command.  However, the Web UI and REST API do not keep a session open so the `USE` command does not affect the next query sent to the API.

      To support a default schema for REST API & Web UI I propose a parameter to the API "defaultSchema" which sets the default schema for that query.

      Example: curl -d '

      {"query":"SHOW FILES","defaultSchema":"dfs.tmp","queryType":"SQL"}

      ' -H 'Content-Type: application/json' -H 'User-Name: test' localhost:8047/query.json

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Paul.Rogers Paul Rogers
                Reporter:
                dobesv Dobes Vandermeer
                Reviewer:
                Arina Ielchiieva
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: