Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Streamlit
- jmx-exporter
- grafana
- spark
- BigQuery
- kafka
- prometheus
- Python
- RAG
- airflow
- 오블완
- hadoop
- airflow설치
- amazonlinux
- 설치
- pySpark
- sparkstreaming
- MSA
- SQL
- ubuntu
- Redshift
- metadabatase
- javascript
- 루프백주소
- aiagent
- vectorDB
- milvus
- docker
- dockercompose
- Dag
Archives
- Today
- Total
데이터 노트
[BigQuery] Python, BigQuery, Google Sheet 연동 시 credential 에러 본문
Data Engineering/DB
[BigQuery] Python, BigQuery, Google Sheet 연동 시 credential 에러
돌돌찐 2023. 6. 7. 13:46에러 내용
credentials = service_account.Credentials.from_service_account_file(KEY_PATH, scopes)
TypeError: Credentials.from_service_account_file() takes 2 positional arguments but 3 were given
상황
BigQuery까지만 연동 + scopes를 추가하지 않고 실행 했을 때는 문제가 없었는데,
Google Sheet 추가 연결을 위해 scopes 작성이 필요해 작성하고 credential에 추가하였더니 오류가 발생.
해결 방안
scopes와 key path를 분리하여 작성하는 형식으로 코드 수정
credentials = service_account.Credentials.from_service_account_file(KEY_PATH)
credentials = credentials.with_scopes(scopes)
'Data Engineering > DB' 카테고리의 다른 글
[Redshift] 연산 오류 | 자동 정수 변환 (0) | 2024.04.13 |
---|---|
[Redshift] Airflow로 자동화한 프로시저가 작동하지 않을 경우 (0) | 2024.03.23 |
[Redshift] 기존 테이블의 컬럼명 변경을 위한 방법 (0) | 2024.03.20 |
[BigQuery] Python, BigQuery 연동 후 Google Sheet에 저장 (0) | 2023.06.10 |
[GCP] CLOUD SQL - Ubuntu 내 Django 연동 (0) | 2023.02.10 |