---
description: Last updated Jan 29, 2025
---

# 2.2.2 - Manage Scheduling and Backfills using Postgres in Kestra

Youtube Video | \~7 min

{% embed url="https://youtu.be/_-li_z97zog?si=G6jZbkfJb3GAyqrd" %}

{% hint style="info" %}
If you stopped from the last video, be sure to restart <mark style="background-color:blue;">Docker</mark> and open <mark style="background-color:purple;">Kestra</mark>
{% endhint %}

This video does not go through writing the script, so you will need to grab it from the repo.

:exclamation:I was having issues in the next video that talks about dbt, so I updated my docker-compose.yml. ALSO have your docker-compose.yml live outside of a sub-directory and in your main directory, because you want to run the same one in each of the upcoming videos. See those files used here

{% @github-files/github-code-block url="https://github.com/Tinker0425/de-zoomcamp-my-work/tree/master/module-02/video_4" %}

I was then able to create a new server connection on <mark style="background-color:yellow;">pgAdmin</mark> using:

<figure><img src="https://3375647567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxgPnpaRKCInTeWOYlVUE%2Fuploads%2FwFvX7u116dWEgvhJ2BDd%2FScreen%20Shot%202025-01-31%20at%209.07.59%20AM.png?alt=media&#x26;token=dee40d35-ed33-48fb-ace7-24b2baaec701" alt=""><figcaption></figcaption></figure>

:exclamation:NOTE the difference between `_`and `-`

The full script provided, shows that the 'triggers' will be the first of each month and they two datasets will be loaded it an hour apart from each other.  But, how do we backfill the data from the past? Well once we have this script saved on <mark style="background-color:purple;">Kestra</mark>, we can go to the 'Triggers' tab and there is a 'Backckfill Executions' that should be highlighted in <mark style="background-color:purple;">purple</mark>. Click that:

<figure><img src="https://3375647567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxgPnpaRKCInTeWOYlVUE%2Fuploads%2FAWl2wqEIHD7YqxyHEl2l%2FScreen%20Shot%202025-01-29%20at%205.54.38%20PM.png?alt=media&#x26;token=4f67056a-0e61-4ec7-844e-212e84686f2e" alt=""><figcaption><p>Showing what elements to fill out for Backfill execution</p></figcaption></figure>

:white\_check\_mark: Once your execution is complete, you should now see the months you backfilled in <mark style="background-color:yellow;">pgAdmin</mark>

{% hint style="info" %}
Be sure to backfill a few months for BOTH yellow and green taxi to prepare for the next video
{% endhint %}

