# How to return interface alias name rather than name

**URL:** https://community.influxdata.com/t/how-to-return-interface-alias-name-rather-than-name/17349
**Category:** Fluxlang
**Created:** [December 23, 2020, 8:13pm UTC](https://community.influxdata.com/t/how-to-return-interface-alias-name-rather-than-name/17349 "2020-12-23T20:13:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Brian\_Gibson](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/brian_gibson/32/6083_2.png) [@Brian\_Gibson](https://community.influxdata.com/u/Brian_Gibson)
#### Post date: [December 23, 2020, 8:13pm UTC](https://community.influxdata.com/t/how-to-return-interface-alias-name-rather-than-name/17349/1 "2020-12-23T20:13:40Z")

</div>

So I am collecting interface data and what I would like to do is to display the Interface Description(ifAlias) rather than the Interface name. So I’m basically using one measurement as a lookup table. Here are my data structures…

,result,table,\_start,\_stop,\_time,\_value,\_field,\_measurement,host,name,source  
,0,2020-12-23T19:48:29.359160489Z,2020-12-23T19:53:29.359160489Z,2020-12-23T19:48:54.200919956Z,45327325934028,in\_octets,ifcounters,techops01.ny2,Ethernet24/1,10.85.99.20

#default,last,  
,result,table,\_start,\_stop,\_time,\_value,\_field,\_measurement,agent\_host,host,ifName  
,0,2020-12-23T19:49:12.566793345Z,2020-12-23T19:54:12.566793345Z,2020-12-23T19:49:15Z,HOST=APCON01.NY2 PT=A13 FN=APCON LOC=XXX-XX,ifAlias,Net-System,10.85.99.20,techops01.ny2,Ethernet2/1

name in the first measurement is the same ifName in the 2nd. So I am basically looking to use the second measurement as a lookup table.

I tried to do this…

from(bucket: “systems\_telegraf”)  
|\> range(start: v.timeRangeStart, stop: v.timeRangeStop)  
|\> filter(fn: ® =\> r["\_measurement"] == “Net-System”)  
|\> filter(fn: ® =\> r["\_field"] == “ifAlias”)  
|\> filter(fn: ® =\> r["\_measurement"] == “ifcounters”)  
|\> filter(fn: ® =\> r["\_field"] == “in\_octets”)  
|\> join(tables: {Net-System: ifAlias, ifcounters: in\_octets}, on: [“ifName”, “name”])  
|\> yield(name: “last”)

And I get this error…

```auto
 compilation failed: error at @7:17-7:61: cannot mix implicit and explicit properties

```

I don’t think a join is necessarily the best choice. But I’m not really sure what the right choice is

---

<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: [December 28, 2020, 6:23pm UTC](https://community.influxdata.com/t/how-to-return-interface-alias-name-rather-than-name/17349/2 "2020-12-28T18:23:41Z")

</div>

Hello @Brian_Gibson,  
You’re close.  
Since flux is pipe-forwardable, once you filter for one field or measurement then the rest won’t exist.  
Instead, try storing the results of each query in a variable before performing a join like:

```auto
Net-System: = from(bucket: “systems_telegraf”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: ® => r["_measurement"] == “Net-System”)
|> filter(fn: ® => r["_field"] == “ifAlias”)

ifcounters = from(bucket: “systems_telegraf”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: ® => r["_measurement"] == “ifcounters”)
|> filter(fn: ® => r["_field"] == “in_octets”)

join(tables: {Net-System: ifAlias, ifcounters: in_octets}, on: [“ifName”, “name”])
|> yield(name: “myjoin”)

```
