<@U04S8PLJWMT> I have an async request everything ...
# ask-ai
l
@kapa.ai I have an async request everything seems to work fine but when i try to use "{{ creation_response['id'] }}" in the downloads tab it complains that "creation_response" isnt available I can see that polling worked airbyte version: 1.7.2
k
In Airbyte 1.7.2, when configuring an asynchronous stream in the Connector Builder UI, the Download Tab allows you to use variables like
{{ download_target }}
,
{{ creation_response }}
, and
{{ polling_response }}
to construct the download URL. However, according to the documentation, the recommended and supported way to pass information from the polling phase to the download phase is to use the Download Target Extractor in the Polling Tab. This extractor pulls the download URL or identifier from the polling response, and you should reference it in the Download Tab using
{{ download_target }}
. If you try to use
{{ creation_response['id'] }}
directly in the Download Tab, it may not work because, by design, the download phase expects to use the output of the polling phase (i.e., the download target), not the creation phase. The variable
creation_response
is available in the Polling Tab for constructing the polling URL, but in the Download Tab, you should use
{{ download_target }}
(which is extracted from the polling response) or, if needed,
{{ polling_response }}
. What you should do: - In the Polling Tab, set up the Download Target Extractor to extract the download URL or ID from the polling response. - In the Download Tab, use
{{ download_target }}
as the URL or as part of the URL. Example: - Polling Tab: - Download Target Extractor: Field Path =
urls
- Download Tab: - URL:
{{ download_target }}
This approach is confirmed in the documentation: > The Download tab configures how to retrieve the results once the job is complete. ... Use the
{{ download_target }}
variable to reference the value extracted by the Download Target Extractor. Use the
{{ creation_response }}
variable to reference the creation request response when constructing this URL and use the
{{ polling_response }}
to reference the polling response when constructing the download URL. > — [Asynchronous Job streams: Download Tab](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/async-streams#download-tab) If you need a value from the creation response in the download phase, you may need to ensure it is passed through the polling response or included in the download target, as direct access to
creation_response
in the Download Tab is not guaranteed in Airbyte 1.7.2. Summary: You should use
{{ download_target }}
in the Download Tab, not
{{ creation_response }}
. If you need something from the creation response, ensure it is available in the polling response and extracted as the download target. If you are still having issues, double-check your Download Target Extractor configuration in the Polling Tab and ensure the polling response contains the necessary information for the download phase.
l
@kapa.ai so, this changed somehow after 1.7.2 right? https://docs.airbyte.com/platform/connector-development/connector-builder-ui/async-streams#download-tab because this docs clearly state that the {{creation_response}} can be used in the download tab
k
A message from kapa.ai
You are correct—the documentation for the "Download Tab" in the Connector Builder UI does state that you can use
{{ creation_response }}
in the Download Tab to construct the download URL, along with
{{ download_target }}
and
{{ polling_response }}
. This is explicitly mentioned in the documentation for both the "Next" and "current" platform versions: > Use the
{{ download_target }}
variable to reference the value extracted by the Download Target Extractor. Use the
{{ creation_response }}
variable to reference the creation request response when constructing this URL and use the
{{ polling_response }}
to reference the polling response when constructing the download URL. > [Asynchronous Job streams: Download Tab](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/async-streams#download-tab) However, the knowledge sources do not specify exactly when this feature was introduced or if there was a change after version 1.7.2. The documentation simply describes the current expected behavior, but does not provide a version history or changelog for this specific feature. Summary: - The documentation states that
{{ creation_response }}
can be used in the Download Tab. - The knowledge sources do not clarify if this was different in 1.7.2 or when this capability was added. - If you are experiencing issues in 1.7.2, it is possible that this feature was added or fixed in a later version, but the knowledge sources do not provide explicit confirmation of this. If you need to be certain about version-specific behavior, you may want to check the Airbyte release notes or GitHub changelog for details, as the provided documentation does not specify this information.
p
Hey Lucas! I'm looking into building a connector for Spendesk but the polling does not return download URL, just starts returning the data when it's available. So my download tab part would also need to access to the
creation_response
😕 Did you find an answer to your question?
l
hey @Paul Laturaze
well, the weird thing is that the docs show that it should be available I THINK it's a bug with 1.7.2, didnt test further versions What I'll do in the meantime is making a simple "proxy" that will add the creation_response.job_id to the polling response then in download tab ill use download_target instead of creation_response
really curious to see if 2.0 still has this issue will upgrade soon (god help me lol) to the new chart
p
Yeah that was my last idea to try to add it to the polling response. I'm on Airbyte 1.8.3 at the moment (which I think is the same as 2.0 in terms of platform)
l
for what is worth the proxy worked (using data from download_target)
p
Can I ask how did you set up this "proxy"? Did you set up an HTTP proxy to do the injection or somehow passed the parameter in one of the connector builder attributes?
l
at first I tried to set the job_id from the creation_response in a custom field without much success then I just brute forced it -> I have a simple application (like a lambda - bunjs + hono) where I do this kind of dirty stuff (formatting responses, weird authentication protocols, etc) I kinda just forwarded the polling request while adding the field I needed to its response
p
Okay thank you !
🙏 1
l
god now im facing another issue where the incremental sync simply doesnt work til the "end_date" and just pulls the first partition
I think async streams dont play nice with splitup interval
p
In the end for my use-case I cheated a bit. I created a stream to call the creation request endpoint. Then I used it as a parent stream for the polling / extraction one. The substream is configured with some error handlers when the report is still generated with some backoff strategy
When the status is finally "complete" is does not fall in the error handler, and then we can proceed to extract the records and paginate to extract everything. A bit hacky, but it works
l
yeah nice what I ended up doing is removing split up interval and just cursor paginating volume wasnt that big
can confirm that 2.0 fixes the
creation_response
issue however the UI for the download target extractor seems broken