Ashley Felber
12/13/2022, 7:21 PMNate
12/13/2022, 7:45 PMStitchCredentials
block and pass that into start_replication_job
,
where you could either register the block with your workspace and then create and instance of it in the UI (recommended)
in the CLI
prefect block register -m prefect_stitch.credentials
(you only have to do this once)
in your flow
from prefect_stitch.credentials import StitchCredentials
@flow
def your_flow():
stitch_creds = StitchCredentials.load("my-new-creds")
start_replication_job(credentials=stitch_creds)
or you could do everything programmatically (and keep your access token in a Secret block)
in your flow
from prefect_stitch.credentials import StitchCredentials
@flow
def your_flow():
stitch_creds = StitchCredentials(access_token=Secret.load("my-stitch-access-token"))
start_replication_job(credentials=stitch_creds)
Ashley Felber
12/13/2022, 8:22 PMNate
12/14/2022, 3:51 PMverb_and_wait_for_completion
which involves polling the status of the job that's kicked off, but I'm noticing here that the implementor may not have done so because there's no endpoint to check a replication job status that I can find, only start and stop.
This looks like a limitation of stitch, but if there's an endpoint to check job status that I'm missing, I can open an issue to add support for thatAshley Felber
12/14/2022, 11:43 PMNate
12/15/2022, 12:00 AM