Skip to content

Commit

Permalink
Linting and changed to TempMatch.create_table()
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Way committed Aug 3, 2024
1 parent fe95396 commit 85c9d64
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,12 @@ def match_in_table(self, name, split=False, min_targetid=0, max_targetid=0):
# already in sdss_id_flat

if self.outer_join_sdss_id:
cte_targetids = (cte_targetids.join(target_selection.sdss_id.SdssIdFlat, join_type=JOIN.LEFT_OUTER,
on=(rel_table.catalogid == target_selection.sdss_id.SdssIdFlat.catalogid))
.where(target_selection.sdss_id.SdssIdFlat.catalogid.is_null()))
cte_targetids = (cte_targetids.join(target_selection.sdss_id.SdssIdFlat,
join_type=JOIN.LEFT_OUTER,
on=(rel_table.catalogid ==
target_selection.sdss_id.SdssIdFlat.catalogid))
.where(target_selection.sdss_id.SdssIdFlat
.catalogid.is_null()))

cte_targetids = cte_targetids.cte('cte_targets')

Expand Down Expand Up @@ -415,7 +418,8 @@ def run(self, starting_table=None):
self.database.drop_tables([TempMatch])
self.log.info(f'Dropped table {TempMatch._meta.table_name}')

self.database.create_tables([TempMatch])
# self.database.create_tables([TempMatch])
TempMatch.create_table()
self.log.info(f'Created table {TempMatch._meta.table_name}')

for curr_table in tables_to_process:
Expand Down

0 comments on commit 85c9d64

Please sign in to comment.