Expose table in Drupal View How can I expose a table with out primary key in Drupal view 3
I have table st as uid, gid, percentage.

attendance_views_data() {  

$data['attendance_percentage']['table']['group'] = t('Attendance');


    $data['attendance_percentage']['percentage'] = array(
        'title' =&gt; t('Attendance percentage field'),  
    'group' =&gt; t('Attendance'),
        'help' =&gt; t('Attendance percentage field.'), 
        'field' =&gt; array(
            'handler' =&gt; 'views_handler_field_numeric', 
            'click sortable' =&gt; TRUE,
            ), 
        'filter' =&gt; array(
            'handler' =&gt; 'views_handler_filter_numeric',
            ), 
        'sort' =&gt; array(
            'handler' =&gt; 'views_handler_sort',
            ),
    );
}


The above code does not work as I can not see percentage field in my view feild.
A problem in your code is that you are missing

return $data;


You also need to define the base for the table:

$data['attendance_percentage']['table']['base'] = array(
  'title' =&gt; t('Attendance'),
);


Should be enough.

Also remember you need to clear cache.