ibmdbanalytics/ibmdbpy

ibmdbpy does not support dashDB table-names containing `space`

Maiti0112358 opened this issue · 1 comments

Background

When an user tries to access a table in dashDB instance that contains spaces, using the following code:

from ibmdbpy import IdaDataBase, IdaDataFrame

idadb_1 = IdaDataBase(dsn='DASHDB;Database=BLUDB;Hostname=<hostname>;Port=50000;PROTOCOL=TCPIP;UID=<UID>;PWD=<PASSWORD>')
ida_df_1 = IdaDataFrame(idadb_1, 'schema.target table')
ida_df_1.head()

The user encounters the following error:
Table name is not valid, only alphanumeric characters and underscores are allowed.
(https://github.com/ibmdbanalytics/ibmdbpy/blob/c2bd1480536c25ad211658cf33d7c2294a4610dc/ibmdbpy/utils.py)
The common expectation of the user would be, if dashDB supports a table name, it should also be supported by ibmdbpy.

mineo commented

For reference, the Db2 documentation for valid identifiers is at https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.sql.ref.doc/doc/r0000720.html. This explicitly lists "delimited identifiers" that include spaces as valid.