KeyNotFoundException when verifying custom query on Impala Data Connector

KeyNotFoundException when verifying custom query on Impala Data Connector

book

Article ID: KB0083547

calendar_today

Updated On:

Products Versions
Spotfire Connectors 7.8, 7.9

Description

When creating custom queries, you may want to add additional columns as the result of any other expression or function. If these queries result in an additional string column not part of the original data table, you may get the following error when trying to validate it:
 
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Spotfire.Dxp.Data.Adapters.Impala.ImpalaAdapterConnection.<ToMetadata>d__49.MoveNext()
at Spotfire.Dxp.Data.Adapters.Impala.ImpalaAdapterConnection.MapColumnsFromCustomQueryToDxp(OdbcConnection connection, MutableDataTableSchema table, DataTable schemaTable)

And an example of adding a string column X not already in the existing table:
 
SELECT
Existing1,
Existing2,
'x' as X
FROM ExistingTable

 

Issue/Introduction

When creating a custom query towards Impala using data connectors, adding a custom string column results in the error "System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary" when pressing the verify button.

Resolution

This issue was resolved in a hotfix releases for both affected versions.

Hotfix HF-001 for TIBCO Spotfire 7.9.x
Hotfix HF-006 for TIBCO Spotfire 7.8.x