douwe_maan
05/04/2020, 9:16 PMmeltano schedule , running meltano install orchestrator gitlab-ci-scheduler (which will add .gitlab-ci.yml and 4 files under orchestrate), and pushing up to GitLab!douwe_maan
05/04/2020, 9:18 PMtom_elliff
09/15/2020, 10:51 AMmeltano etl ... to be able to fetch the data I wanted without needing to run Meltano as a long lived thing or use Airflow as a scheduler.
I did notice that the most recent state for a job seems to be stored in the database though and is only written out as a state.json file when running the next meltano etl command so I don't see how I could do this without extracting data since the job before the last one?
Or is this only the case for the first run?tom_elliff
09/15/2020, 10:58 AMmeltano etl ... in another terminal and noticed that it said it was using the state from yesterday:
meltano | Running extract & load...
meltano | Found state from 2020-09-14 15:15:05.539318.
but there wasn't a state.json file before as you can see from the file timestamp.
Also it still seemed to do a complete extraction for most of the tables as you can see from the output I have now:
tom@tom-cloudnc-laptop:~/git/meltano-projects/gitlab-metrics$ ll output -h
total 296M
drwxrwxr-x 2 tom tom 4.0K Sep 15 11:51 ./
drwxrwxr-x 12 tom tom 4.0K Sep 14 17:27 ../
-rw-rw-r-- 1 tom tom 312K Sep 14 17:06 branches-20200914T161507.jsonl
-rw-rw-r-- 1 tom tom 314K Sep 15 11:51 branches-20200915T112405.jsonl
-rw-rw-r-- 1 tom tom 4.4M Sep 14 17:06 commits-20200914T161507.jsonl
-rw-rw-r-- 1 tom tom 8.6K Sep 15 11:51 commits-20200915T112405.jsonl
-rw-rw-r-- 1 tom tom 75K Sep 14 16:41 issues-20200914T161507.jsonl
-rw-rw-r-- 1 tom tom 4.0K Sep 15 11:37 issues-20200915T112405.jsonl
-rw-rw-r-- 1 tom tom 155M Sep 14 17:06 jobs-20200914T161507.jsonl
-rw-rw-r-- 1 tom tom 118M Sep 15 11:51 jobs-20200915T112405.jsonl
-rw-rw-r-- 1 tom tom 3.4M Sep 14 17:06 merge_requests-20200914T161507.jsonl
-rw-rw-r-- 1 tom tom 33K Sep 15 11:51 merge_requests-20200915T112405.jsonl
-rw-rw-r-- 1 tom tom 4.3M Sep 14 17:13 pipelines-20200914T161507.jsonl
-rw-rw-r-- 1 tom tom 12K Sep 15 11:51 pipelines-20200915T112405.jsonl
-rw-rw-r-- 1 tom tom 9.4M Sep 14 17:13 pipelines_extended-20200914T161507.jsonl
-rw-rw-r-- 1 tom tom 27K Sep 15 11:51 pipelines_extended-20200915T112405.jsonl
-rw-rw-r-- 1 tom tom 9.2K Sep 14 17:06 project_labels-20200914T161507.jsonl
-rw-rw-r-- 1 tom tom 9.2K Sep 15 11:51 project_labels-20200915T112405.jsonl
-rw-rw-r-- 1 tom tom 512 Sep 14 16:41 project_members-20200914T161507.jsonl
-rw-rw-r-- 1 tom tom 512 Sep 15 11:37 project_members-20200915T112405.jsonl
-rw-rw-r-- 1 tom tom 3.2K Sep 14 17:06 project_milestones-20200914T161507.jsonl
-rw-rw-r-- 1 tom tom 3.2K Sep 15 11:51 project_milestones-20200915T112405.jsonl
-rw-rw-r-- 1 tom tom 3.2K Sep 14 17:13 projects-20200914T161507.jsonl
-rw-rw-r-- 1 tom tom 3.2K Sep 15 11:51 projects-20200915T112405.jsonl
-rw-rw-r-- 1 tom tom 624K Sep 14 17:06 releases-20200914T161507.jsonl
-rw-rw-r-- 1 tom tom 625K Sep 15 11:51 releases-20200915T112405.jsonl
-rw-rw-r-- 1 tom tom 146K Sep 14 17:06 tags-20200914T161507.jsonl
-rw-rw-r-- 1 tom tom 146K Sep 15 11:51 tags-20200915T112405.jsonl
-rw-rw-r-- 1 tom tom 14K Sep 14 16:41 users-20200914T161507.jsonl
-rw-rw-r-- 1 tom tom 14K Sep 15 11:37 users-20200915T112405.jsonltom_elliff
09/15/2020, 11:02 AMjulian_knight
09/15/2020, 1:51 PM.meltano directory between jobs?tom_elliff
09/15/2020, 2:05 PMtom_elliff
09/15/2020, 2:07 PMjobs endpoint in that rerunning it seems to track back a long way past the last run but not all the waydouwe_maan
09/15/2020, 2:51 PMdouwe_maan
09/15/2020, 2:54 PMI did notice that the most recent state for a job seems to be stored in the database though and is only written out as aYep, that's right.file when running the nextstate.jsoncommandmeltano etl
so I don't see how I could do this without extracting data since the job before the last one?If you don't want to use the last run's state, you can use a different job ID, or pass the
--full-refresh flag: https://meltano.com/docs/command-line-interface.html#elt
Or is this only the case for the first run?On every
meltano elt run, it'll look for state matching the Job IDdouwe_maan
09/15/2020, 2:55 PMAm I misunderstanding how the state stuff is meant to work with Singer taps? My end goal is to push this data into S3 and search it with Athena so I was hoping to be have this just run regularly and only output updates since the last run.That should work, as long as each
meltano elt run has access to the system database, which stores the state: https://meltano.com/docs/project.html#system-database That'd mean either persisting .meltano/meltano.db between runs (using CI artifacts, as in my example repo), or using an external Postgres system DBdouwe_maan
09/15/2020, 2:56 PMis there something I can read about singer tap state handling? Because I'm confused by the inconsistent behaviour of the outputs for different endpoints in the Gitlab tap where some things seem to be incremental and others aren't at all and are full dumps.This may be because of a limitation in GitLab's API. Which specific entities/endpoints are you seeing always doing a full refresh?
There's also some oddness happening with theThis is due to a limitation in the GitLab API: https://gitlab.com/meltano/tap-gitlab/-/blob/master/tap_gitlab/__init__.py#L327endpoint in that rerunning it seems to track back a long way past the last run but not all the wayjobs
tom_elliff
09/15/2020, 5:05 PMcreated job which was months ago because it was blocked by a manual job (a deployment that then would have triggered some smoke tests automatically after the deployment completed) so that's why I see it fetching pretty much all of the jobs.douwe_maan
09/15/2020, 5:06 PMdouwe_maan
09/15/2020, 5:06 PMtom_elliff
09/15/2020, 5:06 PMtom_elliff
09/15/2020, 5:07 PMdouwe_maan
09/15/2020, 5:07 PMdouwe_maan
09/15/2020, 5:07 PMkey_propertiesdouwe_maan
09/15/2020, 5:08 PMtom_elliff
09/15/2020, 5:08 PMtom_elliff
09/15/2020, 5:09 PMkey_properties - I'll look into that some more and have a think about how my pipeline needs to work thendouwe_maan
09/15/2020, 5:09 PMdouwe_maan
09/15/2020, 5:09 PMdouwe_maan
09/15/2020, 5:11 PMtom_elliff
09/15/2020, 5:11 PMdouwe_maan
09/15/2020, 5:11 PMtom_elliff
09/15/2020, 5:12 PMtom_elliff
09/15/2020, 5:12 PMdouwe_maan
09/15/2020, 5:12 PMtom_elliff
09/15/2020, 5:13 PMtom_elliff
09/15/2020, 5:15 PMofer_kulka
12/03/2020, 3:41 PM