apache-spark - 如何将 Great Expectations DataFrame 转换为 Apache Spark DataFrame

标签 apache-spark pyspark great-expectations

以下代码会将 Apache Spark DataFrame 转换为 Great_Expectations DataFrame。如果我想将 Spark DataFrame spkDF 转换为 Great_Expectations DataFrame,我将执行以下操作:

ge_df = SparkDFDataset(spkDF)

有人可以告诉我如何将 Great_Expectation 数据帧转换为 Spark DataFrame。

那么我需要做什么才能将新的 Great_Expectations 数据帧 ge_df 转换回 Spark DataFrame?

最佳答案

根据official documentation ,类 SparkDFDataset 保存原始 pyspark 数据帧:

This class holds an attribute spark_df which is a spark.sql.DataFrame.

所以你应该能够通过以下方式访问它:

ge_df.spark_df

关于apache-spark - 如何将 Great Expectations DataFrame 转换为 Apache Spark DataFrame,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69929048/

相关文章:

python - 如何将数据框转换为 great_expectations 数据集?

python - 使用 Bigquery 测试 yaml 的远大期望

scala - 在 IntelliJ Scala 控制台中运行时如何设置 Spark MemoryStore 大小?

hadoop - Apache Spark DataFrame 是否为每次处理从数据库加载数据,或者除非另有说明,否则它是否使用相同的数据?

apache-spark - apache-spark部署:独立于多个VM

multithreading - 使用 spark-submit,--total-executor-cores 选项的行为是什么?

scala - 如何在 Apache ignite 中缓存 Dataframe

python - 将pyspark数据帧转换为python字典列表

python - 将带有 Numpy 值的 pandas Dataframe 转换为 pysparkSQL.DataFrame