An open API service indexing awesome lists of open source software.

https://github.com/kvendingoldo/habr-bq-to-ch


https://github.com/kvendingoldo/habr-bq-to-ch

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

# habr-bq-to-ch
Habr article about the migration from BigQuery to Clickhouse is available by the [link](https://habr.com/ru/companies/merkteam/articles/841900/).

## Export data from BigQuery to Yandex S3
```shell
export GOOGLE_APPLICATION_CREDENTIALS=""
export BOTO_CONFIG="./credentials.boto"
python3 00_migrate.py \
--bq_project= \
--bq_location= \
--gs_bucket= \
--yc_bucket=
```

## Import data from Yandex S3 to ClickHouse

```shell
export GOOGLE_APPLICATION_CREDENTIALS=""
export BOTO_CONFIG="./credentials.boto"
python3 01_import.py \
--s3_bucket_name="" \
--s3_access_key='' \
--s3_secret_key='' \
--ch_cluster_id='' \
--ch_host='clickhouse_cluster_host' \
--ch_password='' \
--ch_database='clickhouse_database' \
--bq_table_pattern='' \
--bq_project_id="" \
--bq_database=""
```