Skip to content

Commit

Permalink
chore: Update the changelog (#779)
Browse files Browse the repository at this point in the history
  • Loading branch information
yohamta authored Jan 8, 2025
1 parent 1ce8148 commit 0614bd5
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
44 changes: 42 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,6 @@ remoteNodes:

### Minimal examples

```yaml
A DAG with two steps:

```yaml
Expand Down Expand Up @@ -320,6 +318,48 @@ steps:
depends: step1
```
### JSON processing
You can reference the nested JSON data using the syntax `${INPUT.key}`:

```yaml
params:
- INPUT: '{ "name": "John", "age": 30 }'
steps:
- name: John's age
command: echo ${INPUT.name} is ${INPUT.age} years old
```

It will write `John is 30 years old` to the log (stdout).

### Calling a sub-DAG

You can call a sub-DAG from a parent DAG:

```yaml
steps:
- name: parent
run: sub-dag
output: OUT
- name: use output
command: echo ${OUT.outputs.result}
depends: parent
```

The sub-DAG `sub-dag.yaml`:

```yaml
steps:
- name: sub-dag
command: echo "Hello from sub-dag"
output: result
```

THe parent DAG will call the sub-DAG and write the output to the log (stdout).
The output will be `Hello from sub-dag`.

More examples can be found in the [documentation](https://dagu.readthedocs.io/en/latest/yaml_format.html).

### Complex examples

A typical data pipeline for DevOps/Data Engineering scenarios:
Expand Down
5 changes: 5 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Unreleased
----------

- **Docker Image**: Docker image now based on ``ubuntu:24.04`` and includes common tools and utilities (e.g., ``sudo``, ``git``, ``curl``, ``jq``, ``python3``, etc)
- **Support Dotenv file**: Added support for loading environment variables from a dotenv file. You can specify the path to the dotenv file using the ``dotenv`` attribute in the DAG configuration file.

.. code-block:: yaml
dotenv: /path/to/.env
- **JSON Reference Expansion**: Added support for expanding JSON references in fields using the ``${NAME.path.to.value}`` syntax. Users can now dynamically resolve values from JSON variables. Example:

.. code-block:: yaml
Expand Down

0 comments on commit 0614bd5

Please sign in to comment.