| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
- Github
- Kotlin
- numpy
- hive
- string
- SQL
- Excel
- Redshift
- list
- Presto
- Python
- GIT
- Apache
- Tkinter
- Google Spreadsheet
- Google Excel
- 파이썬
- PANDAS
- PySpark
- Java
- math
- django
- matplotlib
- google apps script
- PostgreSQL
- gas
- array
- c#
- dataframe
- Today
- Total
목록전체 글 (866)
달나라 노트
Airflow의 PythonVirtualenvOperator는 내가 정의해둔 Python 함수를 실행해주는 역할을 하는 operator입니다.일반 PythonOperator와 다른 점은 가상 환경에서 Python 함수를 실행할 수 있다는 것이며 따라서 어떤 특정 version의 library를 사용하고 싶을 때 유용합니다. 예시를 봅시다. from airflow import DAGdag = DAG( dag_id='test_dag', start_date=datetime.datetime(2022, 9, 27), schedule_interval='0 20 * * *')from airflow.operators.python import PythonVirtualenvOperator # 1def t..
Airflow의 PythonOperator는 내가 정의해둔 Python 함수를 실행해주는 역할을 하는 operator입니다. 예시를 봅시다. from airflow import DAGdag = DAG( dag_id='test_dag', start_date=datetime.datetime(2022, 9, 27), schedule_interval='0 20 * * *')from airflow.operators.python_operator import PythonOperator # 1def test_function(**kwargs): # 2 import pandas as pd import openpyxl import os import sys import datet..
Airflow의 PostgresOperator는 PostgreSQL database와 communication하는 것을 가능하게 해주는 operator입니다.간단하게 말하면 PostgreSQL database에 query를 날려서 query를 수행시킬 수 있다는 것인데, AWS의 Redshift 등이 대표적입니다. 예시를 봅시다. from airflow import DAGdag = DAG( dag_id='test_dag', start_date=datetime.datetime(2022, 9, 27), schedule_interval='0 20 * * *')from airflow.providers.postgres.operators.postgres import PostgresOperator ..
Syntaxdate_trunc('datepart', date/timestamp)date_trunc 함수는 위처럼 사용할 수 있습니다.주어진 date를 명시한 datepart까지만 남기고 그 이하는 모두 자른 후(모두 가장 작은 값으로 만든 후) timestamp를 반환합니다. select current_timestamp as current_dttm --> 2025-09-18 03:23:12.907 , date_trunc('year', current_timestamp) as trunc_year --> 2025-01-01 00:00:00.000 , date_trunc('quarter', current_timestamp) as trunc_quarter --> 2025-07..