# \`@collect table\` does not work: Query.jl and JuliaDB.jl

**URL:** <https://discourse.julialang.org/t/collect-table-does-not-work-query-jl-and-juliadb-jl/10869>\
**Category:** Data\
**Created:** [May 13, 2018, 10:58am UTC](https://discourse.julialang.org/t/collect-table-does-not-work-query-jl-and-juliadb-jl/10869 "2018-05-13T10:58:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [May 13, 2018, 10:58am UTC](https://discourse.julialang.org/t/collect-table-does-not-work-query-jl-and-juliadb-jl/10869/1 "2018-05-13T10:58:45Z")

</div>

Is this asymmetry expected? Should I open an issue?

```julia
julia> using JuliaDB

julia> using DataFrames

julia> using Query

julia> t = table(@NT(A = [1,2], B = [2,3]));

julia> df = DataFrame(A = [1,2], B = [2,3]);

julia> x = @from i in df begin
           @select {i.A}
           @collect DataFrame
       end
2×1 DataFrames.DataFrame
│ Row │ A │
├─────┼───┤
│ 1 │ 1 │
│ 2 │ 2 │

julia> x = @from i in t begin
           @select {i.A}
           @collect table
       end
ERROR: MethodError: no method matching collect(::QueryOperators.EnumerableMap{NamedTuples._NT_A{Int64},QueryOperators.EnumerableIterable{NamedTuples._NT_A_B{Int64,Int64},IndexedTables.NextTable{IndexedTables.Columns{NamedTuples._NT_A_B{Int64,Int64},NamedTuples._NT_A_B{Array{Int64,1},Array{Int64,1}}}}},##17#18}, ::IndexedTables.#table)
Closest candidates are:
  collect(::Dagger.Context, ::Any) at C:\Users\user\.julia\v0.6\Dagger\src\compute.jl:9
  collect(::Type{T}, ::Any) where T at array.jl:393
  collect(::QueryOperators.Enumerable, ::Type{T}) where T at C:\Users\user\.julia\v0.6\Query\src\sinks/sink_type.jl:2
  ...

```

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [May 14, 2018, 11:54pm UTC](https://discourse.julialang.org/t/collect-table-does-not-work-query-jl-and-juliadb-jl/10869/2 "2018-05-14T23:54:49Z")

</div>

This is going to be fixed in v0.9.3. Just waiting for the [METADATA](https://github.com/JuliaLang/METADATA.jl/pull/14658) PR to be merged. Thanks for pointing this out!

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [May 15, 2018, 2:17am UTC](https://discourse.julialang.org/t/collect-table-does-not-work-query-jl-and-juliadb-jl/10869/3 "2018-05-15T02:17:59Z")

</div>

Great, thanks!
