diff --git a/data_ui/data_ui.admin.inc b/data_ui/data_ui.admin.inc
index ff341d8..0c176cc 100644
--- a/data_ui/data_ui.admin.inc
+++ b/data_ui/data_ui.admin.inc
@@ -1252,3 +1252,31 @@ function _data_ui_get_join($join, $field) {
   }
   return FALSE;
 }
+
+/**
+ * Simple form to print the exported hook_views_data() code.
+ */
+function data_ui_views_export_form($form_state, $table) {
+  // Get the path to the data.views.inc file, and load it
+  $codepath = module_invoke('data', 'views_api');
+  include_once $codepath['path'] . '/data.views.inc';
+
+  // Get the array from hook_views_data implemented in data
+  $raw_export = module_invoke('data', 'views_data');
+
+  // Generate the code
+  //@TODO: format the generated code, to be compliant with coding standards.
+  $raw_export = $raw_export[$table['build_info']['args'][0]->name];
+  $raw_export = '$data[' . "'" . $table['build_info']['args'][0]->name . "'] = " . var_export($raw_export, true) . ";";
+  $code = '$data = array();' . "\n" . $raw_export . "\n\nreturn " . '$data;';
+  $lines = substr_count($code, "\n");
+
+  // Generate the form
+  $form['code'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Data UI generated code for hook_views_data() implementation'),
+    '#default_value' => $code,
+    '#rows' => $lines + 1,
+  );
+  return $form;
+}
diff --git a/data_ui/data_ui.module b/data_ui/data_ui.module
index 8aa627a..10e7cf9 100644
--- a/data_ui/data_ui.module
+++ b/data_ui/data_ui.module
@@ -187,6 +187,15 @@ function data_ui_menu() {
       'access arguments' => array('administer data tables'),
       'type' => MENU_CALLBACK,
     );
+    $items['admin/structure/data/edit/' . $table_name . '/views-export'] = array(
+      'title' => 'Export views integration',
+      'description' => 'Export integration code for hook_views_data().',
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('data_ui_views_export_form', 4),
+      'file' => 'data_ui.admin.inc',
+      'access arguments' => array('administer data tables'),
+      'type' => MENU_LOCAL_TASK,
+    );
     $items['admin/structure/data/revert/' . $table_name . ''] = array(
       'title' => 'Revert data table',
       'description' => 'Administer data tables.',
