일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- numpy
- SQL
- array
- Google Spreadsheet
- PANDAS
- GIT
- PostgreSQL
- 파이썬
- math
- Google Excel
- Java
- google apps script
- c#
- gas
- Python
- string
- PySpark
- Redshift
- matplotlib
- dataframe
- Tkinter
- Mac
- Excel
- Kotlin
- list
- Github
- Apache
- hive
- django
- Today
- Total
목록PostgreSQL (29)
달나라 노트
Redshift에서 REGEXP_SUBSTR() 함수는 특정한 패턴을 주고 이 패턴에 일치하는 문자열을 return합니다. Syntaxregexp_substr(string, pattern, start_position, occurence, search_parameter) - stringpattern 검색을 할 대상이 될 string 또는 column 이름 입니다. - pattern검색할 pattern입니다. - start_positionstring에서 몇 번째 문자부터 검색을 시작할지를 나타냅니다.1을 전달할 경우 string의 가장 첫 번째 문자부터 pattern 검색을 시작합니다.(1이 default 값입니다.) - occurencestring에서 pattern과 맞는 부분이 여러 개 발견될 경우 몇..
Redshift에서 현재 사용중인 database의 이름을 알고 싶으면 current_datebase를 이용하면 됩니다. select current_database() ; -- Result sandbox
Redshift에서 현재 query를 돌리는 user를 알고 싶으면 current_user를 사용하면 됩니다. select current_user ; -- Result test_user_1
to_timestamp() 함수는 날짜/시간 형태의 문자열이나 timestamp type의 데이터를 받아 원하는 timestampz로 변환합니다. Syntax to_timestamp(timestamp/timestamp_string, format) - timestamp/timestamp_string timestamp로 type을 변환할 대상 timestamp 또는 날짜/시간 형태의 문자열을 전달합니다. - format timestamp/timestamp_string 이 어떤 형태를 가지고 있는지에 대한 pattern을 의미합니다. select to_timestamp('20230101_082739', 'yyyymmdd_HH24MISS') -- Result 2023-01-01 08:27:39.000000 +0..