You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jinja is a template engine for Python and is also used by dbt to manage the codebase of SQLs.
Since we have both batch and streaming to test, in theory, the tests used for batch should also be used for streaming with proper modification. We don't want to write almost the same code(SQL) twice.
Also, for certain queries, batch and streaming modify differently in terms of the where condition, so that they can output something other than empty.
So we write some additional Jinja in SQL files as template files, and then generate the real SQLs to be tested when we want to test them.
Not necessarily Jinja, and also looking for tools other than Jinja to achieve the same goal.
The text was updated successfully, but these errors were encountered:
Another use case is to avoid abuse of include in slt file. For example, if we can support template, we no longer need to include all slt.part files in another file, which prohibits parallel execution of slt files.
Jinja is a template engine for Python and is also used by dbt to manage the codebase of SQLs.
Since we have both batch and streaming to test, in theory, the tests used for batch should also be used for streaming with proper modification. We don't want to write almost the same code(SQL) twice.
Also, for certain queries, batch and streaming modify differently in terms of thewhere
condition, so that they can output something other than empty.So we write some additional Jinja in SQL files as template files, and then generate the real SQLs to be tested when we want to test them.
Not necessarily Jinja, and also looking for tools other than Jinja to achieve the same goal.
The text was updated successfully, but these errors were encountered: