전체 글
-
[API] 공공데이터 API 접속하기Computer Science 2023. 6. 2. 07:02
기상청 단기예보 조회서비스를 이용하여 api를 호출해보자. ❖ 맥북(Mac) 화면 캡쳐 방법(단축키) 1. 전체화면 스크린샷: Command + Shift + 3 2. 영역지정 캡처: Command + Shift + 4 3. 특정 창 캡처: Command + Shift + 4 누른 후, SpaceBar 4. 스크린샷 앱 이용: Command + Shift + 5 5. 터치바 캡처: Command + Shift + 6 6. 미리보기 앱 이용: 미리보기앱 > 파일 > 스크린샷 ("전체화면" 사용시, 마우스, 드래그 영역 함께 캡쳐 가능) * Only 복사(저장X) : Command + Shift + Control + 3/4/6 기상청 단기예보 조회서비스를 공공데이터 api를 이용해 JSON 형식으로 반환해보..
-
[Kafka] 프로듀서의 동작과 원리Data Engineer 2023. 5. 26. 13:46
프로듀서의 기본 역할은 소스에 있는 메시지들을 카프카의 토픽으로 전송하는 것이다. Partitioner - 카프카의 토픽은 성능 향상을 위한 병렬 처리가 가능하도록 하기 위해 파티션으로 나뉘고, 최소 하나 또는 둘 이상의 파티션으로 구성 - 프로듀서가 카프카로 전송한 메시지는 해당 토픽 내 각 파티션의 로그 세그먼트에 저장 - 프로듀서는 토픽으로 메시지를 보낼 때 해당 토픽의 어느 파티션으로 메시지를 보내야 할 지를 결정해야 하는데, 이때 사용하는 것이 바로 Partitioner 프로듀서가 파티션을 결정하는 알고리즘은 기본적으로 메시지의 키를 해시 처리해 파티션을 구하는 방식을 사용한다. 메시지의 키값이 동일하면 해당 메시지들은 모두 같은 파티션으로 전송된다. 만약 예상치 못한 많은 양의 메시지가 카프카..
-
[DB]SQLD_2Computer Science 2023. 5. 25. 13:25
SQL 종류 - SQL은 데이터 정의, 데이터 조작, 데이터 제어 등의 기능 지원 Standard Explanation DDL(Data Definition Language) - 관계형 데이터베이스 구조를 정의 - CREATE, ALTER, DROP, RENAME문 DML(Data Manipulation Language) - 테이블에서 데이터를 입력, 수정, 삭제, 조회 - INSERT, UPDATE, DELETE, SELECT문 DCL(Data Control Language) - 데이터베이스 사용자에게 권한을 부여하거나 회수 - GRANT, REVOKE, TRUNCATE문 TCL(Transaction Control Language) - 트랜잭션을 제어하는 명령어 - COMMIT, ROLLBACK, SAV..
-
[DB] SQLD_1Computer Science 2023. 5. 21. 23:27
# 카테시안 곱 From 절에 2개 이상의 Table이 있을 때 두 테이블 사이의 유효 Join 조건을 적지 않았을 시에 해당 테이블에 대한 모든 데이터를 결합하여 테이블에 존재하는 행 갯수를 곱한 만큼의 결과값이 반환되는 것 # 파티션 기법 데이터베이스에서 파티션을 사용하여 테이블을 분할 하는 것. 파티션을 사용하면 논리적으로는 하나의 테이블이지만 여러 개의 데이터 파일에 분산되어 저장한다. PARTITION EXPLANATION Range Partition 데이터 값의 범위를 기준으로 파티션 수행 List Partition 특정한 값을 지정하여 파티션을 수행 Hash Partition 해시 함수를 적용하여 파티션을 수행 Composite Partition 범위와 해시를 복합적으로 사용하여 파티션을 수..
-
[Kafka] 카프카의 내부 동작원리Data Engineer 2023. 5. 20. 14:38
Kafka의 내부 동작 원리와 구현에서 가장 중요한 부분 중 하나는 리플리케이션 동작이다. 이러한 리플리케이션 동작의 구현은 매우 어려운 부분일 뿐만 아니라 애플리케이션의 성능 저하도 불러오게 된다. 이를 위해 카프카는 안정성을 높임과 동시에 최대한 성능에 영향을 주지 않도록 설계되었다. Kafka 리플리케이션 고가용성 분산 스트리밍 플랫폼인 카프카는 무수히 많은 데이터 파이프라인의 정중앙에 위치하는 메인 허브 역할을 담당한다. 중앙에서 메인 허브 역할을 하는 카프카 클러스터가 만약 하드웨어의 문제나 점검 등으로 인해 정상적으로 동작하지 못한다거나, 카프카에 연결된 전체 데이터 파이프라인에 영향을 미친다면 이는 매우 심각한 문제가 될 수 있다. 이러한 이슈를 해결하기 위해 카프카는 초기 설계 단계에서부터..
-
[Kafka] Producer와 ConsumerData Engineer 2023. 5. 16. 19:11
Producer - 카프카의 토픽으로 메시지를 전송하는 역할 - 원하는 형태에 따라 옵션을 변경하면서 다양한 방법으로 카프카에 메시지를 전송 Producer 디자인 *ProducerRecord : 카프카로 전송하기 위한 실제 데이터 - Topic(필수, 메시지 전송 주소) / Partition(특정 파티션을 지정) / Key(특정 파티션에 레코드들을 정렬) / Value(필수, 메시지 전송) - Kafka의 특정 토픽으로 메시지를 전송 각 레코드들은 프로듀서의 send() 메서드를 통해 시리얼라이저, 파티셔너를 거치게 된다. 이때 프로듀서 레코드의 선택사항인 파티션 지정 시, 파티셔너는 아무 동작도 하지 않고 지정된 파티션으로 레코드를 전달한다. 파티션을 지정하지 않은 경우 키를 가지고 파티션을 선택해 ..
-
[Kafka] 정리_01Data Engineer 2023. 5. 14. 23:06
Kafka 주요 명령어 kafka-topics.sh = 토픽을 생성하거나 토픽의 설정 등을 변경하기 위해 사용 kafka-console-producer.sh = 토픽으로 메시지를 전송하기 위해 사용함. 기본 옵션 외 추가 옵션을 지정할 수 있고, 이를 통해 다양한 프로듀서 옵션 적용 가능 kafka-console-consumer.sh = 토픽에서 메시지를 가져오기 위해 사용하며, 기본 옵션 외 추가 옵션을 지정할 수 있고, 이를 통해 다양한 컨슈머 옵션 적용 가능 kafka-reassign-partitions.sh = 토픽의 파티션과 위치 변경 등을 위해 사용함 kafka-dump-log.sh = 파티션에 저장된 로그 파일의 내용을 확인하기 위해 사용함 Kafka 주요 요소 Zookeeper Apache..
-
[OS] vi 편집기Computer Science 2023. 5. 9. 11:40
Boaz 활동을 하다보면 linux 환경에서 파일을 편집하여 구동하는 경우가 잦다. 여러 활동을 하면서 Linux에 대한 이해가 부족하다고 생각해서 일단 가볍게 리눅스마스터 2급 취득을 목표로 틈틈이 공부중인데, 오늘 vi 편집기에 대해 알아보자. 리눅스에서 지원하는 편집기로는 pico, emacs,vi, gedit, xedit 등이 있다. vi 편집기는 유닉스 환경에서 가장 많이 쓰이는 문서 편집기이다. 다른 편집기들과 다르게 모드형 편집기이며, 명령모드 / 입력모드 / 편집모드로 구성되어 있다. 한 줄씩 편집하는 줄 단위 편집기가 아닌 한 화면을 편집하는 비주얼 에디터이며, 기종별 다양한 vi 클론들이 존재한다. vim 편집기도 있는데, vi 편집기와 호환되며 독자적으로 다양한 기능을 추가하여 만든 ..