From 6aa73020ad5ac88b7a554ea57fe792ab30c5a744 Mon Sep 17 00:00:00 2001 From: Maxime Armstrong Date: Tue, 30 Jul 2024 14:18:37 -0400 Subject: [PATCH] Update connecting-to-external-services.mdx --- docs/content/tutorial/connecting-to-external-services.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/tutorial/connecting-to-external-services.mdx b/docs/content/tutorial/connecting-to-external-services.mdx index 08fd65a08a9e1..919be90409342 100644 --- a/docs/content/tutorial/connecting-to-external-services.mdx +++ b/docs/content/tutorial/connecting-to-external-services.mdx @@ -37,14 +37,14 @@ You should use resources to manage communicating with external services because Suppose your Hacker News pipeline in Dagster has picked up momentum, and your stakeholders want to learn more about who is using it. You are tasked with analyzing how many people sign up for Hacker News. -In the scaffolded Dagster project you made in Part 2 of the tutorial, you may have noticed a directory called `resources` with an `__init__.py` file in it. It exposes a resource called `DataGeneratorResource`. This resource generates simulated data about Hacker News signups. You'll use this resource to get the data needed to produce an asset for analysis. +In the scaffolded Dagster project you made in Part 2 of the tutorial, you may have noticed a file called `resources.py`. It exposes a resource called `DataGeneratorResource`. This resource generates simulated data about Hacker News signups. You'll use this resource to get the data needed to produce an asset for analysis. The signup data from Hacker News is fake and generated by the library. This is simulated data and should not be used for real use cases. -In your `__init__.py`, import the class, create an instance of it, and add it to the `resources` argument for your code location's object under the key `hackernews_api`. The key used to define a resource in the object is the key you'll use to reference the resource later in your code. In this case, we’ll call it `hackernews_api`. +In your `definitions.py`, import the class, create an instance of it, and add it to the `resources` argument for your code location's object under the key `hackernews_api`. The key used to define a resource in the object is the key you'll use to reference the resource later in your code. In this case, we’ll call it `hackernews_api`. Verify that your code looks similar to the code below: @@ -163,7 +163,7 @@ HACKERNEWS_NUM_DAYS_WINDOW=30 Rename this file from `.env.example` to `.env`. -Afterward, you'll use Dagster's `EnvVar` class to access the environment variable. Update your `__init__.py` with the changes below: +Afterward, you'll use Dagster's `EnvVar` class to access the environment variable. Update your `definitions.py` with the changes below: ```python file=/tutorial/connecting/connecting_with_envvar.py startafter=start_add_config_to_resource endbefore=end_add_config_to_resource from dagster import (