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

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.

主站蜘蛛池模板: 会理县| 寻乌县| 博野县| 稻城县| 汝州市| 白水县| 延寿县| 德阳市| 鹿泉市| 永和县| 塔河县| 登封市| 卓尼县| 北辰区| 密山市| 苍山县| 永年县| 墨脱县| 英德市| 北安市| 乳山市| 铜川市| 天柱县| 兴城市| 天门市| 梅河口市| 齐齐哈尔市| 龙海市| 满城县| 阿拉善左旗| 永济市| 青海省| 阿拉善左旗| 三原县| 沛县| 越西县| 喀喇| 平阳县| 桑植县| 遂平县| 当雄县|