Share via


Catalog.CreateTable Method

Definition

Overloads

CreateTable(String, String)

Creates a table, in the hive warehouse, from the given path and returns the corresponding DataFrame. The table will contain the contents of the parquet file that is in the path parameter. The default data source type is parquet. This can be changed using CreateTable(tableName, path, source) or setting the configuration option spark.sql.sources.default when creating the spark session using Config("spark.sql.sources.default", "csv") or after you have created the session using Conf().Set("spark.sql.sources.default", "csv").

CreateTable(String, String, String)

Creates a table, in the hive warehouse, from the given path based from a data source and returns the corresponding DataFrame.

The type of file type (csv, parquet, etc.) is specified using the source parameter.

CreateTable(String, String)

Creates a table, in the hive warehouse, from the given path and returns the corresponding DataFrame. The table will contain the contents of the parquet file that is in the path parameter. The default data source type is parquet. This can be changed using CreateTable(tableName, path, source) or setting the configuration option spark.sql.sources.default when creating the spark session using Config("spark.sql.sources.default", "csv") or after you have created the session using Conf().Set("spark.sql.sources.default", "csv").

public Microsoft.Spark.Sql.DataFrame CreateTable (string tableName, string path);
member this.CreateTable : string * string -> Microsoft.Spark.Sql.DataFrame
Public Function CreateTable (tableName As String, path As String) As DataFrame

Parameters

tableName
String

The name of the table to create.

path
String

Path to use to create the table.

Returns

The contents of the files in the path parameter as a DataFrame.

Applies to

CreateTable(String, String, String)

Creates a table, in the hive warehouse, from the given path based from a data source and returns the corresponding DataFrame.

The type of file type (csv, parquet, etc.) is specified using the source parameter.

public Microsoft.Spark.Sql.DataFrame CreateTable (string tableName, string path, string source);
member this.CreateTable : string * string * string -> Microsoft.Spark.Sql.DataFrame
Public Function CreateTable (tableName As String, path As String, source As String) As DataFrame

Parameters

tableName
String

Is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.

path
String

Path to use to create the table.

source
String

Data source to use to create the table such as parquet, csv, etc.

Returns

The results of reading the files in path as a DataFrame.

Applies to