Database

· Database
SELECT * FROM (SELECT colA, colB FROM tableA UNION SELECT colA, colB FROM tableB) WHERE colA > 1 https://stackoverflow.com/questions/5437507/union-with-where-clause UNION with WHERE clause I'm doing a UNION of two queries on an Oracle database. Both of them have a WHERE clause. Is there a difference in the performance if I do the WHERE after UNIONing the queries compared to performin... stackove..
· Database
CASE 1) (24.02.10) 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'You and what army?"\nI guess they\'re talking about you and me\nBaby, nobody will l\' at line 23' python dedent에서 backspace 사용 남발로 제대로 된 query가 수행되지 않아 생기는 문제,, Python 혹은 다른 언어들 대부분 들여 쓰기(indent)에 민감해 sqlparse 모듈로 query의 줄바꿈 upper case를 자동으로 ..
· Database
원인 docker로 기존 airflow 2.4 -> 2.8로 업그레이드 후 다시 2.8 -> 2.4로 downgrade 할 때 db migration이 되지 않아 생기는 문제 Solution 1) airflow-init 시 구성 단계에서 `airflow db upgrade'를 실행해야하지만 init 단계의 time이 짧아 바로 종료 되어 버림 따라서 local 환경이라면 `airflow db migrate`로 db migrate 혹은 `airflow db upgrade`를 수행 https://airflow.apache.org/docs/apache-airflow/stable/migrations-ref.html Reference for Database Migrations — Airflow Documentat..
· Database
airflow db 초기화 오류 ---------------------------------------------------------------------------------------------------------------------- Traceback (most recent call last): File "/opt/homebrew/bin/airflow", line 5, in from airflow.__main__ import main File "/opt/homebrew/lib/python3.11/site-packages/airflow/__init__.py", line 68, in settings.initialize() File "/opt/homebrew/lib/python3.11/site-pa..
· Database
passwd airflow Airflow는 Docker Container 내에 root 권한 접근을 제한하고 있다. 따라서 초기에 설정 없이 root 권한으로 container에 접근하려면 root 권한으로 docker를 실행해야한다. 1) docker 실행 시 user(root) 권한 실행 docker exec -it -u root [container_id] /bin/bash container airflow user의 비밀 번호 변경 passwd airflow 이후 apt update / upgrade sudo apt update sudo apt upgrade ## Y sudo apt install vim 2) VSCode에서 root 권한으로 remote container attach VSCode에서..
· Database
docker-compose로 구성한 container 중 airflow-init-1가 시작과 동시에 꺼지는 현상을 볼 수 있다. 이는 container 구성 중 초기화를 잘 실행하고 완료되어 꺼진 것이다. docker-compose 후 --detach가 없으면 airflow 계속 실행하기 떄문에 이를 방지하기 위함이다. https://stackoverflow.com/questions/68714224/airflow-exiting-after-initilalization Airflow exiting after Initilalization I'm trying to set up airflow instance using docker-compose in an Ubuntu EC2 Instance. After airfl..
· Database
localhost: ERROR: Cannot set priority of datanode process Starting namenodes on [localhost] Starting datanodes localhost: ERROR: Cannot set priority of datanode process 854900 Starting secondary namenodes [server_name] 2023-11-12 13:52:05,508 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Starting resourcemanager ..
· Database
오랜만에 WSL에 systemd 사용이 가능하다고 해 업데이트 했더니 ssh 설정이 꼬여버렸다. 기존에 사용하는 Port가 문제인지 확인해보니 ssh 접속시 Password, Key로만 접속이 가능하게 되어 있었다. https://learn.microsoft.com/ko-kr/windows/wsl/systemd Systemd를 사용하여 WSL로 Linux 서비스 관리 Systemd를 사용하여 Linux용 Windows 하위 시스템을 사용하여 Linux 서비스를 관리하는 방법을 알아봅니다. learn.microsoft.com Sol) 1) authorized_keys에 로컬 서버 접속 정보가 등록되어 있는지 확인해본다. ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa cat ~/...
다했다
'Database' 카테고리의 글 목록