Connector/Source: Publish the *request* object in the record transformation like the config, stream_slice, stream_interval, etc. are #49971
Replies: 4 comments 1 reply
-
Do you want to have a stream that translates the custom objects into a single table? (to me still kind confuse the request) |
Beta Was this translation helpful? Give feedback.
-
An alternative could be providing the (current) response object bound in the stream_state object that is already in the context.
becomes:
This will keep the existing public interfaces and contracts unchanged. The only change would be in the contents of the stream_state object. The existing implementation would publish the response object for filtering and transformation steps (see record_selector.py). |
Beta Was this translation helpful? Give feedback.
-
Analyzing in much more detail the design of the record extractors and the RecordSelector class, where the processing happens, and the options not to change the published interfaces and contracts, I see:
Suggestion
|
Beta Was this translation helpful? Give feedback.
-
Status in Airbyte 1.2.0
The record transformation allows removing existing fields from the record and adding new fields by calculating them using:
Example
The JIRA /issue response:
In JIRA the list of custom fields is highly dynamic, and it makes no practical sense to have a single record per issue, combining in it all standard and custom fields.
Instead, the JIRA issue can be represented using 2 tables:
ISSUE 1 --- * CUSTOM_FIELD
in one-to-many / master-detail relation.Turning the response into a list of records, one per custom field, could be done by iterating over the schema.* sub-list in the response, but taking their values from the fields map and taking their human-readble names from the name map.
Problem
In this configuration, the fields and names maps are not accessible. They could be, if the response object were available in the Tranformations' context. The response object exists in the context of the Pagination section.
Suggestion
Beta Was this translation helpful? Give feedback.
All reactions