Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update sql_implementation.py to include sqlachemy output in debug log…
…ging. (#782) * Update sql_implementation.py to include sqlachemy output in debug logging. The current logging scheme directly prints the query as rendered by str(q); the following is the output from logging.info(f"ECA query: {q}") in function _equivalent_class_relationships. INFO:root:ECA query: SELECT statements.subject AS statements_subject, statements.predicate AS statements_predicate, statements.object AS statements_object FROM statements WHERE statements.predicate = ? AND statements.object IN (__[POSTCOMPILE_object_1]) AND statements.object IN (SELECT class_node.id FROM class_node) With this change, when running at logging level DEBUG, anytime a query is executed sqlachemy will also writes it's logging output, which is the following: INFO:sqlalchemy.engine.Engine:SELECT statements.subject AS statements_subject, statements.predicate AS statements_predicate, statements.object AS statements_object FROM statements WHERE statements.predicate = ? AND statements.object IN (?) AND statements.object IN (SELECT class_node.id FROM class_node) INFO:sqlalchemy.engine.Engine:[generated in 0.00023s] ('owl:equivalentClass', 'MONDO:0000550') In the Sqlalchemy logging, the ambiguous term "(__[POSTCOMPILE_object_1])" isn't stated and instead replaced with a query parameter, and the query parameters are outputted on a second line. * Update sql_implementation.py Corrected lint errors
- Loading branch information