Skip to content
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

Added new docs section that warns against using dot notation for pipe… #3085

Merged
merged 11 commits into from
Sep 27, 2023
16 changes: 16 additions & 0 deletions docs/source/nodes_and_pipelines/pipeline_introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,19 @@ The output is as follows:
Circular dependencies exist among these items: ['first node: <lambda>([x]) -> [y]', 'second node: <lambda>([y]) -> [x]']
```
</details>

### Pipeline nodes named with the dot notation
Nodes named with dot notation may behave strangely.

<details>
<summary><b>Click to expand</b></summary>

```python
pipeline([node(lambda x: x, inputs="input1kedro", outputs="output1.kedro")])
```

Nodes that are created with input or output names that contain this character risk a disconnected pipeline and/or improperly formatted Kedro structure.

This is because `.` has a special meaning internally and indicates a namespace pipeline. In the example, the outputs segment should be disconnected as the name implies there is an "output1" namespace pipeline. The input is not namespaced, but the output is via its dot notation. This leads to Kedro processing each separately. For this example, a better approach would've been writing both as `input1_kedro` and `output1_kedro`.

We recommend use of characters like `_` instead of `.` as name separators.