How to query to check list of tables in database


#1

i want get list of tables in database
so how to query to get list of tables from database in python using pymapd


Table in database
#2

You can use Connection.get_tables() to pull the list of tables from the database.

https://pymapd.readthedocs.io/en/latest/usage.html#database-metadata


#3
from pymapd import connect


query = con.get_tables()
res = c.execute(query)
print(res.fetchall())


is this code is correct but i am not getting response

TypeError: expected bytes, list found

#4

The query object contains the actual list of tables, you don’t need to pass it as a query.