Skip to content

ClickHouse 연결 지연(Lazy Connect) 방식 적용 및 환경 변수 검증 로직 추가 #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ParkGyeongTae
Copy link
Contributor

#️⃣ Issue Number

📝 요약(Summary)

  • run_sql() 호출 시점에만 ClickHouse에 연결하도록 로직을 변경하여 지연 연결(lazy connection) 방식을 적용했습니다.
  • 누락된 환경 변수를 사전에 감지하기 위해 _get_env_or_raise() 함수를 도입하고, 명확한 예외와 에러 로그를 추가했습니다.
  • 이로써 실행 안정성과 디버깅 편의성이 향상되었습니다.

💬 To Reviewers (선택)

  • 없음

PR Checklist

  • lang2sql --datahub_server http://34.16.140.205:8080 run-streamlit

reference) How to Code Review

  • 따봉(👍): 리뷰어가 리뷰이의 코드에서 칭찬의 의견을 남기고 싶을 때 사용합니다.
  • 느낌표(❗): 리뷰어가 리뷰이에게 필수적으로 코드 수정을 요청할 때 사용합니다.
  • 물음표 (❓): 리뷰어가 리뷰이에게 의견을 물어보고 싶을 때 사용합니다.
  • 알약 (💊): 리뷰어가 리뷰이의 코드에서 개선된 방법을 제안하지만 그것의 반영이 필수까지는 아닐 때 사용합니다.

Copy link
Collaborator

@ehddnr301 ehddnr301 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 원래는 Streamlit에서 제어할때마다 Successfully connected to ClickHouse. 가 로깅되었는데 현재는 해당 메시지가 run_sql 시에만 출력되는것 확인하였습니다!

@ParkGyeongTae ParkGyeongTae merged commit 3d07137 into master May 23, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants