Get views contextual filter's argument value in thousand
/**
 * Implements hook_views_data_query_alter().
 *
 * @param $view
 *   Information about Views' tables and fields.
 *
 * @param $query
 *   Information about query used in this views.
 */
function my_module_views_query_alter(&amp;$view, &amp;$query) {
  // Only edit your view whose contextual filter need to be edited.
  if ($view-&gt;name == 'your_view_name'){

    // Get your contextual filter field and use your code to strip comma.
    // str_replace(',', '', $row-&gt;contact_id);
  }
}