Hi, I am new to dagster and are just getting start...
# announcements
g
Hi, I am new to dagster and are just getting started. When trying to follow along with the https://docs.dagster.io/examples/airline_demo airline tutorial I observe 2 problems: 1)
Copy code
pip install -e .
is not installing the optional dependencies which are needed to run the tutorial. 2) https://github.com/dagster-io/dagster/tree/master/examples/airline_demo/airline_demo does not contain the
repository.yaml
file and thus executing a call to
dagit
fails. How can I get the tutorial to work? (for (1) I guess I have installed the necessary dependencies manually, but so far am stuck on (2).
n
Which repository.yaml do you mean?
g
Well this is the error I get:
Copy code
dagit
on_any_event(self=<dagit.dagit.DagsterAutoRestartTrick object at 0x7fe130193c70>, event=<DirCreatedEvent: event_type=created, src_path='/private/var/folders/cx/tptc40fs3492df12b62dx_kr0000gn/T/tmp720xpex5', is_directory=True>)
on_any_event(self=<dagit.dagit.DagsterAutoRestartTrick object at 0x7fe130193c70>, event=<DirModifiedEvent: event_type=modified, src_path='/private/var/folders/cx/tptc40fs3492df12b62dx_kr0000gn/T', is_directory=True>)
Usage: dagit-cli [OPTIONS]

Error: Expected to use file "repository.yaml" to load repository but it does not exist. Verify your current working directory or CLI arguments.
n
What command are you using to start dagit?
g
dagit
simply as outlined in the tutorial - dagit only.
When adding the file you suggested I get:
dagster.check.CheckError: repository not present in dictionary {'load_from': [{'python_module': 'airline_demo.repository'}]}
I followed the steps suggested in the tutorial https://docs.dagster.io/examples/airline_demo:
Copy code
# Clone Dagster
git clone git@github.com:dagster-io/dagster.git
cd dagster/examples/airline_demo

# Install all dependencies
pip install -e .

# Start a local PostgreSQL database
docker-compose up -d

# Load the airline demo in Dagit
cd airline_demo
dagit
and installed into a clean conda environment
n
Try
dagit -w workspace.yaml
?
(from the same folder that contains the workspace.yaml)
Or the equiv
dagit -m airline_demo.repository
g
fails with:
Error: no such option: -w
n
Erm, did it get renamed when I wasn't looking? 🙂
g
dagit, version 0.6.9
n
Oh, that's very very old
Current is 0.10.something
g
but this is what I get from conda
I just did a fresh install
n
Shows all the normal version, 0.10.8
g
I know - also check this. Strange.
n
Also, this tutorial doesn't use conda
It installs things via pip
g
😉 sure. But I install it into an empty conda env.
n
Sure, but conda isn't installing the packages
Check if your python and/or pip are out of date?
g
I have made the following observations:
Copy code
conda create -y --name dagster-demo python=3.8
conda activate dagster-demo

pip install -e .
is not installing dagit. When using conda instead:
Copy code
channels:
  - conda-forge
  - defaults
dependencies:
  - dagster
  - dagit
  - python>=3.8
  - pip
now I get 0.10.8 But it fails as:
Copy code
ModuleNotFoundError: No module named 'dagster_aws'
is missing. Now when trying to fix it :
Copy code
pip install -e .
it still fails as the optional dependencies (which seem to be required for this tutorial are not installed). When instead using a larger conda
environment.yml
file with contents of:
Copy code
name: dagster-demo
channels:
  - conda-forge
  - defaults
dependencies:
  - dagster
  - dagit
  - python>=3.8
  - pip
  - dagstermill
  - dagster-aws
  - dagster-cron
  - dagster-postgres
  - dagster-pyspark
  - dagster-slack
  - dagster-snowflake
  - descartes
  - geopandas
  - seaborn
  - pandas
  - pyspark
  - sqlalchemy
  - sqlalchemy-redshift
  - sqlalchemy-utils
I get the outdated version:
0.6.9
And as you described before the outdated version is no longer compatible.
Trying to apply locking:
Copy code
- dagster>=0.10.8
- dagit>=0.10.8
fails with:
Copy code
Problem: package dagster-aws-0.6.9-py_0 requires dagster 0.6.9.*, but none of the providers can be installed
which is also strange as that should be up to version:
v0.9.14
https://anaconda.org/conda-forge/dagster-aws
m
I would recommend you to ditch conda. It does too many magic behind the scenes, and it doesn't play nice with other tools. But you could try installing dagster via pip instead of conda. It might pull the latest version from pypi
Or, you can spin up docker containers for it. There's an example in the official docs / github repo (no extra setup at all, aside from docker that is)
💯 1
g
As you see, I have tried this. However,
pip install -e .
fails to install the necessary required (but marked as optional) dependencies. How could I get these installed as well?
m
Could you try in a new environment?
Also version number for dagster and it's modules are in sync.
g
id did so already using:
conda create -y --name dagster-demo python=3.8
indeed version numbers are in sync then - but the optional dependencies of the pip install are missing. How could I get these optional dependencies using pip?
m
Hmmm I think airplane tutorial is a bit too complex. You could try the cereal example instead. It's under the tutorial section of the docs. It doesn't need extra depedencies aside from dagster and dagit I think
g
I know - but I already took a look there and would love to get the airline example going now.
m
Maybe try this first. If you can get it up and running then airline is next
g
I have this one already running.
m
https://docs.dagster.io/examples/airline_demo do you have all the pre reqs as stated here?
g
yes. But the optional dependencies i.e.
dagster-aws
and all the others are not installed when executing `
Copy code
pip install -e .
but they do not seem to be optional as I otherwise see exceptions when starting dagit
m
If all else fails you could try using docker compose
g
do you have a link for that? Maybe this is indeed simpler.
m
Theres a link to gh repo from the docs link above
Also I'm not familiar with using pip with -e flag
g
sure - but the docker-compose from there only starts postgres and not dagster.
m
Oh I didn't read it carefully. You keep it open tho for db instance.
Which dir are you in when executing pip install?
i.e. https://dagster.slack.com/archives/CCCR6P2UR/p1615125596382200?thread_ts=1615125009.380600&amp;cid=CCCR6P2UR I pretty much followed their tutorial 1:1 (besides additionally creating a virtual environment using conda)
m
good news is you’re not imagining things. the example is indeed outdated: https://github.com/dagster-io/dagster/issues/3577
g
many thanks.
m
altho on my machine it seems that I have to install
dagster_aws
manually. it then asks for
dagster_pyspark, dagstermill
and so on…..
but if you still want to try a full fledge pipelines, this works https://github.com/kstadler/dagster-exchangerates
g
awesome.
n
From looking at the code, you need
pip install -e '.[full]'
I think
It puts most of the demo dependencies in an extra
Should probably just get moved to install_requires