我有一个存储在Big Query中的模式,需要将其转移到Amazon S3存储桶中。这个操作的过程是什么? BigQuery数据属于另一个组织,他们愿意给予适当的访问权限来转移数据。我找到了从S3存储桶导入到GCP的方法,但没有直接从Big Query导出到S3的方法。我真的被卡住了。此外,我需要安排这个过程,因为BigQuery中的数据正在发生变化,我每天都想把数据发送到我的S3存储桶中。请提供相关参考资料。请注意,每天的数据量将达到TB级别。
我有一个存储在Big Query中的模式,需要将其转移到Amazon S3存储桶中。这个操作的过程是什么? BigQuery数据属于另一个组织,他们愿意给予适当的访问权限来转移数据。我找到了从S3存储桶导入到GCP的方法,但没有直接从Big Query导出到S3的方法。我真的被卡住了。此外,我需要安排这个过程,因为BigQuery中的数据正在发生变化,我每天都想把数据发送到我的S3存储桶中。请提供相关参考资料。请注意,每天的数据量将达到TB级别。
First step is to setup gcloud sdk on the machine where the job would be scheduled.
Configure gcloud and pay special attention to boto configuration you can skip this step if the process is going to run on an EC2 with a role attached that allows it to write to S3 (also a better security practice than using keys)
copy data from bigquery to gcs
bq --location=US extract --destination_format AVRO --compression SNAPPY [source_table] [target location on gcs]
copy the file from gcs to s3
gsutil rsync -r [target location on gcs] to [target location on s3]
CONNECTION_REGION.CONNECTION_NAME
导出数据