Can you provide a full/representative copy of the original and the sql you are using to process it?
Here is the SQL:
A.value1 AS value1, A.value2 AS value2, A.value3 AS value3
(EXEC tempXMLSource.getTextFiles('temp.xml')) AS f, XMLTABLE(XMLNAMESPACES('http://schemas.microsoft.com/ado/2007/08/dataservices' AS d, 'http://schemas.microsoft.com/ado/2007/08/dataservices/metadata' AS m), '/feed/content/m:properties' PASSING XMLPARSE(DOCUMENT f.file) COLUMNS value1 string PATH 'd:value1', value2 string PATH 'd:value2', value3 string PATH 'd:value3') AS A
below is the full XML from temp.xml
<?xml version="1.0" encoding="utf-8"?>
I am sorry. First part of the problem is resolved. It was a typo.
But the next part is not resolved which is
we had to remove one xmlns tag in the actual file which causes no data to be imported, the root in real file looks like:
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
Teiid reports it as invalid XML, but this could be valid problem with the file.
> Teiid reports it as invalid XML, but this could be valid problem with the file.
Do you have an exception for that? I don't see an issue when I try to parse a document based upon the above.
If you just aren't getting data back, then the issue is that the default namespace is not defined:
XMLNAMESPACES(DEFAULT 'http://www.w3.org/2005/Atom', 'http://schemas.microsoft.com/ado/2007/08/dataservices' AS d, 'http://schemas.microsoft.com/ado/2007/08/dataservices/metadata' AS m)
Thanks Steven!! The problem has been solved after including DEFAULT namespace in the query.
I think something was changed in the file while attempting workarounds. After refreshing the file from the actual source the only problem was Teiid was not providing any data but there was no error.
Anyway, after including DEFAULT, it seems to be working now.