pat_nadolny
08/10/2022, 8:37 PM<https://download.microsoft.com/download/7/1/D/71D86715-5596-4529-9B13-DA13A5DE5B63/ServiceTags_Public_202200808.json>
. Up until now I've hardcoded the path, including the date in my configs but it looks like it fails consistently every 14 days and the date needs to be updated. To avoid making a PR every 14 days I was hoping to fill the date portion dynamically but I'm not exactly sure how to pull that off. I need to consider my github actions CI pipeline and prod environment using the meltano docker image. It feels like the solution is to use env vars. I could use env vars that I manually update every 14 days to avoid the PRs but that also isnt the best, ideally I'd like to dynamically generate the date before each run but I'm not sure the best way to do it. I could do something like what I do for dynamic start_date https://github.com/meltano/squared/blob/main/.github/workflows/test.yml#L27 but I dont know how I would expose that to a prod job/schedule. I like the idea of solving it with a tiny python script as a utility that outputs the right date so its OS agnostic and I know python better than bash, but how would it pass the output to the tap or add it to the meltano environment variables? I call the tap using jobs so maybe I could do my_date_util tap-spreadsheets-anywhere target-snowflake
, but would it be able to pass that date up to meltano env vars for use in the next plugin? I know this is hacky and I feel like thats not possible but wanted to see if others had ideas.pat_nadolny
08/10/2022, 8:38 PMchristoph
08/10/2022, 9:45 PMvisch
08/10/2022, 10:57 PMvisch
08/10/2022, 10:58 PMGet-AzNetworkServiceTag -Location eastus2
alexander_butler
08/11/2022, 2:04 AMalexander_butler
08/11/2022, 2:07 AMalexander_butler
08/11/2022, 2:10 AMpath: <https://download.microsoft.com/download/7/1/D/71D86715-5596-4529-9B13-DA13A5DE5B63/ServiceTags_Public_${MY_MELTANO_VAR}.json>
christoph
08/11/2022, 2:33 AMAnother idea. date is on Unix by default too and pretty sweet. 1 sec
Nice one! That's indeed one of the few true UNIX (POSIX)date +'%Y%m%d
date
command features!pat_nadolny
08/11/2022, 12:33 PMIf the date changes in 14 day intervals, I would hard code that 14 change into the tap, no?@christoph I was hoping to keep using tap-spreadsheets-anywhere instead of managing a custom tap. I would normally agree though, if it was a normal single source tap
pat_nadolny
08/11/2022, 12:36 PMDid a quick google, It looks like PowerShell core may have something for you@visch haha I actually found that article too! thats how I figured out where to pull the data from but that guys script still requires you to manually update the date suffix each time you run it š
visch
08/11/2022, 12:36 PMpat_nadolny
08/11/2022, 12:39 PMAnother idea. date is on Unix by default too and pretty sweet. 1 sec@alexander_butler thanks, I use jobs/schedules so I dont have the ability to add that
MY_MELTANO_VAR=..
to the beginning of my command. Maybe I could put it in my .env? I wonder if it would get evaluated properly š¤visch
08/11/2022, 12:39 PMvisch
08/11/2022, 12:41 PMvisch
08/11/2022, 12:42 PMpat_nadolny
08/11/2022, 12:48 PM=DATE(2022,7,11)+14*ROUNDDOWN((NOW()-DATE(2022,7,11))/14)
- takes current date and finds the most recent date on the 14 day update schedulevisch
08/11/2022, 12:49 PMpat_nadolny
08/11/2022, 12:50 PMchrish
09/04/2022, 1:08 PMServiceTags_Public_latest.json
. And perhaps the file could have a createdDate property so you could detect how fresh it was - if you cared...pat_nadolny
09/20/2022, 5:07 PM