Query to a MongoDB array gives "TEIID30384 Error while evaluating function array_get"

Solution Verified - Updated -

Issue

  • Manually modeled a MongoDB source and querying using ARRAYTABLE function to retrieve from an array list and get:
WARN  \[org.teiid.PROCESSOR\] (Worker86_QueryProcessorQueue113612) TEIID30020 Processing exception for request vfjR8qG6wgW+.10 'TEIID30328 Unable to evaluate convert(array_get(a.formlist, 1), string): TEIID30384 Error while evaluating function array_get'. Originally ExpressionEvaluationException 'TEIID30416 Expected a java.sql.Array, or java array type, but got: class com.mongodb.BasicDBList' FunctionMethods.java:1476.: org.teiid.api.exception.query.ExpressionEvaluationException: TEIID30328 Unable to evaluate convert(array_get(a.formlist, 1), string): TEIID30384 Error while evaluating function array_get

Environment

  • Red Hat JBoss Data Virtualization (DV) 6.2.5
  • MongoDB metadata:
CREATE FOREIGN TABLE subjects (
    _id string(24) OPTIONS(NAMEINSOURCE '_id'),
    studyoid string(16793600) OPTIONS(NAMEINSOURCE 'studyoid'),
    metadataversionoid string(16793600) OPTIONS(NAMEINSOURCE 'metadataversionoid'),
    subjectkey string(16793600) OPTIONS(NAMEINSOURCE 'subjectkey'),
    formlist object OPTIONS(NAMEINSOURCE 'formlist'),
    CONSTRAINT NewPrimaryKey PRIMARY KEY(_id)
) OPTIONS(NAMEINSOURCE 'subjects')

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.