mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-11-04 04:39:10 +00:00 
			
		
		
		
	Improves SQL coding style (#643)
* Improves SQL coding style * Improves SQL coding style 2nd
This commit is contained in:
		
							parent
							
								
									2215c32e19
								
							
						
					
					
						commit
						cebdbc73a2
					
				@ -35,122 +35,168 @@ public class LineageDAO extends AbstractMySQLOpenSourceDAO
 | 
				
			|||||||
	private final static String GET_APPLICATION_ID = "SELECT DISTINCT app_id FROM " +
 | 
						private final static String GET_APPLICATION_ID = "SELECT DISTINCT app_id FROM " +
 | 
				
			||||||
			"job_execution_data_lineage WHERE abstracted_object_name = ?";
 | 
								"job_execution_data_lineage WHERE abstracted_object_name = ?";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private final static String GET_FLOW_NAME = "SELECT flow_name FROM " +
 | 
						private final static String GET_FLOW_NAME =
 | 
				
			||||||
			"flow WHERE app_id = ? and flow_id = ?";
 | 
								"SELECT flow_name "	+
 | 
				
			||||||
 | 
								"  FROM flow " +
 | 
				
			||||||
 | 
								" WHERE app_id = ? AND flow_id = ?";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private final static String GET_JOB = "SELECT ca.app_id, ca.app_code as cluster, " +
 | 
						private final static String GET_JOB =
 | 
				
			||||||
			"jedl.job_name, fj.job_path, fj.job_type, jedl.flow_path, jedl.storage_type, jedl.source_target_type, " +
 | 
								"SELECT ca.app_id, ca.app_code AS cluster, jedl.job_name, fj.job_path, fj.job_type, " +
 | 
				
			||||||
			"jedl.operation, MAX(jedl.source_srl_no), MAX(jedl.srl_no), " +
 | 
								"       jedl.flow_path, jedl.storage_type, jedl.source_target_type, jedl.operation, MAX(jedl.source_srl_no), " +
 | 
				
			||||||
			"MAX(jedl.job_exec_id) as job_exec_id FROM job_execution_data_lineage jedl " +
 | 
								"		    MAX(jedl.srl_no), MAX(jedl.job_exec_id) AS job_exec_id " +
 | 
				
			||||||
			"JOIN cfg_application ca on ca.app_id = jedl.app_id " +
 | 
								"  FROM job_execution_data_lineage jedl " +
 | 
				
			||||||
			"LEFT JOIN job_execution je on jedl.app_id = je.app_id " +
 | 
								"  JOIN cfg_application ca" +
 | 
				
			||||||
			"and jedl.flow_exec_id = je.flow_exec_id and jedl.job_exec_id = je.job_exec_id " +
 | 
								"    ON ca.app_id = jedl.app_id " +
 | 
				
			||||||
			"LEFT JOIN flow_job fj on je.app_id = fj.app_id and je.flow_id = fj.flow_id and je.job_id = fj.job_id " +
 | 
								"  LEFT JOIN job_execution je " +
 | 
				
			||||||
			"WHERE abstracted_object_name in ( :names ) and " +
 | 
								"    ON jedl.app_id = je.app_id AND jedl.flow_exec_id = je.flow_exec_id AND jedl.job_exec_id = je.job_exec_id " +
 | 
				
			||||||
			"jedl.flow_path not REGEXP '^(rent-metrics:|tracking-investigation:)' and " +
 | 
								"  LEFT JOIN flow_job fj " +
 | 
				
			||||||
			"FROM_UNIXTIME(job_finished_unixtime) >  CURRENT_DATE - INTERVAL (:days) DAY " +
 | 
								"		 ON je.app_id = fj.app_id AND je.flow_id = fj.flow_id AND je.job_id = fj.job_id " +
 | 
				
			||||||
			"GROUP BY ca.app_id, cluster, jedl.job_name, fj.job_path, fj.job_type, jedl.flow_path, jedl.source_target_type, " +
 | 
								" WHERE abstracted_object_name IN ( :names ) " +
 | 
				
			||||||
			"jedl.storage_type, jedl.operation " +
 | 
								"   AND jedl.flow_path NOT REGEXP '^(rent-metrics:|tracking-investigation:)' " +
 | 
				
			||||||
			"ORDER BY jedl.source_target_type DESC, job_exec_id";
 | 
								"   AND FROM_UNIXTIME(job_finished_unixtime) >  CURRENT_DATE - INTERVAL (:days) DAY " +
 | 
				
			||||||
 | 
								" GROUP BY ca.app_id, cluster, jedl.job_name, fj.job_path, fj.job_type, jedl.flow_path, " +
 | 
				
			||||||
 | 
								"       jedl.source_target_type, jedl.storage_type, jedl.operation " +
 | 
				
			||||||
 | 
								" ORDER BY jedl.source_target_type DESC, job_exec_id";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private final static String GET_UP_LEVEL_JOB = "SELECT ca.app_id, ca.app_code as cluster, " +
 | 
						private final static String GET_UP_LEVEL_JOB =
 | 
				
			||||||
			"jedl.job_name, fj.job_path, fj.job_type, jedl.flow_path, jedl.storage_type, jedl.source_target_type, " +
 | 
								"SELECT ca.app_id, ca.app_code AS cluster, jedl.job_name, fj.job_path, fj.job_type, " +
 | 
				
			||||||
			"jedl.operation, MAX(jedl.source_srl_no), MAX(jedl.srl_no), " +
 | 
						    "       jedl.flow_path, jedl.storage_type, jedl.source_target_type, jedl.operation, MAX(jedl.source_srl_no), " +
 | 
				
			||||||
			"MAX(jedl.job_exec_id) as job_exec_id FROM job_execution_data_lineage jedl " +
 | 
								"       MAX(jedl.srl_no), MAX(jedl.job_exec_id) AS job_exec_id " +
 | 
				
			||||||
			"JOIN cfg_application ca on ca.app_id = jedl.app_id " +
 | 
								"  FROM job_execution_data_lineage jedl " +
 | 
				
			||||||
			"LEFT JOIN job_execution je on jedl.app_id = je.app_id " +
 | 
								"  JOIN cfg_application ca " +
 | 
				
			||||||
			"and jedl.flow_exec_id = je.flow_exec_id and jedl.job_exec_id = je.job_exec_id " +
 | 
								"		 ON ca.app_id = jedl.app_id " +
 | 
				
			||||||
			"LEFT JOIN flow_job fj on je.app_id = fj.app_id and je.flow_id = fj.flow_id and je.job_id = fj.job_id " +
 | 
								"  LEFT JOIN job_execution je " +
 | 
				
			||||||
			"WHERE abstracted_object_name in ( :names ) and jedl.source_target_type = 'target' and " +
 | 
								"    ON jedl.app_id = je.app_id AND jedl.flow_exec_id = je.flow_exec_id AND jedl.job_exec_id = je.job_exec_id " +
 | 
				
			||||||
			"jedl.flow_path not REGEXP '^(rent-metrics:|tracking-investigation:)' and " +
 | 
								"  LEFT JOIN flow_job fj " +
 | 
				
			||||||
			"FROM_UNIXTIME(job_finished_unixtime) >  CURRENT_DATE - INTERVAL (:days) DAY " +
 | 
							  "    ON je.app_id = fj.app_id AND je.flow_id = fj.flow_id AND je.job_id = fj.job_id " +
 | 
				
			||||||
			"GROUP BY ca.app_id, cluster, jedl.job_name, fj.job_path, fj.job_type, jedl.flow_path, jedl.source_target_type, " +
 | 
								" WHERE abstracted_object_name IN ( :names ) " +
 | 
				
			||||||
			"jedl.storage_type, jedl.operation " +
 | 
								"   AND jedl.source_target_type = 'target' " +
 | 
				
			||||||
			"ORDER BY jedl.source_target_type DESC, job_exec_id";
 | 
								"   AND jedl.flow_path not REGEXP '^(rent-metrics:|tracking-investigation:)' " +
 | 
				
			||||||
 | 
								"   AND FROM_UNIXTIME(job_finished_unixtime) >  CURRENT_DATE - INTERVAL (:days) DAY " +
 | 
				
			||||||
 | 
								" GROUP BY ca.app_id, cluster, jedl.job_name, fj.job_path, fj.job_type, jedl.flow_path, " +
 | 
				
			||||||
 | 
								"          jedl.source_target_type, jedl.storage_type, jedl.operation " +
 | 
				
			||||||
 | 
								" ORDER BY jedl.source_target_type DESC, job_exec_id";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private final static String GET_JOB_WITH_SOURCE = "SELECT ca.app_id, ca.app_code as cluster, " +
 | 
						private final static String GET_JOB_WITH_SOURCE =
 | 
				
			||||||
			"jedl.job_name, fj.job_path, fj.job_type, jedl.flow_path, jedl.storage_type, jedl.source_target_type, " +
 | 
								"SELECT ca.app_id, ca.app_code AS cluster, jedl.job_name, fj.job_path, fj.job_type, " +
 | 
				
			||||||
			"jedl.operation, MAX(jedl.source_srl_no), MAX(jedl.srl_no), " +
 | 
								"       jedl.flow_path, jedl.storage_type, jedl.source_target_type, jedl.operation, MAX(jedl.source_srl_no), " +
 | 
				
			||||||
			"MAX(jedl.job_exec_id) as job_exec_id FROM job_execution_data_lineage jedl " +
 | 
								"       MAX(jedl.srl_no), MAX(jedl.job_exec_id) AS job_exec_id " +
 | 
				
			||||||
			"JOIN cfg_application ca on ca.app_id = jedl.app_id " +
 | 
								"  FROM job_execution_data_lineage jedl " +
 | 
				
			||||||
			"LEFT JOIN job_execution je on jedl.app_id = je.app_id " +
 | 
								"  JOIN cfg_application ca " +
 | 
				
			||||||
			"and jedl.flow_exec_id = je.flow_exec_id and jedl.job_exec_id = je.job_exec_id " +
 | 
								"    ON ca.app_id = jedl.app_id " +
 | 
				
			||||||
			"LEFT JOIN flow_job fj on je.app_id = fj.app_id and je.flow_id = fj.flow_id and je.job_id = fj.job_id " +
 | 
								"  LEFT JOIN job_execution je " +
 | 
				
			||||||
			"WHERE abstracted_object_name in ( :names ) and jedl.source_target_type != (:type) and " +
 | 
								"    ON jedl.app_id = je.app_id AND jedl.flow_exec_id = je.flow_exec_id AND jedl.job_exec_id = je.job_exec_id " +
 | 
				
			||||||
			"jedl.flow_path not REGEXP '^(rent-metrics:|tracking-investigation:)' and " +
 | 
								"  LEFT JOIN flow_job fj " +
 | 
				
			||||||
			"FROM_UNIXTIME(job_finished_unixtime) >  CURRENT_DATE - INTERVAL (:days) DAY " +
 | 
								"    ON je.app_id = fj.app_id AND je.flow_id = fj.flow_id AND je.job_id = fj.job_id " +
 | 
				
			||||||
			"GROUP BY ca.app_id, cluster, jedl.job_name, fj.job_path, fj.job_type, jedl.flow_path, jedl.source_target_type, " +
 | 
								" WHERE abstracted_object_name IN ( :names ) " +
 | 
				
			||||||
			"jedl.storage_type, jedl.operation " +
 | 
								"   AND jedl.source_target_type != (:type) " +
 | 
				
			||||||
			"ORDER BY jedl.source_target_type DESC, job_exec_id";
 | 
								"   AND jedl.flow_path not REGEXP '^(rent-metrics:|tracking-investigation:)' " +
 | 
				
			||||||
 | 
								"   AND FROM_UNIXTIME(job_finished_unixtime) >  CURRENT_DATE - INTERVAL (:days) DAY " +
 | 
				
			||||||
 | 
								" GROUP BY ca.app_id, cluster, jedl.job_name, fj.job_path, fj.job_type, " +
 | 
				
			||||||
 | 
								"          jedl.flow_path, jedl.source_target_type, jedl.storage_type, jedl.operation " +
 | 
				
			||||||
 | 
								" ORDER BY jedl.source_target_type DESC, job_exec_id";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private final static String GET_DATA = "SELECT storage_type, operation, " +
 | 
						private final static String GET_DATA =
 | 
				
			||||||
			"abstracted_object_name, source_target_type, job_start_unixtime, job_finished_unixtime, " +
 | 
								"SELECT storage_type, operation, abstracted_object_name, source_target_type, job_start_unixtime, " +
 | 
				
			||||||
			"FROM_UNIXTIME(job_start_unixtime) as start_time, " +
 | 
								"       job_finished_unixtime, FROM_UNIXTIME(job_start_unixtime) AS start_time, " +
 | 
				
			||||||
			"FROM_UNIXTIME(job_finished_unixtime) as end_time " +
 | 
								"       FROM_UNIXTIME(job_finished_unixtime) AS end_time " +
 | 
				
			||||||
			"FROM job_execution_data_lineage WHERE app_id = ? and job_exec_id = ? and " +
 | 
								"  FROM job_execution_data_lineage " +
 | 
				
			||||||
			"flow_path not REGEXP '^(rent-metrics:|tracking-investigation:)' and " +
 | 
								" WHERE app_id = ? " +
 | 
				
			||||||
			"COALESCE(source_srl_no, srl_no) = srl_no ORDER BY source_target_type DESC";
 | 
								"   AND job_exec_id = ? " +
 | 
				
			||||||
 | 
								"   AND flow_path NOT REGEXP '^(rent-metrics:|tracking-investigation:)' " +
 | 
				
			||||||
 | 
								"		AND COALESCE(source_srl_no, srl_no) = srl_no " +
 | 
				
			||||||
 | 
								" ORDER BY source_target_type DESC";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private final static String GET_DATA_FILTER_OUT_LASSEN = "SELECT j1.storage_type, j1.operation, " +
 | 
						private final static String GET_DATA_FILTER_OUT_LASSEN =
 | 
				
			||||||
			"j1.abstracted_object_name, j1.source_target_type, j1.job_start_unixtime, j1.job_finished_unixtime, " +
 | 
								"SELECT j1.storage_type, j1.operation, j1.abstracted_object_name, j1.source_target_type, j1.job_start_unixtime, " +
 | 
				
			||||||
			"FROM_UNIXTIME(j1.job_start_unixtime) as start_time, " +
 | 
								"       j1.job_finished_unixtime, FROM_UNIXTIME(j1.job_start_unixtime) AS start_time, " +
 | 
				
			||||||
			"FROM_UNIXTIME(j1.job_finished_unixtime) as end_time " +
 | 
								"       FROM_UNIXTIME(j1.job_finished_unixtime) AS end_time " +
 | 
				
			||||||
			"FROM job_execution_data_lineage j1 " +
 | 
								"  FROM job_execution_data_lineage j1 " +
 | 
				
			||||||
			"JOIN job_execution_data_lineage j2 on j1.app_id = j2.app_id and j1.job_exec_id = j2.job_exec_id " +
 | 
								"  JOIN job_execution_data_lineage j2 " +
 | 
				
			||||||
			"and j2.abstracted_object_name in (:names) and j2.source_target_type = 'source' " +
 | 
								"    ON j1.app_id = j2.app_id AND j1.job_exec_id = j2.job_exec_id " +
 | 
				
			||||||
			"WHERE j1.app_id = (:appid) and j1.job_exec_id = (:execid) and " +
 | 
								"       AND j2.abstracted_object_name IN (:names) AND j2.source_target_type = 'source' " +
 | 
				
			||||||
			"j1.flow_path not REGEXP '^(rent-metrics:|tracking-investigation:)' and " +
 | 
								" WHERE j1.app_id = (:appid) " +
 | 
				
			||||||
			"COALESCE(j1.source_srl_no, j1.srl_no) = j2.srl_no ORDER BY j1.source_target_type DESC";
 | 
								"   AND j1.job_exec_id = (:execid) " +
 | 
				
			||||||
 | 
								"   AND j1.flow_path NOT REGEXP '^(rent-metrics:|tracking-investigation:)' " +
 | 
				
			||||||
 | 
								"   AND COALESCE(j1.source_srl_no, j1.srl_no) = j2.srl_no " +
 | 
				
			||||||
 | 
								" ORDER BY j1.source_target_type DESC";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private final static String GET_APP_ID  = "SELECT app_id FROM cfg_application WHERE LOWER(app_code) = ?";
 | 
						private final static String GET_APP_ID  =
 | 
				
			||||||
 | 
								"SELECT app_id" +
 | 
				
			||||||
 | 
								"  FROM cfg_application" +
 | 
				
			||||||
 | 
								" WHERE LOWER(app_code) = ?";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private final static String GET_FLOW_JOB = "SELECT ca.app_id, ca.app_code, je.flow_id, je.job_id, " +
 | 
						private final static String GET_FLOW_JOB =
 | 
				
			||||||
			"jedl.job_name, fj.job_path, fj.job_type, jedl.flow_path, jedl.storage_type, " +
 | 
								"SELECT ca.app_id, ca.app_code, je.flow_id, je.job_id, jedl.job_name, " +
 | 
				
			||||||
			"jedl.source_target_type, jedl.operation, jedl.job_exec_id, fj.pre_jobs, fj.post_jobs, " +
 | 
								"       fj.job_path, fj.job_type, jedl.flow_path, jedl.storage_type, jedl.source_target_type, " +
 | 
				
			||||||
			"FROM_UNIXTIME(jedl.job_start_unixtime) as start_time, " +
 | 
								"       jedl.operation, jedl.job_exec_id, fj.pre_jobs, fj.post_jobs, " +
 | 
				
			||||||
			"FROM_UNIXTIME(jedl.job_finished_unixtime) as end_time " +
 | 
								"       FROM_UNIXTIME(jedl.job_start_unixtime) AS start_time, " +
 | 
				
			||||||
			"FROM job_execution_data_lineage jedl " +
 | 
								"       FROM_UNIXTIME(jedl.job_finished_unixtime) AS end_time " +
 | 
				
			||||||
			"JOIN cfg_application ca on ca.app_id = jedl.app_id " +
 | 
								"  FROM job_execution_data_lineage jedl " +
 | 
				
			||||||
			"JOIN job_execution je on jedl.app_id = je.app_id and " +
 | 
								"  JOIN cfg_application ca " +
 | 
				
			||||||
			"jedl.flow_exec_id = je.flow_exec_id and jedl.job_exec_id = je.job_exec_id " +
 | 
								"    ON ca.app_id = jedl.app_id " +
 | 
				
			||||||
			"JOIN flow_job fj on je.app_id = fj.app_id and je.flow_id = fj.flow_id and je.job_id = fj.job_id " +
 | 
								"  JOIN job_execution je " +
 | 
				
			||||||
			"WHERE jedl.app_id = ? and jedl.flow_exec_id = ? and " +
 | 
								"    ON jedl.app_id = je.app_id AND jedl.flow_exec_id = je.flow_exec_id AND jedl.job_exec_id = je.job_exec_id " +
 | 
				
			||||||
			"FROM_UNIXTIME(job_finished_unixtime) >  CURRENT_DATE - INTERVAL ? DAY";
 | 
								"  JOIN flow_job fj " +
 | 
				
			||||||
 | 
								"    ON je.app_id = fj.app_id AND je.flow_id = fj.flow_id AND je.job_id = fj.job_id " +
 | 
				
			||||||
 | 
								" WHERE jedl.app_id = ? " +
 | 
				
			||||||
 | 
								"   AND jedl.flow_exec_id = ? " +
 | 
				
			||||||
 | 
								"   AND FROM_UNIXTIME(job_finished_unixtime) >  CURRENT_DATE - INTERVAL ? DAY";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private final static String GET_LATEST_FLOW_EXEC_ID = "SELECT max(flow_exec_id) FROM " +
 | 
						private final static String GET_LATEST_FLOW_EXEC_ID =
 | 
				
			||||||
			"flow_execution where flow_exec_status in ('SUCCEEDED', 'FINISHED') and app_id = ? and flow_id = ?";
 | 
								"SELECT MAX(flow_exec_id) " +
 | 
				
			||||||
 | 
								"  FROM flow_execution " +
 | 
				
			||||||
 | 
								" WHERE flow_exec_status IN ('SUCCEEDED', 'FINISHED') " +
 | 
				
			||||||
 | 
								"   AND app_id = ? " +
 | 
				
			||||||
 | 
								"   AND flow_id = ?";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private final static String GET_FLOW_DATA_LINEAGE = "SELECT ca.app_code, jedl.job_exec_id, jedl.job_name, " +
 | 
						private final static String GET_FLOW_DATA_LINEAGE =
 | 
				
			||||||
			"jedl.storage_type, jedl.abstracted_object_name, jedl.source_target_type, jedl.record_count, " +
 | 
								"SELECT ca.app_code, jedl.job_exec_id, jedl.job_name, jedl.storage_type, jedl.abstracted_object_name, " +
 | 
				
			||||||
			"jedl.app_id, jedl.partition_type, jedl.operation, jedl.partition_start, " +
 | 
								"       jedl.source_target_type, jedl.record_count, jedl.app_id, jedl.partition_type, jedl.operation, " +
 | 
				
			||||||
			"jedl.partition_end, jedl.full_object_name, " +
 | 
								"       jedl.partition_start, jedl.partition_end, jedl.full_object_name, " +
 | 
				
			||||||
			"FROM_UNIXTIME(jedl.job_start_unixtime) as start_time, " +
 | 
								"       FROM_UNIXTIME(jedl.job_start_unixtime) AS start_time, " +
 | 
				
			||||||
			"FROM_UNIXTIME(jedl.job_finished_unixtime) as end_time FROM job_execution_data_lineage jedl " +
 | 
								"       FROM_UNIXTIME(jedl.job_finished_unixtime) AS end_time " +
 | 
				
			||||||
			"JOIN cfg_application ca on ca.app_id = jedl.app_id " +
 | 
								"  FROM job_execution_data_lineage jedl " +
 | 
				
			||||||
			"WHERE jedl.app_id = ? and jedl.flow_exec_id = ? ORDER BY jedl.partition_end DESC";
 | 
								"  JOIN cfg_application ca " +
 | 
				
			||||||
 | 
								"    ON ca.app_id = jedl.app_id " +
 | 
				
			||||||
 | 
								" WHERE jedl.app_id = ? " +
 | 
				
			||||||
 | 
								"   AND jedl.flow_exec_id = ? " +
 | 
				
			||||||
 | 
								" ORDER BY jedl.partition_end DESC";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private final static String GET_ONE_LEVEL_IMPACT_DATABASES = "SELECT DISTINCT j.storage_type, " +
 | 
						private final static String GET_ONE_LEVEL_IMPACT_DATABASES =
 | 
				
			||||||
			"j.abstracted_object_name, d.id FROM job_execution_data_lineage j " +
 | 
								"SELECT DISTINCT j.storage_type, j.abstracted_object_name, d.id " +
 | 
				
			||||||
			"LEFT JOIN dict_dataset d ON d.urn = concat(j.storage_type, '://', j.abstracted_object_name) " +
 | 
								"  FROM job_execution_data_lineage j " +
 | 
				
			||||||
			"WHERE (app_id, job_exec_id) in ( " +
 | 
								"  LEFT JOIN dict_dataset d "+
 | 
				
			||||||
			"SELECT app_id, job_exec_id FROM job_execution_data_lineage " +
 | 
								"    ON d.urn = concat(j.storage_type, '://', j.abstracted_object_name) " +
 | 
				
			||||||
			"WHERE abstracted_object_name in (:pathlist) and source_target_type = 'source' and " +
 | 
								" WHERE (app_id, job_exec_id) IN " +
 | 
				
			||||||
			"FROM_UNIXTIME(job_finished_unixtime) >  CURRENT_DATE - INTERVAL 60 DAY ) and " +
 | 
								"         ( SELECT app_id, job_exec_id " +
 | 
				
			||||||
			"abstracted_object_name not like '/tmp/%' and abstracted_object_name not like '%tmp' " +
 | 
								"             FROM job_execution_data_lineage " +
 | 
				
			||||||
			"and source_target_type = 'target' and " +
 | 
								"            WHERE abstracted_object_name IN (:pathlist) " +
 | 
				
			||||||
			"FROM_UNIXTIME(job_finished_unixtime) >  CURRENT_DATE - INTERVAL 60 DAY";
 | 
								"              AND source_target_type = 'source' " +
 | 
				
			||||||
 | 
								"              AND FROM_UNIXTIME(job_finished_unixtime) >  CURRENT_DATE - INTERVAL 60 DAY ) " +
 | 
				
			||||||
 | 
								"   AND abstracted_object_name NOT LIKE '/tmp/%' " +
 | 
				
			||||||
 | 
								"   AND abstracted_object_name NOT LIKE '%tmp' " +
 | 
				
			||||||
 | 
								"   AND source_target_type = 'target' "+
 | 
				
			||||||
 | 
								"   AND FROM_UNIXTIME(job_finished_unixtime) > CURRENT_DATE - INTERVAL 60 DAY";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private final static String GET_MAPPED_OBJECT_NAME = "SELECT mapped_object_name " +
 | 
						private final static String GET_MAPPED_OBJECT_NAME =
 | 
				
			||||||
			"FROM cfg_object_name_map WHERE object_name = ?";
 | 
								"SELECT mapped_object_name " +
 | 
				
			||||||
 | 
								"  FROM cfg_object_name_map " +
 | 
				
			||||||
 | 
								"	WHERE object_name = ?";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private final static String GET_OBJECT_NAME_BY_MAPPED_NAME = "SELECT object_name " +
 | 
						private final static String GET_OBJECT_NAME_BY_MAPPED_NAME =
 | 
				
			||||||
			"FROM cfg_object_name_map WHERE mapped_object_name = ?";
 | 
								"SELECT object_name " +
 | 
				
			||||||
 | 
								"  FROM cfg_object_name_map" +
 | 
				
			||||||
 | 
								" WHERE mapped_object_name = ?";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private final static String GET_SCRIPT_INFO_BY_JOB_ID = "SELECT script_url, " +
 | 
						private final static String GET_SCRIPT_INFO_BY_JOB_ID =
 | 
				
			||||||
			"script_name, script_path, script_type " +
 | 
								"SELECT script_url, script_name, script_path, script_type " +
 | 
				
			||||||
			"FROM job_execution_script WHERE app_id = ? and job_id = ? LIMIT 1";
 | 
								"  FROM job_execution_script " +
 | 
				
			||||||
 | 
								" WHERE app_id = ? " +
 | 
				
			||||||
 | 
								"   AND job_id = ? " +
 | 
				
			||||||
 | 
								" LIMIT 1";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public static JsonNode getObjectAdjacnet(String urn, int upLevel, int downLevel, int lookBackTime)
 | 
						public static JsonNode getObjectAdjacnet(String urn, int upLevel, int downLevel, int lookBackTime)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user