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

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.

主站蜘蛛池模板: 巩留县| 柘荣县| 渝北区| 额济纳旗| 威信县| 蒙山县| 新化县| 丰镇市| 庆城县| 仁寿县| 岢岚县| 肇庆市| 托克逊县| 拉孜县| 普宁市| 林芝县| 郓城县| 弥勒县| 葵青区| 扎兰屯市| 越西县| 炉霍县| 南开区| 朝阳县| 浦江县| 平阴县| 安仁县| 睢宁县| 昌吉市| 琼结县| 泸定县| 贵溪市| 东乡| 涡阳县| 奈曼旗| 连山| 扎鲁特旗| 安丘市| 肥乡县| 镇平县| 松江区|