# How to extend Query.jl with new data source

**URL:** <https://discourse.julialang.org/t/how-to-extend-query-jl-with-new-data-source/92449>\
**Category:** Data\
**Created:** [January 3, 2023, 10:22am UTC](https://discourse.julialang.org/t/how-to-extend-query-jl-with-new-data-source/92449 "2023-01-03T10:22:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![minetest2048](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/minetest2048/32/45961_2.png) [@minetest2048](https://discourse.julialang.org/u/minetest2048)\
**Post date:** [January 3, 2023, 10:22am UTC](https://discourse.julialang.org/t/how-to-extend-query-jl-with-new-data-source/92449/1 "2023-01-03T10:22:23Z")

</div>

[Introduction · Query.jl](http://www.queryverse.org/Query.jl/stable/) says: (emphasis mine)

> - There are three different APIs that package authors can use to make their data sources queryable with this package. The most simple API only requires a data source to provide an iterator. **Another API provides a data source with a complete graph representation of the query and the data source can e.g. rewrite that query graph as a SQL statement to execute the query.** The final API allows a data source to provide its own data structures that can represent a query graph.

I have a HTTP API where you can select which fields it will return: [Universalis Documentation](https://docs.universalis.app/#market-board-current-data), for example if you GET `https://universalis.app/api/v2/Japan/38623` you will get all the data for object ID `38623`, but if you GET `https://universalis.app/api/v2/Japan/38623?fields=maxPrice` it will only send the `maxPrice` data.

Is there a way/example for a data source that rewrite the Query.jl macros into REST API commands? Or SQL as the documentation says?
