# Data First Pipeline

**URL:** <https://discourse.julialang.org/t/data-first-pipeline/103582>\
**Category:** General Usage\
**Tags:** piping\
**Created:** [September 6, 2023, 8:28pm UTC](https://discourse.julialang.org/t/data-first-pipeline/103582 "2023-09-06T20:28:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShalokShalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shalokshalom/32/52462_2.png) [@ShalokShalom](https://discourse.julialang.org/u/ShalokShalom)\
**Post date:** [September 6, 2023, 8:28pm UTC](https://discourse.julialang.org/t/data-first-pipeline/103582/1 "2023-09-06T20:28:12Z")

</div>

As someone, who comes mainly from functional statically typed languages, I stumbled over [this article](https://www.javierchavarri.com/data-first-and-data-last-a-comparison/), pointing out some potentially unique approach, and wondered how it would work in Julia.

I have not had many experiences with the pipe here, with the exception that it seems to connect fewer elements than in F#, since not everything here seems to be implemented as a function.

---

<div class="post-metadata">

**Author:** ![adienes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adienes/32/37459_2.png) [@adienes](https://discourse.julialang.org/u/adienes)\
**Post date:** [September 6, 2023, 8:45pm UTC](https://discourse.julialang.org/t/data-first-pipeline/103582/2 "2023-09-06T20:45:33Z")

</div>

not sure if it’s referencing the same thing, but you may be interested in this experimental branch to add pipefirst/pipelast operators [Experiment: Playing with currying, chaining and underscores by c42f · Pull Request #148 · JuliaLang/JuliaSyntax.jl · GitHub](https://github.com/JuliaLang/JuliaSyntax.jl/pull/148)

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [September 6, 2023, 8:51pm UTC](https://discourse.julialang.org/t/data-first-pipeline/103582/3 "2023-09-06T20:51:53Z")

</div>

> [@ShalokShalom](#):
>
> since not everything here seems to be implemented as a function

What exactly do you mean here? Multiple dispatch, and functions with it, are fundamental to design of Julia and packages.

Julia data processing functions often take the “data last” approach in the terms of that article, as the first argument tends to be a lambda function: think `map`, `filter`, etc.  
[DataPipes.jl](https://discourse.julialang.org/t/ann-datapipes-jl-0-3-0/60734) is a small macro package that makes bulding pipeline of “data last” functions convenient. Eg, `@p tbl |> filter(_.a > 5) |> map(_.b + _.c) `.

---

<div class="post-metadata">

**Author:** ![ShalokShalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shalokshalom/32/52462_2.png) [@ShalokShalom](https://discourse.julialang.org/u/ShalokShalom)\
**Post date:** [September 7, 2023, 6:04am UTC](https://discourse.julialang.org/t/data-first-pipeline/103582/4 "2023-09-07T06:04:50Z")

</div>

> [@aplavin](#):
>
> [DataPipes.jl](https://discourse.julialang.org/t/ann-datapipes-jl-0-3-0/60734) is a small macro package that makes bulding pipeline of “data last” functions convenient.

I have never thought about how many details a pipe has to consider, since it always just did its job, and I never questioned it. It always seemed a simple solution, and now I realize that’s probably just true for me, as a user 😅

Thanks, that DataPipes.jl looks a lot more like something that I am used to.  
I guess there are no plans, to revisit the “normal” pipe, since that would break backwards?

---

<div class="post-metadata">

**Author:** ![bertschi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bertschi/32/33462_2.png) [@bertschi](https://discourse.julialang.org/u/bertschi)\
**Post date:** [September 7, 2023, 7:38pm UTC](https://discourse.julialang.org/t/data-first-pipeline/103582/5 "2023-09-07T19:38:25Z")

</div>

In case you have some time, there have been several very long (and fun) threads on ideas around piping operators: [Here](https://discourse.julialang.org/t/summary-of-piping-chaining-proposal/91442) is the most recent one, summarizing quite a bit of the discussion.

---

<div class="post-metadata">

**Author:** ![ShalokShalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shalokshalom/32/52462_2.png) [@ShalokShalom](https://discourse.julialang.org/u/ShalokShalom)\
**Post date:** [September 7, 2023, 9:10pm UTC](https://discourse.julialang.org/t/data-first-pipeline/103582/6 "2023-09-07T21:10:22Z")

</div>

Just found out, that Julia does already have composition: I question if that would be an easy, and particularly more standardized way, and ask myself if that would be sufficient for me.

Let’s see 🙂
