본문 바로가기

spark3

[Database] JDBC / ODBC ? 배경 JDBC? ODBC? 공통점 차이점 배경 AWS Redshift 커넥터 df_user_session_channel = spark.read \ .format("jdbc") \ .option("driver", "com.amazon.redshift.jdbc42.Driver") \ .option("url", "jdbc:redshift://HOST:PORT/DB?user=ID&password=PASSWORD") \ .option("dbtable", "raw_data.user_session_channel") \ .load() 세션채널 읽어오는 과정중 Redshift를 JDBC드라이버로 연결하면서 의문이 생겼었다. 그리고, SparkSQL 을 사용하면서 파일로 저장하는 것보다 Spark 테이블로 처리하는 것의 .. 2024. 2. 16.
[Spark] Spark 내부동작과 클라우드 옵션(Part1. Spark 내부동작) Spark 파일 포맷 Execution Plan Bucketing과 Partitioning 요약 Spark 파일 포맷 데이터는 디스크에 파일로 저장됨: 일에 맞게 최적화 필요 (Unstructured, semi-structured는 사람이 읽을 수 있음, Structured는 사람이 읽을 수 없음) Spark의 주요 파일 타입 특징 CSV JSON PARQUET_2 AVRO 컬럼 스토리지 X X Y X 압축 가능 Y Y Y Y Splittable Y_1 Y_1 Y Y Human readable Y Y X X Nested structure support X Y Y Y Schema evolution X X Y Y Parquet 빼고 모두 행별로 저장한다. Splittable이라 함은 HDFS에서 저장할 때 .. 2024. 2. 13.
[데이터엔지니어] 실리콘 밸리에서 날아온 엔지니어링 스타터 키트 Week7 7주차 주요내용 Airflow Configuration for Production Usage Slack 연동하기 구글 시트 연동하기: 시트 => Redshift 테이블 API & Airflow 모니터링 Dag Dependencies Airflow Configuration for Production Usage 제일 중요한 파일은 airflow.cfg (/var/lib/airflow or /opt/airflow/) Any changes here will be reflected when you restart the webserver and scheduler core 섹션의 dags_folder가 DAG들이 있는 디렉토리가 되어야한다. /var/lib/airflow/dags dag_dir_list_interva.. 2023. 10. 12.
반응형