pyspark.sql.Catalog.listColumns¶
-
Catalog.
listColumns
(tableName: str, dbName: Optional[str] = None) → List[pyspark.sql.catalog.Column]¶ Returns a list of columns for the given table/view in the specified database.
If no database is specified, the current database is used.
- Parameters
- tableNamestr
name of the table to check existence
- dbNamestr, optional
name of the database to check table existence in.
Allowed
tableName
to be qualified with catalog name whendbName
is None.
Notes
the order of arguments here is different from that of its JVM counterpart because Python does not support method overloading.