| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 31 |
- django
- array
- numpy
- hive
- c#
- matplotlib
- Python
- Kotlin
- 파이썬
- Excel
- PostgreSQL
- math
- Java
- Tkinter
- dataframe
- Redshift
- Google Spreadsheet
- Github
- string
- gas
- PANDAS
- Apache
- Google Excel
- GIT
- SQL
- google apps script
- PySpark
- list
- Presto
- Today
- Total
목록SQL (133)
달나라 노트
* _SUCCESS 파일을 생성하지 않는 옵션을 보려면 맨 아래에 있는 4번으로 넘어가세요. 1. _SUCCESS 파일에 대해서_SUCCESS 파일이 뭔지부터 알아봅시다. Hive를 사용하다보면 특정 조건의 query를 실행했을 때 _SUCCESS 파일이 생성되곤 합니다. 모든 query를 실행했을 때 생성되는 것은 아니고, Hive에서 데이터를 쓰는(write) query를 실행할 때 _SUCCESS 파일이 생성됩니다. 대표적으로 다음과 같은 경우에 _SUCCESS 파일이 생성됩니다.- insert into 등으로 테이블에 데이터를 삽입할 때- create table ~~ as select ~ (CTAS) 와 같이 select 쿼리의 결과를 바탕으로 새 테이블을 만들 때- 아래처럼 external ta..
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..
Presto에서 사용할 수 있는 시간 성분을 추출하는 함수를 알아봅시다. Function nameDescriptionhour(datetime)주어진 datetime의 시간(hour)성분을 추출합니다.minute(datetime)주어진 datetime의 분(minute)성분을 추출합니다.second(datetime)주어진 datetime의 초(second)성분을 추출합니다.millisecond(datetime)주어진 datetime의 밀리초(millisecond)성분을 추출합니다. select current_timestamp as current_dttm --> 2025-10-18 03:13:54.561 , hour(current_timestamp) as current_hour -->..
doy, day_of_year함수는 주어진 특정 날짜가 속한 년도에서 주어진 날짜가 몇번째 날짜인지를 나타내줍니다.단순히 해당 날짜의 일을 추출해주는 것과는 다릅니다. Syntaxdoy(datetime)day_of_year(datetime) 주어진 datetime의 년중 일수를 추출합니다.doy 함수와 dady_of_year 함수는 동일합니다. select current_timestamp as current_dttm --> 2025-10-18 03:03:37.996 , doy(current_timestamp) as current_doy --> 291 , day_of_year(current_timestamp) as current_day_of_year --> 291; 예..