DB_CONFIG = {"host": "100.105.75.47", "port": 5432, "dbname": "postgres", "user": "postgres", "password": "",}
스키마 : d1_machine_log, 테이블 : FCT1~4_machine_log
d. 컬럼 end_time의 속성값을 오름차순으로 정렬
FCT1~4_machine_log
예시) contents : TEST RESULT :: OK, end_time : 08:22:46.38
contents : TEST AUTO MODE START ========, end_time : 08:23:16.38
→ 08:23:16.38 - 08:22:46.38 = “30.00” → 컬럼 no_operation_time의 속성값으로 만들어서 들어갈 것
컬럼 [end_day, station, contents, end_time, no_operation_time]으로 dataframe 출력 - 첨부파일 참조
컬럼 contents의 속성값 “TEST RESULT :: OK” or “TEST RESULT :: NG” or "TEST AUTO MODE START ========"만 해당
| end_day | station | contents | end_time | no_operation_time |
|---|---|---|---|---|
| 20260105 | FCT1 | TEST RESULT :: OK | 08:22:46.38 | NULL |
| 20260105 | FCT1 | TEST AUTO MODE START ======== | 08:23:16.38 | 30.00 |
| 20260105 | FCT1 | TEST RESULT :: OK | 08:32:46.38 | NULL |
| 20260105 | FCT1 | TEST AUTO MODE START ======== | 08:33:16.38 | 30.00 |
스키마 : g_production_film, 테이블 : op_ct_gap
컬럼 real_no_operation_time의 속성값 “1”인 행의 컬럼 end_time의 속성값을 새로운 컬럼 to_time의 속성값으로 전환
컬럼 real_no_operation_time의 속성값 “1”인 행의 컬럼 end_time의 바로 위의 행(빼기 상대가 된)의 컬럼 end_time의 속성값을 새로운 컬럼 from_time의 속성값으로 전환
컬럼 [end_day, station, from_time, to_time, no_operation_time]으로 dataframe 출력
스키마 : g_production_film, 테이블(없으면 만들 것) : fct_non_operation_time 로 저장
DB_CONFIG = {"host": "100.105.75.47", "port": 5432, "dbname": "postgres", "user": "postgres", "password": "",}
스키마 : d1_machine_log, 테이블 : Vision1~2_machine_log
d. 컬럼 end_time의 속성값을 오름차순으로 정렬
Vision1~2_machine_log
예시) contents : 검사 양품 신호 출력, end_time : 08:22:46.38
contents : 바코드 스캔 신호 수신 ========, end_time : 08:23:16.38
→ 08:23:16.38 - 08:22:46.38 = “30.00” → 컬럼 no_operation_time의 속성값으로 만들어서 들어갈 것
컬럼 [end_day, station, contents, end_time, no_operation_time]으로 dataframe 출력 - 첨부파일 참조
컬럼 contents의 속성값 “검사 양품 신호 출력” or “검사 불량 신호 출력” or “바코드 스캔 신호 수신” 만 해당
| end_day | station | contents | end_time | no_operation_time |
|---|---|---|---|---|
| 20260105 | Vision1 | 검사 양품 신호 출력 | 08:22:46.38 | NULL |
| 20260105 | Vision1 | 바코드 스캔 신호 수신 | 08:23:16.38 | 30.00 |
| 20260105 | Vision1 | 검사 양품 신호 출력 | 08:32:46.38 | NULL |
| 20260105 | Vision1 | 바코드 스캔 신호 수신 | 08:33:16.38 | 30.00 |
스키마 : g_production_film, 테이블 : op_ct_gap
컬럼 real_no_operation_time의 속성값 “1”인 행의 컬럼 end_time의 속성값을 새로운 컬럼 to_time의 속성값으로 전환
컬럼 real_no_operation_time의 속성값 “1”인 행의 컬럼 end_time의 바로 위의 행(빼기 상대가 된)의 컬럼 end_time의 속성값을 새로운 컬럼 from_time의 속성값으로 전환
컬럼 [end_day, station, from_time, to_time, no_operation_time]으로 dataframe 출력