# How can I pass null as literal?

**URL:** <https://community.influxdata.com/t/how-can-i-pass-null-as-literal/14174>\
**Category:** Fluxlang\
**Created:** [May 4, 2020, 6:07pm UTC](https://community.influxdata.com/t/how-can-i-pass-null-as-literal/14174 "2020-05-04T18:07:58Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [August 20, 2022, 1:06am UTC](https://community.influxdata.com/t/how-can-i-pass-null-as-literal/14174/7 "2022-08-20T01:06:22Z")

</div>

Hello @juliopereirab,  
You can now perform full or outer joins with the following function:

> **[join.full() function | Flux 0.x Documentation](https://docs.influxdata.com/flux/v0.x/stdlib/join/full/)**
>
> join.full() performs a full outer join on two table streams.

You query would look like this:

```auto
import "array"
import "join"

data =
    array.from(
        rows: [
              {_time: 2022-01-01T00:00:00Z, Price: 20, Bookmaker: "Bookie1"},
              {_time: 2022-02-01T00:00:00Z, Price: 18, Bookmaker: "Bookie2"},
              {_time: 2022-03-01T00:00:00Z, Price: 21, Bookmaker: "Bookie1"},
              {_time: 2022-04-01T00:00:00Z, Price: 20, Bookmaker: "Bookie2"},
        ],
    )

data
  |> pivot(rowKey:["_time"], columnKey: ["Bookmaker"], valueColumn: "Price")
  |> fill(column: "1", usePrevious: true)
  |> fill(column: "2", usePrevious: true)
  |> yield(name: "solution before joins")

left = data 
|> filter(fn: (r) => r.Bookmaker == "Bookie1")

right = data 
|> filter(fn: (r) => r.Bookmaker == "Bookie2")

join.full(
    left: left,
    right: right,
    on: (l, r) => l._time == r._time,
    as: (l, r) => {
        time = if exists l._time then l._time else r._time
        return {_time: time, Bookie1: l.Price, Bookie2: r.Price}
    },
)
  |> fill(column: "Bookie1", usePrevious: true)
  |> fill(column: "Bookie2", usePrevious: true)
  |> yield(name: "solution after joins")

```

---

_[View the full topic](https://community.influxdata.com/t/how-can-i-pass-null-as-literal/14174)._
