Views relationship to second database
I was logged out. Yes I tried to add field relationship on views settings, but my joined table was not shown. Consider that I want to join from a view showing my table to the users_field_data table, not vice versa.

my view is simply showing the the fields from my custom table. This works. But I can't add a relationship to the second db.
The SQL query is

SELECT my_tracking.id AS id, my_tracking.uid AS my_tracking_uid, my_tracking.event_id AS my_tracking_event_id
FROM {my_tracking} my_tracking
ORDER BY id ASC
LIMIT 25 OFFSET 0


my hook_views_data looks like

$data['my_tracking']['table']['name'] = 'event_tracking' . '.my_tracking';

$data['my_tracking']['table']['group'] = t('Event Tracker');

$data['my_tracking']['table']['base'] = array(
  'field' =&gt; 'id',
  'title' =&gt; t('Event Tracker'),
  'help'  =&gt; t('Contains data about tracking events.'),
  'database' =&gt; 'event_tracking',
);

$data['my_tracking']['table']['join'] = array(
  'users_field_data' =&gt; array(
    'table' =&gt; 'default' . '.users_field_data',
    'left_field' =&gt; 'uid',
    'field'      =&gt; 'uid',
  ),
);

$data['my_tracking']['table']['provider'] = 'my_tracking';


$data['my_tracking']['id'] = array(
  'title' =&gt; t('Record ID'),
  'field' =&gt; array(
    'id' =&gt; 'numeric',
  ),
  'sort' =&gt; array(
    'id' =&gt; 'standard',
  ),
  'filter' =&gt; array(
    'title' =&gt; t('Record ID'),
    'id' =&gt; 'numeric',
  ),
  'argument' =&gt; array(
    'id' =&gt; 'numberic',
  ),
);

$data['my_tracking']['uid'] = array(
  'title' =&gt; t('UID'),
  'help'  =&gt; t("The user's UID."),
  'field' =&gt; array(
    'id' =&gt; 'numeric',
  ),
  'sort' =&gt; array(
    'id' =&gt; 'standard',
  ),
  'filter' =&gt; array(
    'title' =&gt; t('UID'),
    'id' =&gt; 'numeric',
  ),
  /*  'relationship' =&gt; array(
    'title'              =&gt; t('User who is tracked'),
    'help'               =&gt; t('The user associated with the record.'),
    'id'                 =&gt; 'standard',
    'base'               =&gt; 'users_field_data',
    'base field'         =&gt; 'uid',
    'field'              =&gt; 'uid',
    'label'              =&gt; t('The who is tracked'),
  ),*/
  'argument' =&gt; array(
    'id' =&gt; 'numeric',
  ),
);

$data['my_tracking']['event_id'] = array(
  'title' =&gt; t('Event ID'),
  'field' =&gt; array(
    'id' =&gt; 'numeric',
  ),
  'sort' =&gt; array(
    'id' =&gt; 'standard',
  ),
  'filter' =&gt; array(
    'title' =&gt; t('Event ID'),
    'id' =&gt; 'numeric',
  ),
  'argument' =&gt; array(
    'id' =&gt; 'numberic',
  ),
);


No relationship can be added in views. Previously when I used a single database I was able to add the relationship by using the relatationship handler that is commented out above now. I don't know how to adapt it to 2 databases.