Snowflake-Labs / schemachange

A Database Change Management tool for Snowflake
Apache License 2.0
481 stars 219 forks source link

citibike_jinja example doesn't work #176

Open romaain opened 1 year ago

romaain commented 1 year ago

When I try to include the create_schema.j2 i get the following error:

Traceback (most recent call last): File "/usr/local/bin/schemachange", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/site-packages/schemachange/cli.py", line 865, in main deploy_command(config) File "/usr/local/lib/python3.8/site-packages/schemachange/cli.py", line 528, in deploy_command content = jinja_processor.render(jinja_processor.relpath(script['script_full_path']), config['vars'], config['verbose']) File "/usr/local/lib/python3.8/site-packages/schemachange/cli.py", line 132, in render content = template.render(**vars).strip() File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1301, in render self.environment.handle_exception() File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 936, in handle_exception raise rewrite_traceback_stack(source=source) File "/builds/pts/data-products/bi-products/dwh/01_snowflake/schemachange/V1.3__deploy_addition_api_at.sql", line 3, in top-level template code {% extends 'create_stage.j2' %} jinja2.exceptions.TemplateNotFound: create_stage.j2

I would like to add files from modules wich are placed in a folder structure:

sfc-gh-tmathew commented 9 months ago

Hello @romaain

Thank you for raising the issue with the demo example.

Let us know if you are able to rerun the code based on the issue referred above.