Closed mzeidhassan closed 3 years ago
Try putting the column name in back-tick quotes (not single or double quotes). I believe a colon is a reserved character in the SQL parser
Thank you so much @srowen This one seems to be working fine now.
df.filter('`_xml:lang` RLIKE "EN"').select('seg').collect()
I appreciate your help.
Hi Spark-xml team,
First, thanks for creating this.
I am working on an xml file, and here is the current schema:
and this is what I get when I df.show the dataframe: +---------+--------------------+ |_xml:lang| seg| +---------+--------------------+ | EN-US|This is a standar...| | AR-EG|هذا أحد مكونات بر...| | EN-US|The installer wil...| | AR-EG|سيتم إنهاء المثبت...
When I run this code though:
"df.filter('_xml:lang RLIKE "EN*"').select('seg').collect()"
I get this error:
Any idea how to resolve this issue? Thanks