felix_klein
04/17/2023, 3:59 PMvisch
04/17/2023, 7:42 PMfelix_klein
04/18/2023, 6:56 AMvisch
04/18/2023, 1:15 PMpat_nadolny
04/18/2023, 2:46 PMpat_nadolny
04/18/2023, 2:47 PMfelix_klein
04/19/2023, 10:25 AMfelix_klein
04/19/2023, 10:26 AMvisch
04/19/2023, 12:32 PMthe table that i'm seeing the issue with is a result of dbt so i think it is created by dbtIt's likely not a tap/target being the issue. From your initial description it sounded like it could be an activate version thing from the default target-postgres. ---- The actual error from DBT would have probably cleared most of my confusion up above just fyi for next time! https://stackoverflow.com/questions/70383118/using-dbt-and-meltano-how-can-i-prevent-multiple-dbt-job-runs-from-conflicting is one possible solution, basically don't allow a dbt job to run at the same time as another job. Locks on the DB can help you here.
felix_klein
04/19/2023, 3:02 PMFULL_TABLE
, add_metadata_columns
as well as hard_delete
, but when i delete a record in the source (tap) db and re-run meltano, those records are neither marked as deleted (_sdc_deleted_at
) nor hard-deleted - they just stay there until i delete them manually or drop the table before running meltano. I tried finding existing posts about this issue but couldn't find anything, so I guess I'm doing something wrong here?felix_klein
04/19/2023, 3:05 PMvisch
04/19/2023, 3:15 PMbut that uses a handrolled lock on the entire DB, thus my question if this is possible without that - maybe i should ask that question in the DBT community?What do you think "handrolled" lock means / does that's negative here?
seem like quite a simple thing i figured that I was doing something wrongIt's not simple, just like this isn't a quick question 😄 . dbt is really designed to be ran all together a few times a day.
Also while I'm here another question - can you tell from my meltano.yml why the deletion of records in the target db does not workAssuming you're talking about
REDACTED_JOB_1
, which refers to tap-REDACTED_TAP_3
which is pipelinewise-tap-mysql
. Also I think what you want here is for the target table to match the source table 1-1. For records to be deleted properly using purely the tap/target combo we recommend using activate_version
, note that another simple solution for full_table syncs is to just drop the target table before you load your new tap data, but that requires you to be ok with the target table being in a broken state for a period of time.
So I'm going to look at the question, "why doesn't pipelinewise-tap-mysql
with pipelinewise-target-postgres
properly use activate version to allow my source/target tables to "match". I believe pipelinewise-tap-mysql
supports activate version. I also believe pipelinewise-target-postgres supports activate_version. So it "should" be working as hard_delete
is set to true. What I think is you should debug this by running something like meltano invoke tap-redacted_tap3 > out
look at the output file for some activate_version messages. If they are there, cool! Then run you target with that data cat out | meltano invoke target-postgres
then it's debugging into why it's not happening properly. Should open a sepearte thread if you're not sure if it's a tap/target issue at this pointfelix_klein
04/19/2023, 3:34 PMWhat do you think "handrolled" lock means / does that's negative here?Sorry if that came across as negative, I didn't mean that. What I meant by "hand-rolled" is doing it via a hook and macros and then writing my own locking logic and not dbt or meltano "native" functionality. But I will look into this 🙂 About
ACTIVATE_VERSION
:
Yes those messages are indeed present in the tap output - I will continue debugging this and open a seperate issue if needed.
Thanks a lot for your help, that cleared things up for me!visch
04/19/2023, 3:35 PMSorry if that came across as negative, I didn't mean that. What I meant by "hand-rolled" is doing it via a hook and macros and then writing my own locking logic and not dbt or meltano "native" functionality. But I will look into this 🙂Totally ok, no offense taken at all just was curious if there was a technical reason you didn't like it. That reason makes sense to me Good luck with activate version! It "should" work 😄
felix_klein
04/19/2023, 3:36 PMvisch
04/19/2023, 3:36 PMfelix_klein
04/19/2023, 3:37 PM