# Explicitly define pipeline execution order

**URL:** <https://discuss.dvc.org/t/explicitly-define-pipeline-execution-order/1073>\
**Category:** Questions\
**Created:** [February 21, 2022, 11:56am UTC](https://discuss.dvc.org/t/explicitly-define-pipeline-execution-order/1073 "2022-02-21T11:56:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ferdi](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dvc.org/ferdi/32/162_2.png) [@ferdi](https://discuss.dvc.org/u/ferdi)\
**Post date:** [February 21, 2022, 11:56am UTC](https://discuss.dvc.org/t/explicitly-define-pipeline-execution-order/1073/1 "2022-02-21T11:56:03Z")

</div>

Is there a way to specify a dependency between two pipeline stages except for a `outs` and `deps` combination? My use case is to run two stages consecutive, although they don’t read / write files, that could be tracked by DVC, but depend on each other in a different way, e.g. by one stage writing a value to an external database and the other one reading it again.

---

<div class="post-metadata">

**Author:** ![pmrowla](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@pmrowla](https://discuss.dvc.org/u/pmrowla)\
**Post date:** [February 22, 2022, 2:20am UTC](https://discuss.dvc.org/t/explicitly-define-pipeline-execution-order/1073/2 "2022-02-22T02:20:47Z")

</div>

The only way to define stage dependencies is via `outs` and `deps` files.

For your situation, you could just write an empty/temporary file as an `out` for the first stage, and also mark it as `cache: false` (since you don’t actually need DVC to care about the contents of the file).

Then in the second stage you could add the empty file as a `dep`, and then also mark the stage as `always_changed: true` so that the second stage is always executed (even though the content of the empty file won’t ever be modified)
