Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

can i still use a db_select(); if my source database is a non-drupal site? how can the migrate module know what database im referring? i cant see any configuration for migrate module on how to change database selection.

$query = db_select('sourcedb.brands', 'b');
$query->addField('i1', 'foreign_key', 'foreign_key');
$query->addField('i1', 'locale', 'locale');
$query->addField('i1', 'content', 'brand_description');
$query->addField('b', 'name', 'brand_name');
$query->addField('b', 'owg_id', 'owg_id');
$query->join('sourcedb.i18n', 'i1', 'i1.foreign_key = b.id');
$query->condition('i1.locale', 'spa', '=');
$query->condition('i1.model', 'Brand', '=');
$query->condition('i1.field', 'description', '=');
$query->orderBy('i1.foreign_key', 'ASC');

is the "sourcedb" in 'sourcedb.brands' a keyword in drupal? or can i replace it directly with the table name?

share|improve this question
add comment (requires an account with 50 reputation)

1 Answer

up vote 0 down vote accepted

It would probably be better if you looked at the Feeds module using the Feeds Database fetcher.

share|improve this answer
can feeds handle big data transfer? – Belmark Caday Mar 27 at 13:14
Yes it can. And it can do all the drupal-type mapping for you. – Triskelion Mar 27 at 14:21
HEy i have another problem, i cant see the list of databases in the Feeds Database module tab. check out my other question – Belmark Caday Mar 27 at 14:22
hey @triskelion check out my other question sir drupal.stackexchange.com/questions/66955/… – Belmark Caday Mar 27 at 14:35
add comment (requires an account with 50 reputation)

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.