-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update doc and license * add comments for execution * update * update * update * update * update * update unit test * update unit test * finish docs * update * update
- Loading branch information
1 parent
753d232
commit 0286228
Showing
4 changed files
with
9 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
from jinjasql import JinjaSql | ||
from jinja2 import Template | ||
from typing import Dict, Any | ||
|
||
|
||
def fill_sql_template(sql: str, params: Dict[str, Any]): | ||
sql = sql.replace("%", "%%") | ||
query, bind = JinjaSql(param_style="pyformat").prepare_query(sql, params) | ||
return query % bind | ||
template = Template(sql) | ||
return template.render(**params) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
triad>=0.3.7 | ||
adagio>=0.1.8 | ||
triad>=0.3.8 | ||
adagio>=0.2.0 | ||
sqlalchemy | ||
pyspark>=3.0.0 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters