title: How to Save Great Expectations results to File From Apache Spark - With Data Docs
body: <p>I have successfully created a Great_Expectation result and I would like to output the results of the expectation to an html file.</p>
  <p>There are few links highlighting how show the results in human readable from using what is called 'Data Docs' <a href="https://docs.greatexpectations.io/en/latest/guides/tutorials/getting_started/set_up_data_docs.html#tutorials-getting-started-set-up-data-docs" rel="nofollow noreferrer">https://docs.greatexpectations.io/en/latest/guides/tutorials/getting_started/set_up_data_docs.html#tutorials-getting-started-set-up-data-docs</a></p>
  <p>But to be quite honest, the documentation is extremely hard to follow.</p>
  <p>My expectation simply verifies the number of passengers from my dataset fall within 1 and 6. I would like help outputting the results to a folder using 'Data Docs' or however it is possible to output the data to a folder:</p>
  <pre><code>import great_expectations as ge
  import great_expectations.dataset.sparkdf_dataset
  from great_expectations.dataset.sparkdf_dataset import SparkDFDataset
  from pyspark.sql.types import StructType, StructField, IntegerType, StringType, BooleanType
  from great_expectations.data_asset import DataAsset
  
  from great_expectations.data_context.types.base import DataContextConfig, DatasourceConfig, FilesystemStoreBackendDefaults
  from great_expectations.data_context import BaseDataContext
  from great_expectations.data_context.types.resource_identifiers import ValidationResultIdentifier
  from datetime import datetime
  from great_expectations.data_context import BaseDataContext
  
  
  df_taxi = spark.read.csv('abfss://root@adlspretbiukadlsdev.dfs.core.windows.net/RAW/LANDING/yellow_trip_data_sample_2019-01.csv', inferSchema=True, header=True)
  
  taxi_rides = SparkDFDataset(df_taxi)
  
  taxi_rides.expect_column_value_lengths_to_be_between(column='passenger_count', min_value=1, max_value=6)
  
  taxi_rides.save_expectation_suite()
  </code></pre>
  <p>The code is run from Apache Spark.</p>
  <p>If someone could just point me in the right direction, I will able to figure it out.</p>