Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

python driver not able to query a view ??

0 Kudos

hello i´m using the python driver to query my hana db.

from hdbcli import dbapi

...

dbapi.connect(address='xxx', port=30015, user='SYSTEM', password='xxx#')

this query

Query="SELECT * FROM MYDB.OATC"

returns rows

but querying a view

Query="SELECT top 1000 * from MYDB.ItemStockByWarehouse WHERE WhsCode =1"

returns this error

hdbcli.dbapi.ProgrammingError: (259, 'invalid table name: Could not find table/view ITEMSTOCKBYWAREHOUSE in schema MYDB

is there any issues with views and python driver???

1 REPLY 1

AndreasForster
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi antonio.a.ramos , This could be due to the view name containing lower case letters. (ItemStockByWarehouse) Putting quotes around the table name could fix this. Or it might be easiest, if you could create the view using only upper case.