BigQuery Migration Service: SQL and data transfer
By Google Cloud Tech
Transferring SQL Queries and Data to Google Cloud
Key Concepts:
- BigQuery: Google Cloud’s fully-managed, serverless data warehouse.
- Google Cloud Storage (GCS): Scalable and durable object storage service.
- Data Proc: Managed Apache Spark and Hadoop service.
- Data Transfer Service (DTS): Service for migrating data to BigQuery.
- SQL Translation Service: Service leveraging Gemini to translate SQL dialects.
- Delta Lake: Open-source storage layer that brings ACID transactions to Apache Spark and big data workloads.
- Iceberg: Open table format for huge analytic datasets.
- Dataform: Fully managed service for defining, testing, and running data transformations.
- Vertex AI: Google Cloud’s unified machine learning platform.
- Analytics Hub: Google Cloud service for secure data sharing.
1. Introduction & Planning Recap
The video builds upon a previous assessment phase where Google Cloud experts analyzed a source system and provided estimates for the target BigQuery and Google Cloud Storage environment. The focus now shifts to the actual data and query transfer, emphasizing that the specific approach depends heavily on the source platform and existing artifacts. The initial planning stage determined whether a full, immediate migration or a phased, incremental approach would be adopted.
2. Cloudera to Google Cloud: A Baseline Scenario
A common scenario involves migrating files from Hadoop HDFS (Cloudera) to Google Cloud Storage, replacing Hive with BigQuery. Existing Spark and Hadoop jobs can be run within Data Proc, a fully managed platform supporting Apache Spark, Presto, and other technologies, minimizing code rewriting. Databricks workloads (Pispark) are also compatible with Data Proc and can be translated into Jupyter notebooks. Spark SQL can be mapped to BigQuery, and Databricks workflows can be orchestrated using Google Cloud’s orchestration tools. Tables in Unity Catalog can be migrated as native BigQuery tables, Iceberg tables, or BigLake tables. MLflow workflows can be executed in Vertex AI or Data Proc, and Delta Share can be translated to BigQuery sharing features or Analytics Hub.
3. Delta Lake Table Migration Options
The video details several options for migrating Delta Lake tables:
- Transfer as Iceberg Tables: Directly transferring Delta Lake tables as Iceberg tables in Google Cloud Storage.
- Register as External Tables (BigLake): Registering Delta Lake tables as external tables in BigQuery using BigLake.
- Convert to Native BigQuery Tables: Converting Delta Lake tables into BigQuery’s native table format. Two patterns are presented:
- Spark Template: Utilizing a pre-built Spark template with the “register table” method.
- External Table as Source: Registering Delta Lake files as external tables first, then using those as the source for creating native BigQuery tables.
The importance of considering partitions and clusters in BigQuery during table creation is highlighted to optimize query performance and reduce costs. Dataform can automate many of these tasks. Migration from Data Lakeink to Iceberg in Cloud Storage is facilitated by services that locate, optimize, and copy files to a storage bucket.
4. SQL Translation with Gemini
The SQL Translation Service, powered by Gemini, is presented as a key tool for converting SQL queries from various dialects (Spark SQL, Snowflake, Teradata, DataBricks, Cloudera, etc.) to BigQuery-compatible Google SQL. The service accepts zip files (generated by the assessment service) or individual SQL files stored in a Google Cloud Storage bucket. It provides a pipeline showing the number of lines of code translated successfully, along with any errors. Users can review and modify translated statements with suggestions from Gemini.
5. Data Transfer Service (DTS) for Data Migration
Once SQL is translated, the Data Transfer Service (DTS) offers a streamlined approach to data migration. DTS can utilize the output from the SQL Translation Service or attempt automatic schema detection. Potential schema mapping conflicts are addressed through configuration YAML files (for Snowflake) or custom schema files (for Teradata), allowing for precise control over data type conversions and partition/cluster mappings. DTS supports both full on-demand migrations and incremental transfers, utilizing a commit timestamp column for delta detection. Network ingress and egress configurations are also necessary.
6. Advanced Data Transfer Options
For scenarios requiring granular control or complex transformations, alternative tools like Dataflow (using storage formats as staging) or partner integration tools are recommended. The choice depends on specific business needs, data volume, and size. Consulting with Google Cloud Customer Engineers or Professional Services is advised.
7. Post-Migration Validation & Governance
The final step involves validating the migrated data, applying governance and access controls, and adapting applications and reporting tools to the new Google Cloud data warehouse or lake. This will be covered in a subsequent video.
Notable Quotes:
- “The beauty of data prog is having a managed fully integrated platform that can run Apache Spark, Presto and more. So existing code doesn't need to be rewritten.”
- “In all cases, it's a good idea to take a look at partitions and clusters in BigQuery before creating the tables as this will save you costs and improve performance for queries.”
Data & Statistics:
While specific data volumes or performance metrics weren’t provided, the video emphasizes the importance of optimizing for cost and performance through partitioning and clustering in BigQuery.
Logical Connections:
The video follows a logical progression: assessment & planning (from the previous video) -> specific migration scenarios (Cloudera) -> SQL translation -> data transfer -> advanced options -> post-migration tasks. Each section builds upon the previous one, providing a comprehensive overview of the migration process.
Conclusion:
This video provides a detailed overview of the tools and services available for migrating SQL queries and data to Google Cloud. It highlights the flexibility of the platform, offering solutions for various source systems and data formats. The emphasis on automated translation, streamlined data transfer, and the importance of optimization for cost and performance provides actionable insights for organizations considering a move to Google Cloud’s data analytics services. The video stresses the importance of leveraging Google Cloud’s expertise and documentation throughout the migration process.
Chat with this Video
AI-PoweredLoad the transcript when you're ready to chat so the initial page stays lighter.
Related Videos

What's new in Angular
Chrome for Developers

Rachel Reeves tells Sky News she will still be chancellor for the autumn budget
Sky News

Inside the Enhanced Games, aka 'The Doping Olympics' | The Global Story
BBC News

'DHS OFFICIAL ORDERED ME TO DELETE…': Witness reveals SHOCKING details of Minnesota Child Care fraud
The Economic Times

Penélope Cruz and Glenn Close star in Spanish civil war gay drama at Cannes • FRANCE 24 English
FRANCE 24 English

Getting More from Every Copilot Interaction
GitHub

U-Haul trucks are turning around. The Exodus is OVER.
Reventure Consulting