官术网_书友最值得收藏!

Managing temporary views with the catalog API

Since Apache Spark 2.0, the catalog API is used to create and remove temporary views from an internal meta store. This is necessary if you want to use SQL, because it basically provides the mapping between a virtual table name and a DataFrame or Dataset.

Internally, Apache Spark uses the org.apache.spark.sql.catalyst.catalog.SessionCatalog class to manage temporary views as well as persistent tables.

Temporary views are stored in the SparkSession object, as persistent tables are stored in an external metastore. The abstract base class org.apache.spark.sql.catalyst.catalog.ExternalCatalog is extended for various meta store providers. One already exists for using Apache Derby and another one for the Apache Hive metastore, but anyone could extend this class and make Apache Spark use another metastore as well.

主站蜘蛛池模板: 襄汾县| 廊坊市| 香河县| 平陆县| 厦门市| 湟源县| 牡丹江市| 海南省| 松滋市| 郁南县| 玉龙| 石家庄市| 黎川县| 康保县| 遂昌县| 贞丰县| 宽甸| 高安市| 桃园市| 页游| 满洲里市| 和政县| 江陵县| 黄山市| 岚皋县| 禹城市| 镇原县| 十堰市| 夏河县| 娄烦县| 通化市| 武威市| 金门县| 阳西县| 伊吾县| 罗城| 嘉荫县| 洞头县| 竹北市| 呼和浩特市| 于田县|