Skip to main content

Import data from a mySQL database

Hi,
 
I have loaded in a large amount of data into a mySQL database that I would like to also query from IDEA. I am new to IDEAScripting and would therefore like some assistance on how I could write an IDEAScript that will connect to the mySQL database and import all the tables into IDEA. Any suggestions?
 
 
Many thanks,
 
M

Brian Element Sun, 11/26/2017 - 19:01

Hi MA and welcome to the site.

If you want to make a direct connect you would need to have ODBC drivers for mySQL so that IDEA could connect.  An easier way might be to go into your SQL manager and see if you can download the information as a text file and bring it into IDEA.

Thanks

Brian

MA Mon, 11/27/2017 - 06:03

Hi Brian,
Many thanks for your response. I have checked and I do have the mySQL ODBC drivers installed on my machine. How would I write a script to connect to my database with these drivers?
Thanks also for your alternative option. The raw data I am trying to import is already in flat file form however I wanted to connect to it via mySQL to avoid having two separate instances of the same data.
 
Much appreciated,
 
MA

MA Mon, 11/27/2017 - 06:33

Sorry Brian, I have realised you can connect via the ODBC from the IDEA Import manager - there is no need for an IDEAScript!
Thanks,
 
MA

Brian Element Mon, 11/27/2017 - 08:07

In reply to by MA

Hi MA,

No you don't need a script for this.  You can include it in a script if you want to do something else with the information once it is imported. 

Good luck with your project.

Brian

The website encountered an unexpected error. Try again later.