# Conflicting errors when creating a table

**URL:** <https://community.zeek.org/t/conflicting-errors-when-creating-a-table/3753>\
**Category:** Zeek\
**Created:** [August 7, 2015, 6:01pm UTC](https://community.zeek.org/t/conflicting-errors-when-creating-a-table/3753 "2015-08-07T18:01:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Earl\_Eiland](https://avatars.discourse-cdn.com/v4/letter/e/df705f/32.png) [@Earl\_Eiland](https://community.zeek.org/u/Earl_Eiland)\
**Post date:** [August 7, 2015, 6:01pm UTC](https://community.zeek.org/t/conflicting-errors-when-creating-a-table/3753/1 "2015-08-07T18:01:13Z")

</div>

Hello.

I’m trying to read in a table where the key is a set. The Input::add\_table operation seems fine with this, but the table declaration fails. The line “global whitelist: table[set[addr]] of Service\_whitelist\_data = table(); “ generates the error ”bad index type (set[addr])”

I can avoid this error by declaring “global whitelist: table[addr] of Service\_whitelist\_data = table(); “, but then receive the error “Input stream whitelist: Table type does not match index type. Need type ‘table’:set[addr], got ‘addr’:addr”.

I’m assuming that my type declaration “table[set[addr]]” is incorrect, and that the error message is suggesting a solution. I’ve tried a number of type declaration variations: all have failed. I’ve also looked through the documentation and input framework examples, but came away empty handed. How do I satisfy the ‘table’:set[addr] requirement?

Best Regards,

Earl Eiland,

Sr. Cyber Security Engineer,

Emerging Technologies, root9B,

San Antonio, Texas

---

<div class="post-metadata">

**Author:** ![Daniel\_Thayer](https://avatars.discourse-cdn.com/v4/letter/d/8dc957/32.png) [@Daniel\_Thayer](https://community.zeek.org/u/Daniel_Thayer)\
**Post date:** [August 7, 2015, 7:39pm UTC](https://community.zeek.org/t/conflicting-errors-when-creating-a-table/3753/2 "2015-08-07T19:39:50Z")

</div>

The error message "bad index type" means that a table's index type  
cannot be a set.

To solve this problem, you will probably need to add a new column  
to your input file. The new column will be the index to your table.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:42pm UTC](https://community.zeek.org/t/conflicting-errors-when-creating-a-table/3753/3 "2022-05-06T15:42:56Z")

</div>


