Loading...

verticapy.does_table_exist#

verticapy.does_table_exist(table_name: str, schema: str) bool#

Checks if the specified table exists.

Parameters#

table_name: str

The table name.

schema: str

Schema name.

Returns#

bool

False if the table doesn’t exist, or it exists but the user has no USAGE privilege on it. True otherwise.

Examples#

Checks if a table exist:

from verticapy.sql import does_table_exist

does_table_exist(
    table_name = "fake_name",
    schema = "fake_schema",
)

Out[2]: False

Note

Checks if the table exists, but it will not raise any errors; instead, it returns a boolean value, True or False.