How to import all tables in a mysql database

Hi,

 

Our use case is that we have a mysql database with about 200 tables in, one for each event that we track. We would like to mirror those tables in domo.

 

We have been able to do this with individual tables, by simply setting up the datasource in the GUI with 'select * from event_table_1 where timestamp > curdate()' and setting it to append every day. This loads in the previous day's data once a day, which is satisfactory for us.

 

What would be the best way to set up 200 tables like this, though? Clearly we don't want to go through manually and set them all up. On the other hand, the DataSet api doesn't look right, because we want to push the data through the api, we just want to set up datasources, configured with sql commands to execute against our mysql data, as we can in the GUI. We also don't want to have to specify a schema - we want this to be figured out automatically and to get updated when we add new columns to a table. Our current 'select *' command works fine for this.

 

So short question - how to set up multiple imports from a mysql database programatically?

 

Many thanks for your help!

Comments