1

When attempting to read a table from DB2 into a Pandas dataframe in DSX:

df = IdaDataFrame(idadb_dashdb, 'SCHEMA_NAME.TABLE_NAME').as_dataframe()

...I get the following error:

ProgrammingError: ('42S22', '[42S22] [IBM][CLI Driver][DB2/LINUXX8664] SQL0206N "XXXID" is not valid in the context where it is used. SQLSTATE=42703\n')

By not converting the dataframe to Pandas

df = IdaDataFrame(idadb_dashdb, 'SCHEMA_NAME.TABLE_NAME')

and listing the column names (df.columns), I see the columns of a similarly named table, under a different schema, in addition to the columns I want.

Calling

df.head() 

results in the following error:

ValueError: Length mismatch: Expected axis has 4 elements, new values have 8 elements

Pål
  • 65
  • 6
  • ...lemme guess, you're trying to tag to the iSeries? What are table/schema name lengths? Is there an `ALIAS` in effect? Can you just specify the columns you want? – Clockwork-Muse Nov 03 '17 at 16:22
  • Bug report submitted on the same issue on github: https://github.com/ibmdbanalytics/ibmdbpy/issues/24 – Pål Nov 07 '17 at 08:21

0 Answers0