moj-analytical-services / pydbtools

Python version of dbtools
https://moj-analytical-services.github.io/pydbtools/
11 stars 2 forks source link

CCDE-295: Allow CREATE TEMP TABLE query to be ran from a SQL file #52

Open isichei opened 2 years ago

isichei commented 2 years ago

At the moment pydbtools has a create_temp_table method. It would be useful to allow users to do this via an SQL file.

CREATE TEMPORARY TABLE <table name> AS (
  <normal SQL query>
)

Would then trigger:

pydb.create_temp_table(sql="<normal SQL query>", table_name = "<table name>")
mratford commented 2 years ago

https://github.com/moj-analytical-services/pydbtools/pull/60