Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change State using the UI #3092

Closed
Fredehagelund92 opened this issue Apr 27, 2021 · 10 comments
Closed

Change State using the UI #3092

Fredehagelund92 opened this issue Apr 27, 2021 · 10 comments
Assignees
Labels
autoteam community team/tse Technical Support Engineers team/use type/enhancement New feature or request

Comments

@Fredehagelund92
Copy link

Fredehagelund92 commented Apr 27, 2021

Tell us about the problem you're trying to solve

As a Data Engineer i am used to having control on all parts of the extract/ingest process. However in Airbyte i am missing a feature to manipulate or manual set the state. In some cases you might be working with legacy systems that produce data in the wrong order, which might invalidate the state if the sync happen during this phase.

Another case is that maybe you do not want to extract all the data from the beginning. Maybe the source has so much data that you only want the data from current date and then incremental from there. An argument could be to just create a configcalled start_date and it is then handled by the source, but forces the creator of a source to think about every specific use-case.

Describe the solution you’d like

I'd like to be able to change the state using the UI. From a UI perspective it could be added to the Connection settings page. In the source schemas table we could add another column, just like Sync settings that contain the current state of that schema.

Describe the alternative you’ve considered or used

Export the airbyte configuration file and make your changes to airbyte_db/JOBS.yaml. Then upload the airbyte configuration using the UI. Not the cleanest, but it works.

Additional context

┆Issue is synchronized with this Asana task by Unito

@Fredehagelund92 Fredehagelund92 added the type/enhancement New feature or request label Apr 27, 2021
@michel-tricot
Copy link
Contributor

That's a great idea. I wonder if we could display this information in the connections settings page.

@michel-tricot michel-tricot added this to the Core - 2021-05-07 milestone Apr 27, 2021
@sherifnada
Copy link
Contributor

sherifnada commented Apr 28, 2021

for context the answer I gave Fred in slack:

  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.
    you should see a state object like so
config:
    sync:
      state:
        state:

update the values in that object to match what you want

  1. tar the entire directory
  2. turn on airbyte webapp and webserver docker-compose up -d db server webapp
  3. go to the admin Ui and import the configuration you just edited
  4. run docker-compose down then docker-compose up to run all of airbyte

Not endorsing it, just putting it here in case someone sees this issue before we get around to doing it.

@cgardens cgardens removed this from the Core - 2021-05-07 milestone May 3, 2021
@phamduyly
Copy link

Hi all, have anyone tried this.
I have one concern, how do you define successful job? for example, if I am syncing a 80 mil records, the min incremental value is 1970-01-01, but I only want to extract from 2018-01-01. Then how can I do it?
Thank you.

@marcosmarxm
Copy link
Member

@phamduyly did you try doing this? If you need some help let me know

@Phlair
Copy link
Contributor

Phlair commented Sep 15, 2021

just adding a relevant slack thread to this issue for reference, with slightly revised steps based on Sherif's comment (tested on 0.29.17-alpha)

@miguel-fresh
Copy link

Hi @sherifnada , I'm trying to do what You've explained

for context the answer I gave Fred in slack:

  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.
    you should see a state object like so
config:
    sync:
      state:
        state:

update the values in that object to match what you want

  1. tar the entire directory
  2. turn on airbyte webapp and webserver docker-compose up -d db server webapp
  3. go to the admin Ui and import the configuration you just edited
  4. run docker-compose down then docker-compose up to run all of airbyte

Not endorsing it, just putting it here in case someone sees this issue before we get around to doing it.

But when I extract files from Airbyte's .gz exported config I get a single file, not a directory:
airbyte_config_doubt

Has something changed since last year or am I doing something wrong? thanks in advance!

@bleonard bleonard added autoteam team/tse Technical Support Engineers labels Apr 26, 2022
@evantahler
Copy link
Contributor

evantahler commented May 31, 2022

From backlog grooming: Timebox this to a few days. Make CRUD apis to view and set state, show in the I with lots of danger warnings.

Requirements:

  • read only view of the connection state in the UI

Options, if there's time:

  1. Allow writing to the state
  2. Don't allow editing when a sync is running.
  3. hide on cloud
  4. validate the state

@evantahler evantahler self-assigned this Jun 1, 2022
@evantahler evantahler linked a pull request Jun 1, 2022 that will close this issue
@evantahler
Copy link
Contributor

evantahler commented Jun 1, 2022

Working on adding STATE to the UI in #13394, but we won't allow editing quite yet

@evantahler
Copy link
Contributor

cc @erohmensing - I think our 'copy state' feature will address this

@evantahler evantahler assigned erohmensing and unassigned evantahler Aug 1, 2023
@nataliekwong
Copy link
Contributor

Hi there, Airbyte now allows editing of the connection state in the UI! I will close the issue now that this is resolved. Feel free to comment if you feel it should be re-opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autoteam community team/tse Technical Support Engineers team/use type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests