So i've been looking around in the documentation t...
# announcements
f
So i've been looking around in the documentation to figure out where the
state
is stored? I mean is it possible to change that through the UI for a specific source? Lets say i have a source and i want to manually set the
state
back due to, some manual manipulation in my destination (datawarehouse).
1
s
hey @Frederik Hagelund! There is currently no clean way to do this but it’s a very legitimate use case. Could you create an issue on github to move the request forward?
well, I guess it depends on how you define “clean”
f
Hi @s. Thank you for the quick response. I will create a github issue. I'd like to know what the not so "clean" solution is, since if i am going to use airbyte in production i need to be able to manipulate with the state. Lets say you have a source system that only updates once a day, but for some reason it fails on a specific day. If the Airbyte connection then has been executed then the
state
might be further ahead than the source. Hope it make sense
s
you can do this by doing the following: 1. export your airbyte configuration from the admin UI 2. turn off airbyte
docker-compose down
3. untar the downloaded archive 4. inside
airbyte_db/JOBS.yaml
find the latest successful job run for the connection whose state you want to change. it’s important that this is the latest, because state is considered to be whatever was output by the last successful sync job. 5. you should see a state object like so
Copy code
config:
    sync:
      state:
        state:
update the values in that object to match what you want 6. tar the resulting folders 7. turn on airbyte webapp and webserver
docker-compose up -d db server webapp
8. go to the admin Ui and import the configuration you just edited 9. run
docker-compose down
then
docker-compose up
to run all of airbyte
1
if you’re worried about halfway failures, then those should not misbehave i.e: we only keep state from successful syncs for now and in thee future we will use partial success state, but even then: state will only be saved if it was successfully saved in the destination
f
Yes in most cases it should not be a problem, but i guess it is just out of comfort and experience that is nice to be able to see/manipulate. Thank you for the guide. It is not super "clean", but fairly straight forward 🙂
s
@Frederik Hagelund out of curiosity did you end up doing the method above/did it work for you?
f
Hi @s (Airbyte) i followed the steps above, but it seems like the changes to
JOBS.yaml
is not being imported. After the last step
docker-compose up
i exported then configuration files again and it still had the old values. In the import process is there anyway to verify that is succesfull? because i do not really get any message that is uploaded
s
hey Frederick, this sounds unexpected. I’ll take a look
f
hi @s did u try this out yourself 🙂 ?