Martin Larsson
09/16/2021, 8:20 PMvirt_env) martin@MacBook-Pro source-provet % python3 main.py read --config secrets/config.json --catalog integration_tests/catalog.json
Logg:
Traceback (most recent call last):
File "main.py", line 33, in <module>
launch(source, sys.argv[1:])
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airbyte_cdk/entrypoint.py", line 125, in launch
for message in source_entrypoint.run(parsed_args):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airbyte_cdk/entrypoint.py", line 113, in run
config_catalog = self.source.read_catalog(parsed_args.catalog)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airbyte_cdk/sources/source.py", line 48, in read_catalog
return ConfiguredAirbyteCatalog.parse_obj(self.read_config(catalog_path))
File "pydantic/main.py", line 578, in pydantic.main.BaseModel.parse_obj
File "pydantic/main.py", line 406, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 3 validation errors for ConfiguredAirbyteCatalog
streams -> 0 -> stream
field required (type=value_error.missing)
streams -> 0 -> sync_mode
field required (type=value_error.missing)
streams -> 0 -> destination_sync_mode
field required (type=value_error.missing)
user
09/16/2021, 8:22 PMuser
09/16/2021, 8:22 PM{
"streams": [
{
"name": "consultation",
"supported_sync_modes": [
"full_refresh"
],
"source_defined_cursor": false,
"json_schema": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"url": {
"type": "string"
}
}
}
}
]
}
user
09/16/2021, 8:23 PMclass Consultation(ProvetStream):
"""
TODO: Change class name to match the table/data source this stream corresponds to.
"""
# TODO: Fill in the primary key. Required. This is usually a unique field in the stream, like an ID or a timestamp.
primary_key = "id"
def path(
self, stream_state: Mapping[str, Any] = None, stream_slice: Mapping[str, Any] = None, next_page_token: Mapping[str, Any] = None
) -> str:
return "consultation"
user
09/16/2021, 8:51 PMMartin Larsson
09/16/2021, 8:56 PMuser
09/16/2021, 8:57 PMuser
09/16/2021, 9:11 PMuser
09/16/2021, 9:15 PMuser
09/16/2021, 9:30 PMuser
09/16/2021, 9:38 PM{
"streams": [
{
"sync_mode": "full_refresh",
"stream": {
"name": "consultation",
"supported_sync_modes": [
"full_refresh"
],
"destination_sync_mode": [
"full_refresh"
],
"source_defined_cursor": false,
"json_schema": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"url": {
"type": "string"
}
}
}
}
}
]
}
Martin Larsson
09/16/2021, 9:39 PMydantic.error_wrappers.ValidationError: 1 validation error for ConfiguredAirbyteCatalog
streams -> 0 -> destination_sync_mode
Sujit Sagar
09/17/2021, 3:34 AMuser
09/17/2021, 5:55 PMDavin Chia (Airbyte)
{
"streams": [
{
"sync_mode": "full_refresh",
"stream": {
"name": "consultation",
"supported_sync_modes": [
"full_refresh"
],
"destination_sync_mode": "overwrite",
"source_defined_cursor": false,
"json_schema": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"url": {
"type": "string"
}
}
}
}
}
]
}
user
09/17/2021, 5:56 PMpydantic.error_wrappers.ValidationError: 1 validation error for ConfiguredAirbyteCatalog
streams -> 0 -> destination_sync_mode