> For the complete documentation index, see [llms.txt](https://data-engineering-zoomcamp-2025-t.gitbook.io/tinker0425/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://data-engineering-zoomcamp-2025-t.gitbook.io/tinker0425/module-2/2.2-etl-pipelines-in-kestra-detailed-walkthrough/2.2.2-manage-scheduling-and-backfills-using-postgres-in-kestra.md).

# 2.2.2 - Manage Scheduling and Backfills using Postgres in Kestra

Last updated Jan 29, 2025

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&amp;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&amp;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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://data-engineering-zoomcamp-2025-t.gitbook.io/tinker0425/module-2/2.2-etl-pipelines-in-kestra-detailed-walkthrough/2.2.2-manage-scheduling-and-backfills-using-postgres-in-kestra.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
