[jira] [Updated] (DRILL-8481) Ability to query XML root attributes
[ https://issues.apache.org/jira/browse/DRILL-8481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Charles Givre updated DRILL-8481: - Fix Version/s: 1.21.2 > Ability to query XML root attributes > > > Key: DRILL-8481 > URL: https://issues.apache.org/jira/browse/DRILL-8481 > Project: Apache Drill > Issue Type: Improvement > Components: Storage - XML >Affects Versions: 1.21.1 >Reporter: benj >Assignee: Charles Givre >Priority: Major > Fix For: 1.21.2 > > > Hi, > It is possible to retrieve the field attributes except those of the root > It would be interesting to be able to retrieve the attributes found in the > root node of XML files. > In my common use cases, I have many XML files each containing a single XML > frame with often one or more attributes in the root tag. > To recover this value, I am currently forced to preprocess the files to > "copy" this attribute into the fields of the XML record. > Even with multiple xml records under the root, it would be useful to consider > that the root attributes are accessible for each record > Example (fichier aaa.xml): > {noformat} > > > blue > > {noformat} > With request : > {code:sql} > SELECT * FROM(SELECT filename, * FROM TABLE(dfs.test.`/aaa.xml`(type=>'xml', > dataLevel=>1)) as xml) AS x; > {code} > I can access to : > * P1_SubVersion > * P1_MID > * P1_PN > * P1_SL > * P2_SubVersion > * P2.Color > But I can' access to : > * PPP_Version > * PPP_TimeStamp > and changing the DataLevel does not solve the problem > Regards, -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (DRILL-8481) Ability to query XML root attributes
[ https://issues.apache.org/jira/browse/DRILL-8481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17821723#comment-17821723 ] Charles Givre commented on DRILL-8481: -- [~benj641] I just submitted a bug fix. [https://github.com/apache/drill/pull/2884] If you can review and test it, I'd appreciate it. > Ability to query XML root attributes > > > Key: DRILL-8481 > URL: https://issues.apache.org/jira/browse/DRILL-8481 > Project: Apache Drill > Issue Type: Improvement > Components: Storage - XML >Affects Versions: 1.21.1 >Reporter: benj >Assignee: Charles Givre >Priority: Major > > Hi, > It is possible to retrieve the field attributes except those of the root > It would be interesting to be able to retrieve the attributes found in the > root node of XML files. > In my common use cases, I have many XML files each containing a single XML > frame with often one or more attributes in the root tag. > To recover this value, I am currently forced to preprocess the files to > "copy" this attribute into the fields of the XML record. > Even with multiple xml records under the root, it would be useful to consider > that the root attributes are accessible for each record > Example (fichier aaa.xml): > {noformat} > > > blue > > {noformat} > With request : > {code:sql} > SELECT * FROM(SELECT filename, * FROM TABLE(dfs.test.`/aaa.xml`(type=>'xml', > dataLevel=>1)) as xml) AS x; > {code} > I can access to : > * P1_SubVersion > * P1_MID > * P1_PN > * P1_SL > * P2_SubVersion > * P2.Color > But I can' access to : > * PPP_Version > * PPP_TimeStamp > and changing the DataLevel does not solve the problem > Regards, -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Assigned] (DRILL-8481) Ability to query XML root attributes
[ https://issues.apache.org/jira/browse/DRILL-8481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Charles Givre reassigned DRILL-8481: Assignee: Charles Givre > Ability to query XML root attributes > > > Key: DRILL-8481 > URL: https://issues.apache.org/jira/browse/DRILL-8481 > Project: Apache Drill > Issue Type: Improvement > Components: Storage - XML >Affects Versions: 1.21.1 >Reporter: benj >Assignee: Charles Givre >Priority: Major > > Hi, > It is possible to retrieve the field attributes except those of the root > It would be interesting to be able to retrieve the attributes found in the > root node of XML files. > In my common use cases, I have many XML files each containing a single XML > frame with often one or more attributes in the root tag. > To recover this value, I am currently forced to preprocess the files to > "copy" this attribute into the fields of the XML record. > Even with multiple xml records under the root, it would be useful to consider > that the root attributes are accessible for each record > Example (fichier aaa.xml): > {noformat} > > > blue > > {noformat} > With request : > {code:sql} > SELECT * FROM(SELECT filename, * FROM TABLE(dfs.test.`/aaa.xml`(type=>'xml', > dataLevel=>1)) as xml) AS x; > {code} > I can access to : > * P1_SubVersion > * P1_MID > * P1_PN > * P1_SL > * P2_SubVersion > * P2.Color > But I can' access to : > * PPP_Version > * PPP_TimeStamp > and changing the DataLevel does not solve the problem > Regards, -- This message was sent by Atlassian Jira (v8.20.10#820010)