Hi. I started to learning Meltano yesterday. I am ...
# getting-started
g
Hi. I started to learning Meltano yesterday. I am trying to extract data using
tap-rest-api-msdk
. My REST API is simple and only provides an endpoint
GET /resource/:id
When I provide the
:id
directly at
path
I get data. How can I provide a list of
ids
as input to an extractor in order to make many requests to the REST API?
a
Is there an endpoint that would list your objects rather than returning a single one? So
<http://api.mysite.com/tickets|api.mysite.com/tickets>
as opposed to
<http://api.mysite.com/tickets/123|api.mysite.com/tickets/123>
?
g
No @Andy Carter.
But I know the list of
ids
that I need to retrieve.
@Andy Carter should I extract one stream for each
id
and combine them using
dbt
?
a
That's one way for sure, a good solution if you have dbt up and running already. If you are comfortable with python, you could look at building a custom tap, and providing your list of ids as a configuration item. But if your list is not very long or constantly changing, your solution looks fine to me, especially whilst getting to grips with meltano.
g
Thank you @Andy Carter. Although I have mentioned
dbt
, I think that for now I will focus on learning
Meltano
and
Airflow
When you say to build a custom tap do you mean a custom tap for extracting data from this API?
a
Yes, there is an SDK to use to help you build a tap for a specific api. https://sdk.meltano.com/en/v0.41.0/ It's worth taking some time to get familiar with meltano principles and the existing taps first, particularly if you can make
tap-rest-api-msdk
work for you for now.