# Connect to Snowflake using environment defaults in Python component DPC

**URL:** <https://matillioncommunity.discourse.group/t/connect-to-snowflake-using-environment-defaults-in-python-component-dpc/3411>\
**Category:** Maia\
**Tags:** maia\
**Created:** [September 10, 2025, 11:33pm UTC](https://matillioncommunity.discourse.group/t/connect-to-snowflake-using-environment-defaults-in-python-component-dpc/3411 "2025-09-10T23:33:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RemigiousMikevin.James](https://sea2.discourse-cdn.com/flex002/user_avatar/matillioncommunity.discourse.group/remigiousmikevin.james/32/1289_2.png) [@RemigiousMikevin.James](https://matillioncommunity.discourse.group/u/RemigiousMikevin.James)\
**Post date:** [September 10, 2025, 11:33pm UTC](https://matillioncommunity.discourse.group/t/connect-to-snowflake-using-environment-defaults-in-python-component-dpc/3411/1 "2025-09-10T23:33:35Z")

</div>

When working in **Matillion ETL** , we often relied on the Python component to connect to Snowflake. A key advantage was the ability to use **environment defaults** to manage connection parameters, which saved us from creating and updating variables manually.

For example, a typical connection looked like this:

```auto
import snowflake.connector

conn = snowflake.connector.connect(
    account=environment_endpoint,
    user=environment_username,
    password=SNOWFLAKE_PASSWORD,
    warehouse=environment_port,
    database=environment_database,
    schema=environment_default_schema,
)

```

This approach provided a simple, centralized way to manage credentials and configuration, making pipelines easier to maintain.

* * *

After moving to **Matillion DPC** , I noticed that the familiar _environment defaults_ are not directly available in the same way. In ETL, these defaults gave us an easy entry point, but in DPC the setup is different.

The question is: **How can we access Snowflake connection details (account, username, warehouse, database, schema) in DPC?**

---

<div class="post-metadata">

**Author:** ![Joe-Community-Manager](https://sea2.discourse-cdn.com/flex002/user_avatar/matillioncommunity.discourse.group/joe-community-manager/32/897_2.png) [@Joe-Community-Manager](https://matillioncommunity.discourse.group/u/Joe-Community-Manager)\
**Post date:** [September 11, 2025, 12:18pm UTC](https://matillioncommunity.discourse.group/t/connect-to-snowflake-using-environment-defaults-in-python-component-dpc/3411/2 "2025-09-11T12:18:50Z")

</div>

Hi @RemigiousMikevin.James

Thank you for your post, and welcome to the Data Productivity Cloud! In relation to your question, this would be achieved and set in the environment.

I have linked a document that covers this for you [here](https://docs.matillion.com/data-productivity-cloud/designer/docs/environments/).

If you need anything else, please do not hesitate to ask.

Kind regards, Joe

---

<div class="post-metadata">

**Author:** ![RemigiousMikevin.James](https://sea2.discourse-cdn.com/flex002/user_avatar/matillioncommunity.discourse.group/remigiousmikevin.james/32/1289_2.png) [@RemigiousMikevin.James](https://matillioncommunity.discourse.group/u/RemigiousMikevin.James)\
**Post date:** [September 12, 2025, 2:16am UTC](https://matillioncommunity.discourse.group/t/connect-to-snowflake-using-environment-defaults-in-python-component-dpc/3411/3 "2025-09-12T02:16:58Z")

</div>

Hi Joe, Thank you for your response. The question is more towards how we can access the environment default values in python code. Print(globals()) in matillionETL will return list of values for environment\_endpoint,environment\_username,environment\_port,environment\_database,environment\_default\_schema. How can we get this in DPC python component.

---

<div class="post-metadata">

**Author:** ![Joe-Community-Manager](https://sea2.discourse-cdn.com/flex002/user_avatar/matillioncommunity.discourse.group/joe-community-manager/32/897_2.png) [@Joe-Community-Manager](https://matillioncommunity.discourse.group/u/Joe-Community-Manager)\
**Post date:** [September 12, 2025, 3:33pm UTC](https://matillioncommunity.discourse.group/t/connect-to-snowflake-using-environment-defaults-in-python-component-dpc/3411/4 "2025-09-12T15:33:00Z")

</div>

Hello @RemigiousMikevin.James

Thanks for your reply, we had a look into this, at the moment it’s not something that is possible. There is an idea raised for this on the Matillion Roadmap, you can find this [here](https://roadmap.matillion.com/p/environment-defaults-as-system-variables). Please vote and share you use case as this helpes the Matillion Product Team prioritise ideas and make them a reality.

In the meantime, if you need anything else, please do not hesitate to ask.

Kind regards, Joe
