To set the stream_slice
to be a list from your config file, you need to modify your stream_slices
method in your connector’s code. Here’s a general idea of how you can do it: 1. First, ensure that your spec.json
is set to accept an array of cities instead of a string. This was mentioned in a forum post. 2. Then, in your stream_slices
method, you can create a slice for each city and day you want to consume. This was also suggested in the same forum post. Here’s an example of how you can define your stream_slices
method: python def stream_slices( self, *, sync_mode: SyncMode, cursor_field: List[str] = None, stream_state: Mapping[str, Any] = None ) -> Iterable[Optional[Mapping[str, Any]]]:
In this method, sync_mode
, cursor_field
, and stream_state
are parameters that you might need to use depending on your use case. Please note that you need to import the necessary libraries for this method to work: python from typing import Any, Iterable, List, Mapping, Optional from airbyte_cdk.models import SyncMode
For more information on how to use stream_slices
, you can refer to the Airbyte documentation. Please remember to test your code thoroughly after making these changes to ensure everything works as expected. If you encounter any errors, feel free to ask for further assistance.