Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add csv sanity check #161

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/test/resources/sanity-checks/csv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
id: csv_to_ion
namespace: qa

tasks:
- id: create_csv
type: io.kestra.plugin.core.http.Download
uri: https://huggingface.co/datasets/kestra/datasets/raw/main/csv/orders.csv

- id: convert_to_ion
type: io.kestra.plugin.serdes.csv.CsvToIon
from: "{{ outputs.create_csv.uri}}"

- id: assertIon
type: io.kestra.plugin.core.execution.Fail
condition: '{{ fromIon(read(outputs.convert_to_ion.uri)).order_id != "1"}}'

- id: ion_to_csv
type: io.kestra.plugin.serdes.csv.IonToCsv
from: "{{ outputs.convert_to_ion.uri }}"
25 changes: 25 additions & 0 deletions src/test/resources/sanity-checks/excel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
id: ion_to_excel
namespace: qa
variables:
sheet_title: my_sheet-123
tasks:
- id: create_csv
type: io.kestra.plugin.core.http.Download
uri: https://huggingface.co/datasets/kestra/datasets/raw/main/csv/orders.csv

- id: convert_to_ion
type: io.kestra.plugin.serdes.csv.CsvToIon
from: "{{ outputs.create_csv.uri}}"


- id: convert_to_excel
type: io.kestra.plugin.serdes.excel.IonToExcel
from: "{{ outputs.convert_to_ion.uri}}"
sheetsTitle: "{{ vars.sheet_title }}"


- id: excel_to_ion
type: io.kestra.plugin.serdes.excel.ExcelToIon
from: "{{ outputs.convert_to_excel.uri }}"
sheetsTitle:
- "{{ vars.sheet_title }}"
Loading