[ https://issues.apache.org/jira/browse/DRILL-6575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Arina Ielchiieva updated DRILL-6575: ------------------------------------ Description: *Use case* Hive external table ddl: {noformat} create external table my(key int, val string) row format delimited fields terminated by ',' stored as textfile location '/data/my_tbl'; {noformat} Path {{/data/my_tb}} contains sub directory and file in it: {{/data/my_tbl/sub_dir/data.txt}} with the following data: {noformat} 1, value_1 2, value_2 {noformat} When querying such table from Hive, user gets the following exception: {noformat} Failed with exception java.io.IOException:java.io.IOException: Not a file: file:///data/my_tbl/sub_dir {noformat} To be able to query this table user needs to set two properties to true: {{hive.mapred.supports.subdirectories}} and {{mapred.input.dir.recursive}}. They can be set at system level in hive-site.xml or at session in Hive console: {noformat} set hive.mapred.supports.subdirectories=true; set mapred.input.dir.recursive=true; {noformat} Currently to be able to query such table from Drill, user can specify this properties in Hive plugin only: {noformat} { "type": "hive", "configProps": { "hive.metastore.uris": "thrift://localhost:9083", "hive.metastore.sasl.enabled": "false", "hbase.zookeeper.quorum": "localhost", "hbase.zookeeper.property.clientPort": "5181", "hive.mapred.supports.subdirectories": "true", "mapred.input.dir.recursive": "true" } "enabled": true } {noformat} *Jira scope* This Jira aims to add new session option to Drill {{store.hive.conf.properties}} which will allow user to specify hive properties at session level. User should write properties in string delimiter by new line symbol. Properties values should NOT be set in double-quotes or any other quotes otherwise they would be parsed incorrectly. Key and value should be separated by {{=}}. Each `alter session set` will override previously set properties at session level. If during query Drill couldn't unparse property string, warning will be logged. Properties will be parsed by loading into {{java.util.Properties}}. Default value is empty string (""). Example: {noformat} alter session set `store.hive.conf.properties` = 'hive.mapred.supports.subdirectories=true\nmapred.input.dir.recursive=true'; {noformat} was: *Use case* Hive external table ddl: {noformat} create external table my(key int, val string) row format delimited fields terminated by ',' stored as textfile location '/data/my_tbl'; {noformat} Path {{/data/my_tb}} contains sub directory and file in it: {{/data/my_tbl/sub_dir/data.txt}} with the following data: {noformat} 1, value_1 2, value_2 {noformat} When querying such table from Hive, user gets the following exception: {noformat} Failed with exception java.io.IOException:java.io.IOException: Not a file: file:///data/my_tbl/sub_dir {noformat} To be able to query this table user needs to set two properties to true: {{hive.mapred.supports.subdirectories}} and {{mapred.input.dir.recursive}}. They can be set at system level in hive-site.xml or at session in Hive console: {noformat} set hive.mapred.supports.subdirectories=true; set mapred.input.dir.recursive=true; {noformat} Currently to be able to query such table from Drill, user can specify this properties in Hive plugin only: {noformat} { "type": "hive", "configProps": { "hive.metastore.uris": "thrift://localhost:9083", "hive.metastore.sasl.enabled": "false", "hbase.zookeeper.quorum": "localhost", "hbase.zookeeper.property.clientPort": "5181", "hive.mapred.supports.subdirectories": "true", "mapred.input.dir.recursive": "true" } "enabled": true } {noformat} *Jira scope* This Jira aims to add new session option to Drill {{store.hive.conf.properties}} which will allow user to specify hive properties at session level. User should write properties in string delimiter by new line symbol. Properties values should NOT be set in double-quotes or any other quotes otherwise they would be parsed incorrectly. Key and value should be separated by {{=}}. Each `alter session set` will override previously set properties at session level. If during query Drill couldn't unparse property string, warning will be logged. Properties will be parsed by loading into {{java.util.Properties}}. Default value is empty string (""). Example: {noformat} alter session set `store.hive.conf.properties` = 'hive.mapred.supports.subdirectories=true\nmapred.input.dir.recursive=true'"; {noformat} > Add store.hive.conf.properties option to allow set Hive properties at session > level > ----------------------------------------------------------------------------------- > > Key: DRILL-6575 > URL: https://issues.apache.org/jira/browse/DRILL-6575 > Project: Apache Drill > Issue Type: Improvement > Affects Versions: 1.13.0 > Reporter: Arina Ielchiieva > Assignee: Arina Ielchiieva > Priority: Major > Labels: doc-impacting > Fix For: 1.15.0 > > > *Use case* > Hive external table ddl: > {noformat} > create external table my(key int, val string) > row format delimited > fields terminated by ',' > stored as textfile > location '/data/my_tbl'; > {noformat} > Path {{/data/my_tb}} contains sub directory and file in it: > {{/data/my_tbl/sub_dir/data.txt}} with the following data: > {noformat} > 1, value_1 > 2, value_2 > {noformat} > When querying such table from Hive, user gets the following exception: > {noformat} > Failed with exception java.io.IOException:java.io.IOException: Not a file: > file:///data/my_tbl/sub_dir > {noformat} > To be able to query this table user needs to set two properties to true: > {{hive.mapred.supports.subdirectories}} and {{mapred.input.dir.recursive}}. > They can be set at system level in hive-site.xml or at session in Hive > console: > {noformat} > set hive.mapred.supports.subdirectories=true; > set mapred.input.dir.recursive=true; > {noformat} > Currently to be able to query such table from Drill, user can specify this > properties in Hive plugin only: > {noformat} > { > "type": "hive", > "configProps": { > "hive.metastore.uris": "thrift://localhost:9083", > "hive.metastore.sasl.enabled": "false", > "hbase.zookeeper.quorum": "localhost", > "hbase.zookeeper.property.clientPort": "5181", > "hive.mapred.supports.subdirectories": "true", > "mapred.input.dir.recursive": "true" > } > "enabled": true > } > {noformat} > *Jira scope* > This Jira aims to add new session option to Drill > {{store.hive.conf.properties}} which will allow user to specify hive > properties at session level. > User should write properties in string delimiter by new line symbol. > Properties values should NOT be set in double-quotes or any other quotes > otherwise they would be parsed incorrectly. Key and value should be separated > by {{=}}. Each `alter session set` will override previously set properties at > session level. If during query Drill couldn't unparse property string, > warning will be logged. Properties will be parsed by loading into > {{java.util.Properties}}. Default value is empty string (""). > Example: > {noformat} > alter session set `store.hive.conf.properties` = > 'hive.mapred.supports.subdirectories=true\nmapred.input.dir.recursive=true'; > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)