You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2022/05/02 13:16:01 UTC
[GitHub] [drill] jnturton commented on pull request #2526: DRILL-8204: Allow Provided Schema for HTTP Plugin in JSON Mode
jnturton commented on PR #2526:
URL: https://github.com/apache/drill/pull/2526#issuecomment-1114855231
This comment is similar to the last one from @vvysotskyi except that I was experimenting with the metastore. While I cannot see that `CREATE SCHEMA` could work for the http storage plugin, I think it is still possible in theory to store a schema in the metastore something like the following.
```
ANALYZE TABLE table(http.tpch_test_svc.`/nation.json` (type=>'json',
schema=>'inline=(
`n_nationkey` INT not null,
`n_name` VARCHAR not null,
`n_regionkey` DOUBLE not null,
`n_comment` VARCHAR not null)'
)) REFRESH METADATA;
```
Note that the above command works for local CSV but I got a Calcite error for a local JSON file. I did not test it with the HTTP plugin.
Some information about provided schema priority, should it be of interest: https://drill.apache.org/docs/using-drill-metastore/#schema-priority.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org