pyspark.sql.Catalog.createExternalTable¶
- 
Catalog.createExternalTable(tableName: str, path: Optional[str] = None, source: Optional[str] = None, schema: Optional[pyspark.sql.types.StructType] = None, **options: str) → pyspark.sql.dataframe.DataFrame[source]¶
- Creates a table based on the dataset in a data source. - It returns the DataFrame associated with the external table. - The data source is specified by the - sourceand a set of- options. If- sourceis not specified, the default data source configured by- spark.sql.sources.defaultwill be used.- Optionally, a schema can be provided as the schema of the returned - DataFrameand created external table.- New in version 2.0.0. - Returns