inspect_table

sqlcompyre.inspect_table(engine: Engine, table: Table | str) QueryInspection[source]

Inspect a table in the database.

Args:

engine: The engine to use to access the database. table: The database table to inspect. When specified as string, the table can optionally

be specified with schema (and database) name. For MSSQL, the table name can be specified as [[<database>.]<schema>.]<table> depending on the “default” database of the provided engine and the database’s default schema.

Returns:

A query inspection object that can be used to easily gain insights into the table.

See also:

inspect() if you want to inspect only a subset of a table or have a sqlalchemy.Table object. This method should preferably only be used when specifying the table name as a string.