David Mattern
05/09/2022, 7:43 PMdef update_state(self, state):
"sends an update of the state variable to stdout"
output_message = {"type":"STATE","state":{"data":state}}
print(json.dumps(output_message))
def parse_response(self,
response: requests.Response,
stream_state: Mapping[str, Any],
#stream_state,
**kwargs) -> Iterable[Mapping]:
if stream_state is not None:
#stream_state['a'] = 1
print (stream_state)
for key, value in stream_state.items():
print (key)
print (value)
else:
#stream_state['a'] = 1
print (stream_state)
#self.update_state(stream_state)
Here is this portion of my configured_catalog:
"stream": {
"name": "readings",
"json_schema": {
"properties": {
"column_name": {
"type": "string"
}
},
"type": "object",
"additionalProperties": false
},
"supported_sync_modes": ["incremental"]
},
"sync_mode": "incremental",
"destination_sync_mode": "append"
}
When printing the state, I only get an empty dictionary, whereas I think it should be the simple key value of 'a' and 1.