Skip to content

Commit

Permalink
[DOCS] Port over "How to instantiate a DataContext on an EMR Spark Cl…
Browse files Browse the repository at this point in the history
…uster" from RTD to Docusaurus (#3024)
  • Loading branch information
cdkini committed Jul 13, 2021
1 parent 51cb473 commit ebd84f5
Showing 1 changed file with 42 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
---
title: How to instantiate a Data Context on an EMR Spark cluster
---
import Prerequisites from '../guides/connecting_to_your_data/components/prerequisites.jsx'

This guide will help you instantiate a Data Context on an EMR Spark cluster.


The guide demonstrates the recommended path for instantiating a Data Context without a full configuration directory and without using the Great Expectations [command line interface (CLI)](../guides/miscellaneous/how-to-use-the-great-expectations-cli.md).


<Prerequisites>

- [Followed the Getting Started tutorial and have a basic familiarity with the Great Expectations configuration](../tutorials/getting-started/intro.md).

</Prerequisites>

Steps
-----

1. **Install Great Expectations on your EMR Spark cluster.**

Copy this code snippet into a cell in your EMR Spark notebook and run it:

```python
sc.install_pypi_package("great_expectations")
```


2. **Configure a Data Context in code.**

Follow the steps for creating an in-code Data Context in [How to instantiate a Data Context without a yml file](../guides/setup/configuring-data-contexts/how-to-instantiate-a-data-context-without-a-yml-file.md).

The snippet at the end of the guide shows Python code that instantiates and configures a Data Context in code for an EMR Spark cluster. Copy this snippet into a cell in your EMR Spark notebook or use the other examples to customize your configuration.


3. **Test your configuration.**

Execute the cell with the snippet above.

Then copy this code snippet into a cell in your EMR Spark notebook, run it and verify that no error is displayed:

```python
context.list_datasources()
```

This article is a stub.

0 comments on commit ebd84f5

Please sign in to comment.