Views Custom Contextual filter How to create custom contextual filter for views using views api.

I have a custom table which is having some statistics data about the user. The user id is also stored in the table. 

I managed to get the results using views api, Now I would like to use the contextual filter on the logged-in user, this is where I got interrupted. The contextual links are empty, its not showing any filters I can use of. How do I get contextual filters working using views api?
did you implement hook_views_data and then defined you table there? if yes then did you define relation for uid? 
you can copy code from views/modules/node.views.inc

  // uid field
  $data['node']['uid'] = array(
    'title' =&gt; t('Author uid'),
    'help' =&gt; t('The user authoring the content. If you need more fields than the uid add the content: author relationship'),
    'relationship' =&gt; array(
      'title' =&gt; t('Author'),
      'help' =&gt; t('Relate content to the user who created it.'),
      'handler' =&gt; 'views_handler_relationship',
      'base' =&gt; 'users',
      'field' =&gt; 'uid',
      'label' =&gt; t('author'),
    ),
    'filter' =&gt; array(
      'handler' =&gt; 'views_handler_filter_user_name',
    ),
    'argument' =&gt; array(
      'handler' =&gt; 'views_handler_argument_numeric',
    ),
    'field' =&gt; array(
      'handler' =&gt; 'views_handler_field_user',
    ),
  );