Skip to content

Commit

Permalink
Add instructions how to run ingestion script from command line (#4083)
Browse files Browse the repository at this point in the history
* added instructions how to run ingestion script from command line

* added instructions how to run ingestion script from command line continued

* fixed typo

* Add bash language to code block

* added "run" reciep to catalog justfile to run python scripts inside container

* edited run reciep to just run bash

* changed instructions how to run a provider script. now using just reciep to run script in the docker stack

* added newline to end of file

* Apply spelling correction.

---------

Co-authored-by: kuephi <philipp.kuebler@aoe.com>
Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>
Co-authored-by: Madison Swain-Bowden <bowdenm@spu.edu>
  • Loading branch information
4 people authored Apr 19, 2024
1 parent b45b5ef commit 90584a9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions catalog/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,7 @@ generate-docs doc="dag" fail_on_diff="false":
# Generate files for a new provider
add-provider provider_name endpoint +media_types="image":
python3 templates/create_provider_ingester.py "{{ provider_name }}" "{{ endpoint }}" -m {{ media_types }}

# Run bash in the container set in the SERVICE env-var
run:
just ../run {{ SERVICE }} bash
13 changes: 13 additions & 0 deletions documentation/catalog/guides/adding_a_new_provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,19 @@ in the
as well as a corresponding test file. Complete the TODOs detailed in the
generated files to implement behavior specific to your API.

You can run the provider script directly from the command line via a just
recipe. This will open a bash shell inside the docker stack of the catalog.

```
just catalog/run
```

Now you can just run the script like so:

```
python catalog/dags/providers/provider_api_scripts/<script_you_want_to_run>.py
```

Some APIs may not fit perfectly into the established `ProviderDataIngester`
pattern. For advanced use cases and examples of how to modify the ingestion
flow, see the
Expand Down

0 comments on commit 90584a9

Please sign in to comment.