I have a custom builder that accepts an optional a...
# replication-ask-ai
l
I have a custom builder that accepts an optional array parameter it sends a body like so "config": { "fields": [ "Documento", "Alteracao", "Nivel", "Data_inclusao", "Data_alteracao", "Divisao" ], "tableName": "tabela_docsrepasses", "cursorFields": [ "Documento" ] }, I want to add a "fixed_filter" property only if the optional array is set
k
Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain information on how to add a "fixed_filter" property to a custom builder in Airbyte based on the condition of an optional array being set. For more information on how to configure your custom builder, you may want to refer to the [Airbyte Documentation](https://docs.airbyte.com/) or ask your question in the [Airbyte Community](https://discuss.airbyte.io/).
l
@kapa.ai how to build conditionals inside a request body template
k
Based on the provided knowledge sources, there isn't a direct example or guideline on how to build conditionals inside a request body template in Airbyte. However, Airbyte does support the use of variables in the request body, which can be used to dynamically create requests. For instance, in the
request_body_json
field, you can use variables like
next_page_token
,
stream_interval
,
stream_partition
,
stream_slice
, and
stream_state
. These variables can be used to dynamically adjust the request body based on certain conditions. Here's an example from the [documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/HttpRequester):
Copy code
yaml request_body_json:    sort_order: "ASC"   sort_field: "CREATED_AT"
In this example, the
sort_order
and
sort_field
are static values, but you could replace them with variables to make the request body dynamic. However, please note that this doesn't provide a way to use conditional logic (like if-else statements) directly within the request body. If you need more complex logic, you might need to handle that in your code before generating the request body. For more complex scenarios or for further assistance, I would recommend checking the [Airbyte documentation](https://docs.airbyte.com/) or reaching out to the Airbyte community on their [Github page](https://github.com/airbytehq/airbyte).