cgivre commented on issue #1539: DRILL-6847: Add Query Metadata to RESTful 
Interface
URL: https://github.com/apache/drill/pull/1539#issuecomment-440354143
 
 
   @arina-ielchiieva 
   Ok, metadata is refomatted.
   
   The query:
   
   ```
   SELECT CAST( employee_id AS INT) AS employee_id, 
   CAST( employee_id AS DECIMAL(8,4)) AS employee_id1, 
   CAST(full_name AS VARCHAR(10)) AS full_name,
   first_name, 
   last_name, 
   CAST( position_id AS BIGINT) AS position_id, 
   position_title 
   FROM cp.`employee.json` 
   LIMIT 2
   ```
   
   Results in the following metadata:
   ```
   {
     "queryId": "240bc0a2-cb41-320d-17cf-072c912c83a8",
     "columns": [
       "employee_id",
       "employee_id1",
       "full_name",
       "first_name",
       "last_name",
       "position_id",
       "position_title"
     ],
     "rows": [
       {
         "full_name": "Sheri Nowm",
         "employee_id1": "1.0000",
         "employee_id": "1",
         "last_name": "Nowmer",
         "position_title": "President",
         "first_name": "Sheri",
         "position_id": "1"
       },
       {
         "full_name": "Derrick Wh",
         "employee_id1": "2.0000",
         "employee_id": "2",
         "last_name": "Whelply",
         "position_title": "VP Country Manager",
         "first_name": "Derrick",
         "position_id": "2"
       }
     ],
     "metadata": [
       "INT",
       "VARDECIMAL(8, 4)",
       "VARCHAR(10)",
       "VARCHAR",
       "VARCHAR",
       "BIGINT",
       "VARCHAR"
     ]
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to