title: Apache Drill S3 : No default schema selected
body: <p>I am trying to work with Apache Drill. I am new to this whole environment, just trying to understand how Apache Drill works.</p>
  
  <p>I am trying to query my json data stored on s3 using Apache Drill.
  My bucket is created in <strong>US East (N. Virginia)</strong>.<br>
  I have created a new Storage Plugin for S3 using <a href="https://drill.apache.org/docs/s3-storage-plugin/" rel="nofollow noreferrer">this</a> link.</p>
  
  <p>Here is the configuration for my new S3 Storage Plugin :</p>
  
  <pre><code>{
    "type": "file",
    "enabled": true,
    "connection": "s3a://testing-drill/",
    "config": {
      "fs.s3a.access.key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "fs.s3a.secret.key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    },
    "workspaces": {
      "root": {
        "location": "/",
        "writable": false,
        "defaultInputFormat": null,
        "allowAccessOutsideWorkspace": false
      },
      "tmp": {
        "location": "/tmp",
        "writable": true,
        "defaultInputFormat": null,
        "allowAccessOutsideWorkspace": false
      }
    },
    "formats": {
      "psv": {
        "type": "text",
        "extensions": [
          "tbl"
        ],
        "delimiter": "|"
      },
      "csv": {
        "type": "text",
        "extensions": [
          "csv"
        ],
        "delimiter": ","
      },
      "tsv": {
        "type": "text",
        "extensions": [
          "tsv"
        ],
        "delimiter": "\t"
      },
      "parquet": {
        "type": "parquet"
      },
      "json": {
        "type": "json",
        "extensions": [
          "json"
        ]
      },
      "avro": {
        "type": "avro"
      },
      "sequencefile": {
        "type": "sequencefile",
        "extensions": [
          "seq"
        ]
      },
      "csvh": {
        "type": "text",
        "extensions": [
          "csvh"
        ],
        "extractHeader": true,
        "delimiter": ","
      }
    }
  }
  </code></pre>
  
  <p>I have also configured my <code>core-site-example.xml</code> as follows:</p>
  
  <pre><code>&lt;configuration&gt;
  
      &lt;property&gt;
          &lt;name&gt;fs.s3a.access.key&lt;/name&gt;
          &lt;value&gt;xxxxxxxxxxxxxxxxxxxx&lt;/value&gt;
      &lt;/property&gt;
  
      &lt;property&gt;
          &lt;name&gt;fs.s3a.secret.key&lt;/name&gt;
          &lt;value&gt;xxxxxxxxxxxxxxxxxxxxxxxx&lt;/value&gt;
      &lt;/property&gt;
  
      &lt;property&gt;
          &lt;name&gt;fs.s3a.endpoint&lt;/name&gt;
          &lt;value&gt;s3.us-east-1.amazonaws.com&lt;/value&gt;
      &lt;/property&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>But when I try to use/set the workspace using the following command :</p>
  
  <pre><code>USE shiv.`root`;
  </code></pre>
  
  <p>It gives me following error :</p>
  
  <pre><code>Error: VALIDATION ERROR: Schema [shiv.root] is not valid with respect to either root schema or current default schema.
  
  Current default schema:  No default schema selected
  
  [Error Id: 6d9515c0-b90f-48aa-9dc5-0c660f1c06ca on ip-10-0-3-241.ec2.internal:31010] (state=,code=0)
  </code></pre>
  
  <p>If try to execute <code>show schemas;</code>, then I get the following error :</p>
  
  <pre><code>show schemas;
  Error: SYSTEM ERROR: AmazonS3Exception: Status Code: 400, AWS Service: Amazon S3, AWS Request ID: EEB438A6A0A5E667, AWS Error Code: null, AWS Error Message: Bad Request
  
  Fragment 0:0
  
  [Error Id: 85883537-9b4f-4057-9c90-cdaedec116a8 on ip-10-0-3-241.ec2.internal:31010] (state=,code=0)
  </code></pre>
  
  <p>I am not able to understand the root cause of this issue.</p>