-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from shrutimantri/generate-output-file
feat: add blueprint to generate output file using Python
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
id: python-generate-output-file | ||
namespace: company.team | ||
|
||
tasks: | ||
- id: generate_output_file | ||
type: io.kestra.plugin.scripts.python.Script | ||
script: | | ||
f = open("my_file.txt", "w") | ||
f.write("This file is created using Python script in Kestra.") | ||
f.close() | ||
outputFiles: | ||
- my_file.txt | ||
|
||
- id: log_file_contents | ||
type: io.kestra.plugin.core.log.Log | ||
message: "{{ read(outputs.generate_output_file.outputFiles['my_file.txt']) }}" | ||
extend: | ||
title: Generate an output file using Python script | ||
description: >- | ||
This flow generates an output file using Python script, and then reads the same. | ||
The flow has two tasks: | ||
1. Generate an output file using Python script | ||
2. Read the generated output file and log its contents | ||
tags: | ||
- Python | ||
- Outputs | ||
ee: false | ||
demo: true | ||
meta_description: Generate an output file using Python |