SparkSession.builder.appName (名字)
|
设置应用程序的名称,将显示在web UI火花。 |
SparkSession.builder.config ([键、值、])
|
设置一个配置选项。 |
SparkSession.builder.enableHiveSupport ()
|
使蜂巢支持,包括连接到一个持久蜂巢metastore,支持蜂巢并行转换器和蜂窝用户自定义函数。 |
SparkSession.builder.getOrCreate ()
|
就现有的SparkSession 或者,如果没有现有的,创造了一个新的基于选项集生成器。 |
SparkSession.builder.master (主)
|
设置火花主人要连接的URL,比如“本地”在本地运行,“当地[4]“本地运行4核,或“火花:/ /主:7077”火花独立集群上运行。 |
SparkSession.catalog
|
界面,通过它,用户可以创建、删除、更改或查询底层数据库、表、函数等。 |
SparkSession.conf
|
为引发运行时配置界面。 |
SparkSession.createDataFrame (数据、模式…)
|
创建一个DataFrame 从一个抽样 一个列表,pandas.DataFrame 或者一个numpy.ndarray 。 |
SparkSession.getActiveSession ()
|
返回活动SparkSession 当前线程返回的建设者 |
SparkSession.newSession ()
|
返回一个新的SparkSession 新会话,有单独的SQLConf注册临时视图和udf,但共享SparkContext 和表缓存。 |
SparkSession.range (开始、结束步骤,…))
|
创建一个DataFrame 与单pyspark.sql.types.LongType 列命名id ,包含元素的范围从开始 来结束 (独家)值一步 。 |
SparkSession.read
|
返回一个DataFrameReader 可以用来作为一个读取数据DataFrame 。 |
SparkSession.readStream
|
返回一个DataStreamReader 可以用于读取数据流流DataFrame 。 |
SparkSession.sparkContext
|
返回底层SparkContext 。 |
SparkSession.sql (args sqlQuery * * kwargs)
|
返回一个DataFrame 代表给定查询的结果。 |
SparkSession.stop ()
|
阻止潜在的SparkContext 。 |
SparkSession.streams
|
返回一个StreamingQueryManager 让所有的管理StreamingQuery 实例的活跃这上下文。 |
SparkSession.table (表)
|
返回指定表的DataFrame 。 |
SparkSession.udf
|
返回一个UDFRegistration UDF登记。 |
SparkSession.version
|
火花的版本运行该应用程序。 |