Skip to content

Commit

Permalink
[patch] DM_WIOT_ENTITY_LIST ==> IOTANALYTICS.DEVICE_LIST
Browse files Browse the repository at this point in the history
  • Loading branch information
pkohlmann committed Dec 13, 2024
1 parent e05c1ff commit aee1286
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iotfunctions/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1948,7 +1948,7 @@ def create_sample_data(self, drop_existing, generate_days, generate_entities=Non
logger.debug(response)

def populate_entity_list_table(self):
entity_list_table_name = 'dm_wiot_entity_list'
entity_list_table_name = 'device_list'
try:
if self.db.db_type == 'db2':
entity_list_table_name = entity_list_table_name.upper()
Expand All @@ -1958,15 +1958,15 @@ def populate_entity_list_table(self):
entities = [str(self._start_entity_id + x) for x in list(range(self._auto_entity_count))]

self.db.start_session()
table = self.db.get_table(entity_list_table_name, self._db_schema)
table = self.db.get_table(entity_list_table_name, "IOTANALYTICS")
for entity_id in entities:
stmt = table.insert().values({'entity_type_id': self._entity_type_id, 'entity_id': entity_id})
self.db.connection.execute(stmt)
self.db.commit()

except Exception as e:
logger.exception(e)
logger.debug('Error populating dm_wiot_entity_list table.')
logger.debug('Error populating device_list table.')

def register(self, publish_kpis=False, raise_error=False, sample_entity_type=False):
"""
Expand Down

0 comments on commit aee1286

Please sign in to comment.