mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-16 11:28:19 +00:00
Merge pull request #34 from jerrybai2009/master
DSS-3914, modify the sql to fetch only the latest version of jobs in …
This commit is contained in:
commit
b7423dc9d3
@ -57,10 +57,11 @@ public class FlowsDAO extends AbstractMySQLOpenSourceDAO
|
||||
"SELECT count(*) FROM flow_job WHERE app_id = ? and flow_id = ?";
|
||||
|
||||
private final static String GET_PAGED_JOBS_BY_APP_ID_AND_FLOW_ID = "select SQL_CALC_FOUND_ROWS " +
|
||||
"j.job_id, j.job_name, j.job_path, j.job_type, FROM_UNIXTIME(j.created_time) as created_time, " +
|
||||
"j.job_id, MAX(j.last_source_version), j.job_name, j.job_path, j.job_type, FROM_UNIXTIME(j.created_time) as created_time, " +
|
||||
"FROM_UNIXTIME(j.modified_time) as modified_time, f.flow_name " +
|
||||
"FROM flow_job j JOIN flow f on j.app_id = f.app_id and j.flow_id = f.flow_id " +
|
||||
"WHERE j.app_id = ? and j.flow_id = ? ORDER BY 1 LIMIT ?, ?";
|
||||
"WHERE j.app_id = ? and j.flow_id = ? GROUP BY j.job_id, j.job_name, j.job_path, j.job_type, " +
|
||||
"f.flow_name ORDER BY j.job_id LIMIT ?, ?";
|
||||
|
||||
public static Integer getApplicationIDByName(String applicationName)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user