Joins in MyDBR without a foreign key

(3 posts) (2 voices)

Tags:

No tags yet.

  1. haigda, Member

    I'm trying to do a LEFT JOIN between tables in a MySQL database through Reporter but I can't use Foreign Keys as the tables are updated via Pentaho Kettle / Spoon from XML files and I don't necessarily know what order the various tqables will be updated.

    The myDBR documentation talks about using mydbr_key_column_usage when you can't use foreign keys but I can't find any information on how. Can you point me in the right direction?

    Cheers,
    David

  2. myDBR Team, Key Master

    Hi,
    if you do not have the foreign keys defined, the easiest way is simply to define the joins manually in the editor.

    There is a table mydbr_key_column_usage which you can fill to define the joins for you so you can use the automatic joins when building the query, but if you know your database structure, doing the SQL manually is usually the faster way.

    --
    myDBR Team

  3. haigda, Member

    Thanks - I had missed an index off the child table so all is fine now.

    Have a great festive season - Thanks for such a brilliant tool!

    Cheers,
    David


Reply

You must log in to post.