Hey all, I have a question with dagster.StringSour...
# ask-community
c
Hey all, I have a question with dagster.StringSource. How do i set the default value to pick up from environment variables? For example:
Copy code
"gcp_project": dagster.Field(
            dagster.StringSource,
            description="project name",
            is_required=False,
            default_value=os.getenv("GCP_PROJECT", "my-gcp-project"),
        ),
The default_value doesn't seem like the most "dagster" way to do it. Should it be {env: GCP_PROJECT}?
d
Hey Charles -
default_value={"env": "GCP_PROJECT"}
looks right to me, yeah
c
thanks daniel! i'll test this out.
worked great 🙂 thanks alot!
condagster 1