diff --git a/idc_index/index.py b/idc_index/index.py index 8b47d9a6..c183403b 100644 --- a/idc_index/index.py +++ b/idc_index/index.py @@ -1777,4 +1777,11 @@ def sql_query(self, sql_query): """ index = self.index + # TODO: find a more elegant way to automate the following: https://www.perplexity.ai/search/write-python-code-that-iterate-XY9ppywbQFSRnOpgbwx_uQ + if hasattr(self, "sm_index"): + sm_index = self.sm_index + if hasattr(self, "sm_instance_index"): + sm_instance_index = self.sm_instance_index + if hasattr(self, "clinical_index"): + clinical_index = self.clinical_index return duckdb.query(sql_query).to_df()