Skip to content

Commit

Permalink
[fix] ordering test to idempotend results
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben8t committed Jan 23, 2025
1 parent 85b21e5 commit 35296b0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions sanitychecks/flows/dlt_duckdb.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
id: dlt_duckdb
namespace: qa
id: dlt_duckdb_python
namespace: company.team

tasks:

Expand All @@ -20,6 +20,7 @@ tasks:
response.raise_for_status()
data.append(response.json())
# Extract, normalize, and load the data
print(data)
pipeline.run(data, table_name='product')
extension: .py

Expand Down Expand Up @@ -49,12 +50,12 @@ tasks:
data.duckdb: "{{ outputs.product_api_to_duckdb.outputFiles['product_pipeline.duckdb']}}"
sql: |
ATTACH '{{workingDir}}/data.duckdb' AS data;
SELECT category, SUM(price) AS sum_price FROM data.product_data.product GROUP BY 1;
SELECT category, SUM(price) AS sum_price FROM data.product_data.product GROUP BY 1 ORDER BY 2;
fetchType: STORE

- id: assert
type: io.kestra.plugin.core.execution.Assert
conditions:
- "{{ fromIon(read(outputs.duckdb['uri'])).category == 'home-decoration' }}"
- "{{ fromIon(read(outputs.duckdb['uri'])).sum_price == 194.95000000000002 }}"
- "{{ fromIon(read(outputs.duckdb['uri'])).category == 'kitchen-accessories' }}"
- "{{ fromIon(read(outputs.duckdb['uri'])).sum_price == 13.98 }}"

0 comments on commit 35296b0

Please sign in to comment.