-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[motherduck-demo] it's not clear how a user could configure this project to run locally #21
Comments
Will submit a PR fix tomorrow. |
From the Evidence documentation it's clear that the evidence environment variable is meant to be automatically picked up by evidence, but it's not respecting it for some reason, may look into this further. https://docs.evidence.dev/reference/cli/#environment-variables |
Regarding the evidence environment variable issue -- I also experienced this in that Evidence was not respecting the environment variables being set despite it matching their documentation. I got around this by defining the connection in the The evidence team is very responsive on Slack, and I'll shoot a message there way to get their input. |
I've started a thread here if you would like to follow along: |
I noticed from their documentation the env variable is case sensitive, it's defined as |
Example below, seems like the case sensitivity may be the issue. Tested this running the commands myself but will now try changing the env variable in the .env file to see if dagster properly exports it before running evidence.
|
Okay setting the environment variables like so in the .env file fixed it, will submit a PR with proper instructions:
|
Nice! Fantastic job getting to the bottom of that. That really simplifies getting up and running. |
cmpadden it'd still be really cool if the evidence team provided some advice on absolute paths, they'd be preferable because having to specify the environment variable as a relative path from the For reference this is what happens if you use an absolute path:
You can see that for some reason evidence injects the |
export case sensitive evidence environment variables. also provided instructions in .env.example on how to configure project for local use. removed `dagster_hybrid_demo.` from schema name in FROM statement as the tables created by duckdb exist in the `main` schema, was causing error where evidence couldn't find the data sources.
Missed this message, but you should be able to join at this link - https://slack.evidence.dev/ |
Dropping a timestamped video link here as an option for solving this issue, not 100% certain this could solve it just thinking out loud. We could specify a LOCAL and PROD dictionary for environment variables that may enable us to seamlessly deploy, just an idea. https://www.youtube.com/live/kpco5u1zG9Y?si=zfSZIrlZR3e4pW1d?t=30m14s |
Seems like the IO managers and having separate environment variables for local vs prod may be the way after watching that vid, will test it out myself when i get time outside my day job. |
Just one note here is that we are de-emphasizing the use of IO managers, so I don't think I'd necessarily want to start leveraging that in this demo. But I think we should be able to do the local/prod environment variables with our resources. |
Oh interesting, why is it that you're de-emphasising their use? Not to worry will work out another way. |
They're still a totally valid approach, but I think they can be a bit "magic" in how they operator, so they're maybe not the most intuitive demonstration for people who are new to Dagster. I'm not opposed to using them, but want to make sure the code remains easy to understand! |
Description
There are two configuration files that have to be modified to allow this project to run locally (
./.env
and./reports/sources/dagster_hybrid_demo/connection.yaml
), and this isn't very clear to the user.Firstly, setting
DUCKDB_DATABASE="local.duckdb"
as is explained in the.env.example
file will result in the dbt assets failing to materialize as I believe dbt assumes this path is relative to its runtime directory, meaning it can't locate the database. Instead, it's mandatory to use the absolute path in the.env
file like so:DUCKDB_DATABASE="/home/maxisq/dev/dagster-devrel-fork/motherduck-dagster-hybrid-compute/local.duckdb"
.Secondly, the
EVIDENCE_SOURCE__DAGSTER_HYBRID_DEMO__FILENAME
environment variableisn't referenced in the evidence project filesisn't respected by evidence meaning it will fail to find the local database and dagster will fail to materialize the evidence assets. Because of this it's necessary to modify theconnection.yaml
file in the evidence sources directory, where you unintuitively have to use a relative path, using an absolute paths will result in evidence modifying the path provided at run time which causes the same error.Proposed Solution
Firstly we can change the instructions in
.env.example
to properly indicate how to configure the project for local use, using absolute paths in the.env
file.Secondly we can either find a way to configure evidence such that it reads from the
EVIDENCE_SOURCE__DAGSTER_HYBRID_DEMO__FILENAME
environment variable properly, or give users instructions to modify theconnection.yaml
file to point to the local duckdb file using a relative path.The text was updated successfully, but these errors were encountered: