Skip to content

Commit 2e328f6

Browse files
bulk indexing with kaggle links
1 parent 8d7fb83 commit 2e328f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openml_OS/libraries/ElasticSearch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1876,7 +1876,7 @@ public function index_data($id, $start_id = 0, $altmetrics=True, $verbosity=0) {
18761876
$params['body'] = array();
18771877
$valid_ids = array();
18781878
$status_sql_variable = 'IFNULL(`s`.`status`, \'' . $this->CI->config->item('default_dataset_status') . '\')';
1879-
$datasets = $this->db->query('select d.*, ' . $status_sql_variable . 'AS `status`, count(rid) as runs, GROUP_CONCAT(dp.error) as error_message from dataset d left join (SELECT `did`, MAX(`status`) AS `status` FROM `dataset_status` GROUP BY `did`) s ON d.did = s.did left join task_inputs t on (t.value=d.did and t.input="source_data") left join run r on (r.task_id=t.task_id) left join data_processed dp on (d.did=dp.did) where d.did>=' . $did . ' and d.did<' . ($did + $incr) . ' group by d.did');
1879+
$datasets = $this->db->query('select d.*, ' . $status_sql_variable . 'AS `status`, count(rid) as runs, GROUP_CONCAT(dp.error) as error_message, GROUP_CONCAT(DISTINCT k.kaggle_link) as kaggle_link from dataset d left join (SELECT `did`, MAX(`status`) AS `status` FROM `dataset_status` GROUP BY `did`) s ON d.did = s.did left join task_inputs t on (t.value=d.did and t.input="source_data") left join run r on (r.task_id=t.task_id) left join data_processed dp on (d.did=dp.did) left join kaggle k on (d.did=k.dataset_id) where d.did>=' . $did . ' and d.did<' . ($did + $incr) . ' group by d.did');
18801880
if($datasets){
18811881
foreach ($datasets as $d) {
18821882
try {

0 commit comments

Comments
 (0)