Forums / Developer / Importing external data into Ez
Alex Muñoz
Wednesday 04 May 2011 9:29:48 am
Hi, Recently, I choosed Exponential because it has a lot of interesting features with wich I make good projects, but I don't know how to start with a project that I have: My goal is import mysql data (two tables with a lot of registers) into Exponential in order to manage them in the ez backend, but I don't know how can I do this. Could you tell how can I export external data into Exponential data base and then manage them?Thanks in advance
Jérôme Vieilledent
Wednesday 04 May 2011 9:47:56 am
Hi Alex and welcome to the Exponential community !
The first thing you need to do is to figure out how you will organize your content inside Exponential. In short, you need to organize your content tree, maybe by designing custom content classes.
Then, to import your existing data, you can use SQLIImport extension. Check out the extension documentation for more details. You will have to develop a source handler in PHP to handle your data. The easiest way to do so would be to export your MySQL tables in XML files that you can handle in your source handler. Of course, you could also directly connect to your existing database, but it could be trickier (but still possible).
Cheers !
Thursday 05 May 2011 1:21:07 am
Great!!
With this info I can start my project
Thanks a lot!!
Monday 16 May 2011 6:28:00 am
Hi again Jérôme,I'm trying your extension with an own handler in XML like the example RSSImport but it doesn't work, I'm using the "Request a new immediate import" option but when I choose an import handler (Rss or the new XML) and click in 'Request a new inmediate import" nothing happens and the screen shows:
10 25 50
No imports
I configured my handler in sqlimport.ini.append.php and I created a new class similar than sqlirssimporthandler.php, I think something in the extension doesn't work and I don't know where can I see an error log.
Could you help me?
Thanks a lot
Monday 16 May 2011 6:40:41 am
Hi Alex
Do you have error in the debug output ?
Did you install the extension DB tables ?
Monday 16 May 2011 6:59:16 am
Sorry but I don't know where can I found the output debugI didnt know about these tables, I find an sql file in sql/mysql/schema.sql folder, I suppose there are the tables, it is correct?
I'm going to try it
Thanks
Monday 16 May 2011 7:11:27 am
Yes these are the tables (as mentioned in INSTALL.txt btw ;-)).
You can activate the debug output from site.ini.append.php, or directly from the right column in the admin interface (in the Quick Settings part)
Monday 16 May 2011 9:12:35 am
I've installed the tables, it seems that works but, the import status is always Pending and 0% of progress. The debug shows messages like start and end module sqliimport and missing translations 'Debug: ezpI18n::translateText', no errors, e.g.: "Missing translation for message in context: 'extension/sqliimport/type'. The untranslated message is: 'Immediate'" I translated your extension in spanish, but I don't know why it doesn't work, because my current language into the CMS is spanish and I didn't found any .ini where I can change the extension current lang.if you want, I'll send you the translation when I know that it works fine