Receiving "TEIID30171 Unexpected multi-valued result was returned for XMLTable column" when previewing an XML Source file
Issue
- I imported an XML File as Source in Teiid Designer and when I try to preview the resulting View table I get the below error:
"TEIID30171 Unexpected multi-valued result was returned for XMLTable column "tns:StoreId". Path expressions for non-XML type columns should return at most a single result."
Environment
- Red Hat JBoss Data Virtualization (DV) 6.0
- Red Hat JBoss Developer Studio (JBDS) 7.1.1
- Teiid Designer for JBDS 8.3.3
- Teiid Designer View Table transformation from the XML Source
SELECT
A."tns:StoreId" AS "tns:StoreId", A."tns:phonenumber" AS "tns:phonenumber", A."tns:Address1" AS "tns:Address1", A."tns:City" AS "tns:City", A."tns:State" AS "tns:State", A."tns:Zip" AS "tns:Zip", A."tns:Country" AS "tns:Country", A."geo:lat" AS "geo:lat", A."geo:long" AS "geo:long"
FROM
(EXEC StoreSourceModel.getTextFiles('unitstore.xml')) AS f, XMLTABLE(XMLNAMESPACES('http://api.maps.com/Maps/V1/AnnotatedMaps.xsd' AS ymaps, 'http://www.w3.org/2003/01/geo/wgs84_pos#' AS geo, 'http://schemas.hp.com/imaging/retail/locator' AS tns) , '/' PASSING XMLPARSE(DOCUMENT f.file) COLUMNS "tns:StoreId" string PATH 'rss/channel/item/tns:StoreId/text()', "tns:phonenumber" string PATH 'rss/channel/item/tns:phonenumber/text()', "tns:Address1" string PATH 'rss/channel/item/tns:Address1/text()', "tns:City" string PATH 'rss/channel/item/tns:City/text()', "tns:State" string PATH 'rss/channel/item/tns:State/text()', "tns:Zip" string PATH 'rss/channel/item/tns:Zip/text()', "tns:Country" string PATH 'rss/channel/item/tns:Country/text()', "geo:lat" string PATH 'rss/channel/item/geo:lat/text()', "geo:long" string PATH 'rss/channel/item/geo:long/text()') AS A
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
