Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Commit ea2f898

Browse files
author
Mayra Pena
committed
Fix datacoves- and add var.value.my_var syntax to dag
1 parent 9979219 commit ea2f898

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/how-tos/airflow/use-datacoves-secrets-manager.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# How to use Datacoves Secrets Manager in Airflow
22

3-
Datacoves includes a built-in [Secrets Manager](reference/admin-menu/secrets.md) that allows you to securely store and manage secrets for both administrators and developers. Secrets can be stored at the project or environment level and easily shared across other tools in your stack, ensuring seamless integration and enhanced security. [Creating or editing a secret](/how-tos/datacoves/how_to_secrets.md) in the Datacoves Secret Manager is straightforward.
3+
Datacoves includes a built-in [Secrets Manager](reference/admin-menu/secrets.md) that allows you to securely store and manage secrets for both administrators and developers. Secrets can be stored at the project or environment level and easily shared across other tools in your stack, ensuring seamless integration and enhanced security. [Creating or editing a secret](/how-tos/datacoves/how_to_secrets.md) in the Datacoves Secret Manager is straightforward. Be sure to prefix all secrets stored in Datacoves Secrets Manager with `datacoves-`
44

55
## Read variable from Datacoves Secrets manager
66

@@ -21,7 +21,7 @@ Once a variable is found Airflow will stop its search.
2121
There are some best practices that we recommend when using the Datacoves Secrets manager which will improve performance and cost.
2222

2323
1. Always call your `Variable.get` from within the Datacoves Task Decorators. This ensures the variable is only fetched at runtime.
24-
2. Make use of prefixes based on where your variable is stored like `datacoves_`, `aws_`, `airflow_` and so on to help you identify and debug your variables. eg) `datacoves_mayras_secret` seen in the example below.
24+
2. Make use of prefixes based on where your variable is stored like `datacoves-`(Datacoves secrets manager will only search for secrets with this prefix), `aws_`, `airflow_` and so on to help you identify and debug your variables. eg) `datacoves-mayras_secret` seen in the example below.
2525

2626

2727
```python
@@ -48,7 +48,7 @@ def task_decorators_example():
4848

4949
@task.datacoves_bash
5050
def calling_vars_in_decorators() -> str:
51-
my_var = Variable.get("datacoves_mayras_secret") # Call variable within @task.datacoves_bash
51+
my_var = Variable.get("datacoves-mayras_secret") # Call variable within @task.datacoves_bash
5252
return f"My variable is: {my_var}"
5353

5454
calling_vars_in_decorator() # Call task function

docs/reference/airflow/datacoves-decorators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This custom decorator is an extension of Airflow's default @task decorator and s
1818

1919
**Params:**
2020

21-
- `env`: Pass in a dictionary of variables. eg) `{'my_var1': 'hello', 'my_var2': 'world',}`
21+
- `env`: Pass in a dictionary of variables. eg) `"my_var": "{{ var.value.my_var }}"` Please use {{ var.value.my_var }} syntax to avoid parsing every 30 seconds.
2222
- `outlets`: Used to connect a task to an object in datahub or update a dataset
2323
- `append_env`: Add env vars to existing ones like `DATACOVES__DBT_HOME`
2424

0 commit comments

Comments
 (0)