Elias Gabriel
10/24/2023, 7:22 PMkapa.ai
10/24/2023, 7:23 PMcheck operation in your custom connector using the Python CDK, you can assume that the user-supplied configuration contains the values described in the spec.yaml. This means if your spec.yaml specifies that the source requires certain inputs, such as a username and password, the config object should contain these values. However, it's important to note that while the config object should contain the values, it doesn't guarantee that these values are valid or can be used to successfully connect to the underlying data source. Therefore, your check operation should verify the validity of these inputs. For example, if you're checking the validity of a currency input, you might have something like this: python def 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 In this example, the check_connection function is checking if the input_currency from the config is in the list of accepted_currencies. If it's not, it returns False and an error message. If it is, it returns True and None. You can find more details about implementing the check operation in the [Airbyte documentation](https://docs.airbyte.com/connector-development/tutorials/cdk-tutorial-python-http/connection-checking).Elias Gabriel
10/24/2023, 7:25 PMconfig contains base because that has been validated somewhere upstream already?kapa.ai
10/24/2023, 7:26 PM