Skip to content

Commit

Permalink
fixed examples
Browse files Browse the repository at this point in the history
  • Loading branch information
spicy-sauce committed Mar 13, 2024
1 parent 8414101 commit c7644e9
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 46 deletions.
48 changes: 25 additions & 23 deletions examples/test_csv_producer.dy.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
- uses: files.read_csv
input:
uses: files.read_csv
with:
file: examples/test.csv
- uses: add_field
with:
fields:
- field: full_name
language: jmespath
expression: concat([fname, ' ' , lname])
- uses: map
with:
expression:
{
first_name: fname,
last_name: lname,
country: country_code || ' - ' || UPPER(country_name),
full_name: full_name,
greeting: "'Hello ' || CASE WHEN gender = 'F' THEN 'Ms.' WHEN gender = 'M' THEN 'Mr.' ELSE 'N/A' END || ' ' || full_name"
}
language: sql
- uses: relational.write
with:
connection: hr
schema: hr
table: emp
steps:
- uses: add_field
with:
fields:
- field: full_name
language: jmespath
expression: concat([fname, ' ' , lname])
- uses: map
with:
expression:
{
first_name: fname,
last_name: lname,
country: country_code || ' - ' || UPPER(country_name),
full_name: full_name,
greeting: "'Hello ' || CASE WHEN gender = 'F' THEN 'Ms.' WHEN gender = 'M' THEN 'Mr.' ELSE 'N/A' END || ' ' || full_name"
}
language: sql
- uses: relational.write
with:
connection: hr
schema: hr
table: emp
48 changes: 25 additions & 23 deletions examples/test_redis_producer.dy.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
- uses: redis.read_stream
input:
uses: redis.read_stream
with:
connection: cache
stream_name: emp
- uses: add_field
with:
fields:
- field: full_name
language: jmespath
expression: concat([fname, ' ' , lname])
- uses: map
with:
expression:
{
first_name: fname,
last_name: lname,
country: country_code || ' - ' || UPPER(country_name),
full_name: full_name,
greeting: "'Hello ' || CASE WHEN gender = 'F' THEN 'Ms.' WHEN gender = 'M' THEN 'Mr.' ELSE 'N/A' END || ' ' || full_name"
}
language: sql
- uses: relational.write
with:
connection: hr
schema: hr
table: emp
steps:
- uses: add_field
with:
fields:
- field: full_name
language: jmespath
expression: concat([fname, ' ' , lname])
- uses: map
with:
expression:
{
first_name: fname,
last_name: lname,
country: country_code || ' - ' || UPPER(country_name),
full_name: full_name,
greeting: "'Hello ' || CASE WHEN gender = 'F' THEN 'Ms.' WHEN gender = 'M' THEN 'Mr.' ELSE 'N/A' END || ' ' || full_name"
}
language: sql
- uses: relational.write
with:
connection: hr
schema: hr
table: emp

0 comments on commit c7644e9

Please sign in to comment.