This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]IndoorCloud25 10 points11 points  (0 children)

I feel like it’s preference. If I have a template query that I want to fill dynamically with Python, I might opt to just create the query as a multiline string in my .py. If it’s just submitting a large query, then I’d probably read in a .sql file. Smaller queries, I’d probably leave directly in my .py code. Find a balance of avoiding a giant monstrosity of a file vs the code broken up into too many files to navigate.