table_exists (function)

fundamentals.mysql.table_exists(dbConn, log, dbTableName)[source][source]

Probe a database to determine if a given table exists

Key Arguments

  • dbConn – mysql database connection

  • log – logger

  • dbTableName – the database tablename

Return

  • tableExists – True or False

Usage

To test if a table exists in a database:

```python from fundamentals.mysql import table_exists exists = table_exists(

dbConn=dbConn, log=log, dbTableName=”stupid_named_table”

)

print exists

# OUTPUT: False ```