Skip to content

Commit

Permalink
Refactor get_payment_type_description macro to use switch statement
Browse files Browse the repository at this point in the history
  • Loading branch information
dell-datascience committed Aug 31, 2024
1 parent 11275c5 commit 90796e4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions docs/4_analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -941,24 +941,7 @@ models:
4. Define the macros at `macros/get_payment_type_description.sql`

```sql
{#
This macro returns the description of the payment_type
#}
{% `macro` get_payment_type_description(payment_type) -%}

case {{ payment_type }}
when 1 then 'Credit card'
when 2 then 'Cash'
when 3 then 'No charge'
when 4 then 'Dispute'
when 5 then 'Unknown'
when 6 then 'Voided trip'
end

{%- endmacro %}
```
![alt text](../images/image-143.png)

5. define the variables at `dbt_project.yml`

Expand Down
Binary file added images/image-143.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 90796e4

Please sign in to comment.