Andrew Nessin R
06/23/2023, 10:07 AMlisa
06/23/2023, 11:37 AMXavier Rosée
06/23/2023, 3:31 PM/users
and made sure (as stated in their doc) to prefix the API key (upon entering my Test Values) with Bearer
.
I'm facing the following error
Could not verify streams:
"Invalid connector manifest with error: Validation against json schema defined in declarative_component_schema.yaml schema failed"
In order to test a stream, ensure that the YAML is structured as described in the docs.
Looking at the automatically imported schema it is pretty straightforward:
{
"$schema": "<http://json-schema.org/draft-07/schema#>",
"additionalProperties": true,
"properties": {},
"type": "object"
}
Would you have any insight as to what I did wrong ?
Thanks~Octavia Squidington III
06/23/2023, 7:45 PMAazam Thakur
06/23/2023, 10:36 PMclass MailChimpStream(HttpStream, ABC):
primary_key = "id"
page_size = 1000
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.current_offset = 0
self.data_center = kwargs["authenticator"].data_center
@property
def url_base(self) -> str:
return f"https://{self.data_center}.<http://api.mailchimp.com/3.0/|api.mailchimp.com/3.0/>"
@property
def availability_strategy(self) -> Optional["AvailabilityStrategy"]:
return None
def next_page_token(self, response: requests.Response) -> Optional[Mapping[str, Any]]:
decoded_response = response.json()
api_data = decoded_response[self.data_field]
if len(api_data) < self.page_size:
self.current_offset = 0
return None
else:
self.current_offset += self.page_size
return {"offset": self.current_offset}
def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapping]:
response_json = response.json()
yield from response_json[self.data_field]
class GetMemberInfo(MailChimpStream):
data_field = ""
Nazif Ishrak
06/25/2023, 5:54 AMCedric Altmaier
06/25/2023, 11:51 AMNitheesh S
06/26/2023, 8:46 AMEric Schrock
06/26/2023, 8:54 AMArumugam S
06/26/2023, 10:23 AMJonathan
06/26/2023, 10:55 AMLuis Vicente
06/26/2023, 11:02 AMGulliver Waite
06/26/2023, 11:53 AMAlexandre Girard (Airbyte)
06/26/2023, 3:14 PMNaveen Kumar Vadlamudi
06/26/2023, 7:15 PMdef check_connection(self, logger, config) -> Tuple[bool, any]:
accepted_currencies = {"USD", "JPY", "BGN", "CZK", "DKK"} # assume these are the only allowed currencies
input_currency = config['base']
if input_currency not in accepted_currencies:
return False, f"Input currency {input_currency} is invalid. Please input one of the following currencies: {accepted_currencies}"
else:
return True, None
Naveen Kumar Vadlamudi
06/26/2023, 7:42 PMOctavia Squidington III
06/26/2023, 7:45 PMMichael Eini
06/26/2023, 9:17 PMPhoom Chonlakorn
06/27/2023, 9:22 AMEnrico D'Urso
06/27/2023, 9:30 AMfor record in json_records:
<http://logger.info|logger.info>(record)
yield AirbyteMessage(
type=Type.RECORD,
record=AirbyteRecordMessage(stream=stream.name, data=record, emitted_at=int(datetime.now().timestamp()) * 1000),
)
#yield AirbyteStateMessage(state={"data": {stream.name: {"date": max_date}}})
yield AirbyteMessage(
type=Type.STATE,
state=AirbyteStateMessage(state={"data": {stream.name: {"date": max_date}}})
)
that is inside the read() function, (Source class extension).
I don't find an example to understand how to properly fill the last 3 lines!
Any clue? thanksEnrico D'Urso
06/27/2023, 9:46 AMyield AirbyteMessage(
type=Type.STATE,
state=AirbyteStateMessage(data={stream.name: {"date": max_date}})
)
it works well, but as I have multiple streams, I need to emit a state per each of them.
For some reasons, it looks like just the latest gets saved.Enrico D'Urso
06/27/2023, 9:49 AMEnrico D'Urso
06/27/2023, 9:50 AMyield AirbyteMessage(
type=Type.STATE,
state=AirbyteStateMessage(data={stream.name: {"date": max_date}})
)
it works well, but as I have multiple streams, I need to emit a state per each of them.
For some reasons, it looks like just the latest gets saved.Patrick Elsen
06/27/2023, 12:11 PMErry Kostala
06/27/2023, 1:24 PMOctavia Squidington III
06/27/2023, 1:45 PMEnrico D'Urso
06/27/2023, 5:31 PMEthan Veres
06/27/2023, 6:40 PMSingleUseRefreshTokenOauth2Authenticator
and I’m running into an issue where the access token expires within the same sync. Not entirely sure what’s going on!Phoom Chonlakorn
06/28/2023, 2:50 AMJoey Taleño
06/28/2023, 2:53 AM