✨ Helps to convert Numbers to Words ✨
Currently supporting:
# packages.yml
packages:
- package: datnguye/dbt-translate
version: [">=1.0.0", "<1.1.0"]
OR:
# packages.yml
packages:
- git: "https://github.com/datnguye/dbt-translate.git"
revision: 1.0.0
# dbt_project.yml
vars:
num2words_schema: common_schema # by default it takes `target.schema
# dbt_project.yml / Add your conidition to hook as you go
on-run-start:
- >
{{ dbt_translate.compile_money_to_words() }}
# model_something.sql
with test as (
select 2000 as amount
union all
select 9999 as amount
)
select amount
,{{ dbt_translate.money_to_words('amount', 'en') }} as amount_in_word
from test
/*
amount amount_in_word
------ ---------------------------------------
2000 two thousand
9999 nine thousand nine hundred ninety-nine
*/
If you've ever wanted to contribute to this tool, and a great cause, feel free to create your Pull Request 💖
Check CONTRIBUTING.md for more details!