-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
root
committed
Apr 18, 2024
1 parent
e80ded8
commit 48b32b2
Showing
20 changed files
with
215 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
id: docker_example | ||
namespace: blueprints | ||
|
||
tasks: | ||
- id: download | ||
type: io.kestra.plugin.fs.http.Download | ||
uri: https://huggingface.co/datasets/kestra/datasets/raw/main/csv/orders.csv | ||
|
||
- id: docker | ||
type: io.kestra.plugin.scripts.shell.Commands | ||
inputFiles: | ||
data.csv: "{{ outputs.download.uri }}" | ||
docker: | ||
image: ubuntu:latest | ||
commands: | ||
- tail -n +2 data.csv | wc -l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
id: hubspot_to_bigquery | ||
namespace: blueprints | ||
|
||
tasks: | ||
- id: sync | ||
type: io.kestra.plugin.cloudquery.Sync | ||
inputFiles: | ||
sa.json: "{{ secret('GCP_SERVICE_ACCOUNT') }}" | ||
env: | ||
HUBSPOT_APP_TOKEN: "{{ secret('HUBSPOT_API_TOKEN') }}" | ||
GOOGLE_APPLICATION_CREDENTIALS: sa.json | ||
configs: | ||
- kind: destination | ||
spec: | ||
name: bigquery | ||
path: cloudquery/bigquery | ||
registry: cloudquery | ||
version: "v3.3.16" | ||
write_mode: "append" | ||
spec: | ||
project_id: kestra-prd | ||
dataset_id: hubspot | ||
- kind: source | ||
spec: | ||
name: hubspot | ||
path: cloudquery/hubspot | ||
registry: cloudquery | ||
version: "v3.0.18" | ||
destinations: | ||
- "bigquery" | ||
tables: | ||
- "*" | ||
spec: | ||
max_requests_per_second: 5 | ||
|
||
triggers: | ||
- id: schedule | ||
type: io.kestra.core.models.triggers.types.Schedule | ||
cron: 0 6 * * * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
id: sqlmesh | ||
namespace: blueprint | ||
description: Clone SQLMesh project and run the project, and query with DuckDB | ||
tasks: | ||
|
||
- id: working_dir | ||
type: io.kestra.core.tasks.flows.WorkingDirectory | ||
tasks: | ||
- id: git_clone | ||
type: io.kestra.plugin.git.Clone | ||
url: https://github.com/TobikoData/sqlmesh-examples.git | ||
branch: main | ||
|
||
- id: sqlmesh | ||
type: io.kestra.plugin.sqlmesh.cli.SQLMeshCLI | ||
beforeCommands: | ||
- cd 001_sushi/1_simple | ||
commands: | ||
- sqlmesh plan --auto-apply | ||
outputFiles: | ||
- '001_sushi/1_simple/db/sushi-example.db' | ||
- id: query | ||
type: io.kestra.plugin.jdbc.duckdb.Query | ||
inputFiles: | ||
data.db: "{{ outputs.sqlmesh.outputFiles['001_sushi/1_simple/db/sushi-example.db'] | ||
}}" | ||
sql: | | ||
ATTACH '{{workingDir }}/data.db'; | ||
SELECT * FROM sushisimple.top_waiters; | ||
store: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
id: orchestrate_everything | ||
namespace: blueprints | ||
|
||
inputs: | ||
- id: use_case | ||
description: What do you want to orchestrate? | ||
type: ENUM | ||
defaults: Data pipelines | ||
values: | ||
- Data pipelines | ||
- Microservices | ||
- Business processes | ||
- Marketing automation | ||
tasks: | ||
- id: conditional_branching | ||
type: io.kestra.core.tasks.flows.Switch | ||
value: "{{ inputs.use_case }}" | ||
cases: | ||
Data pipelines: | ||
- id: data_pipelines | ||
type: io.kestra.core.tasks.log.Log | ||
message: Managing important data products | ||
|
||
Microservices: | ||
- id: microservices | ||
type: io.kestra.core.tasks.log.Log | ||
message: Orchestrating critical applications | ||
|
||
Business processes: | ||
- id: business_processes | ||
type: io.kestra.core.tasks.log.Log | ||
message: Orchestrating critical applications | ||
|
||
Marketing automation: | ||
- id: marketing_automation | ||
type: io.kestra.core.tasks.log.Log | ||
message: Orchestrating critical applications |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
id: http_check | ||
namespace: dev | ||
|
||
inputs: | ||
- id: uri | ||
type: URI | ||
defaults: https://kestra.io | ||
|
||
tasks: | ||
- id: api | ||
type: io.kestra.plugin.fs.http.Request | ||
uri: "{{ inputs.uri }}" | ||
|
||
- id: check_status | ||
type: io.kestra.core.tasks.flows.If | ||
condition: "{{ outputs.api.code != 200 }}" | ||
then: | ||
- id: unhealthy | ||
type: io.kestra.core.tasks.log.Log | ||
message: Server unhealthy!!! Response {{ outputs.api.body }} | ||
- id: send_slack_alert | ||
type: io.kestra.plugin.notifications.slack.SlackIncomingWebhook | ||
url: "{{ secret('SLACK_WEBHOOK') }}" | ||
payload: | | ||
{ | ||
"channel": "#alerts", | ||
"text": "The server {{ inputs.uri }} is down!" | ||
} | ||
else: | ||
- id: healthy | ||
type: io.kestra.core.tasks.log.Log | ||
message: Everything is fine! | ||
|
||
triggers: | ||
- id: daily | ||
type: io.kestra.core.models.triggers.types.Schedule | ||
cron: "0 9 * * *" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.