cytomining / cytomining/CytoTable
Explore the use of symbolic SQL builder for query generation and implementation
- Dominant language
- Python
- Stars
- 21
- Forks
- 6
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 6
Description
CytoTable currently implements string replacements for dynamic SQL query capabilities involved with data extraction, transformation, and joins. Using these methods circumvents built-in methods intended to help cleanse strings with regards to SQL injection security ([see here](https://bandit.readthedocs.io/en/latest/plugins/b608_hardcoded_sql_expressions.html)) and also may lose static analysis aspects where Pythonic implementations could catch errors (SQL portions of code are not currently linted, for example).
This issue highlights the need to explore how Pythonic SQL "builders" may be used to symbolically create SQL statements used by CytoTable. When composing SQL in this way it allows for injection protection and static analysis through the use of Pythonic object API's. Examples include: [SQLAlchemy's SQL statement and expression API ](https://docs.sqlalchemy.org/en/20/core/expression_api.html) and the [Ibis Project](https://ibis-project.org/).
Issue stems from related discussion on this topic with @falquaddoomi.
Contributor guide
Assessment
This issue has not been assessed yet.