Skip to content

Commit

Permalink
Docs: Adding clarification to using cron syntax for source refreshes (#…
Browse files Browse the repository at this point in the history
…3681)

* Adding clarification to using cron syntax for source refreshes

* cleaning typos
  • Loading branch information
AndrewRTsao authored Dec 12, 2023
1 parent cc80c08 commit b532253
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion docs/docs/deploy/source-refresh.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ refresh:
every: 24h
```
Similarly, if you would like to utilize cron syntax, the following example would update a source every 15 minutes:
```yaml
refresh:
cron: '*/15 * * * *'
```
:::tip Source settings
For more details about available source configurations and properties, check our [Source YAML](../reference/project-files/sources) reference page.
Expand All @@ -28,13 +35,20 @@ For more details about available source configurations and properties, check our
You can also specify a project-wide refresh schedule that will apply to all sources by default. This can be done through the `rill.yaml` file. More details can be found [here](../reference/project-files/rill-yaml.md#project-wide-defaults).

Using the same example as above:
Using the same example as above, the following sets a project-wide default of refreshing sources every 24 hours:
```yaml
sources:
refresh:
every: 24h
```

Similarly, the following would use cron syntax to set a project-wide configuration of refreshing sources by default every 15 minutes (unless overridden at the individual source level):
```yaml
sources:
refresh:
cron: '*/15 * * * *'
```

:::info Did you know?

If you have both a project-wide default and source specific refresh schedule configured in the same project, the source specific refresh will override the project default. Otherwise, the schedule will be inherited!
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/reference/project-files/sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ In your Rill project directory, create a `<source_name>.yaml` file in the `sourc
— The maximum time to wait for souce ingestion.

**`refresh`** - Optionally specify a schedule after which Rill should re-ingest the source
- **`cron`** - a cron schedule expression (optional)
- **`cron`** - a cron schedule expression, which should be encapsulated in single quotes e.g. `'* * * * *'` (optional)
- **`every`** - a Go duration string, such as `24h` ([docs](https://pkg.go.dev/time#ParseDuration)) (optional)

**`extract`** - Optionally limit the data ingested from remote sources (S3/GCS only)
Expand Down

1 comment on commit b532253

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://ui.rilldata.com as production
🚀 Deployed on https://657aca99b9404b012fc2935a--rill-ui.netlify.app

Please sign in to comment.