Search code examples
mysqltalend

How to select all field in all tables from a MySQL in talend


I am looking for a way to select a full MySQL database in talend and use it as source to generate an XML.

Currently I'm trying with the tMysqlInput component but I can only select individual table. I've 10+ table and I want to rebuilt my data with several tMap. So I'm looking for a component or way to get the full database in one shot.

Thanks in advance for your help!


Solution

  • I would say that you need one tMysqlInput per table. That's the Talend logic.

    What I suggest you to do :

    1. Retrieve all table schemas using Talend
    2. Drag & Drop the created schema to the Talend Designer and select tMysqlInput
    3. Your newly tMysqlInput should already be set to use the corresponding schema (repository mode)
    4. If you press "Guess query" in the tMysqlInput settings, it will list all columns

    Depending on what you are trying to achieve, take a look at the tMysqlTableList https://help.talend.com/display/TalendOpenStudioComponentsReferenceGuide521EN/7.65+tMysqlTableList

    EDIT

    Talend can make JOINs directly in the tMap component. A good example can be found here : http://techblog.appirio.com/2009/12/performing-lookups-and-transformations.html