Introduction to BigQuery SQL translation (Solution)

Introduction to BigQuery SQL translation (Solution)

Overview

This lab describes how to use the batch SQL translator in BigQuery to translate scripts written in other SQL dialects into GoogleSQL queries.

Migrating a Data Warehouse to the cloud or from another cloud provider is a tedious task. This task requires even more effort when the different SQL dialects are used, as one has to re-implement the entire logic.

Google Cloud Platform makes it easier with SQL translator, which is part of the BigQuery Migration Service. SQL translators are available in two modes: batch and interactive, that translates scripts and queries written in other SQL dialects into GoogleSQL queries.

The SQL translator can translate the following SQL dialects into GoogleSQL: Amazon Redshift SQL Teradata SQL except for SPL

Additionally, translation of the following SQL dialects is supported in preview:

  • Apache HiveQL

  • Apache Spark SQL

  • Azure Synapse T-SQL

  • Basic Teradata Query (BTEQ)

  • IBM Netezza SQL/NZPLSQL

  • MySQL SQL

  • Oracle SQL, PL/SQL, Exadata

  • PostgreSQL SQL

  • Presto SQL

  • Snowflake SQL

  • SQL Server T-SQL

  • Teradata SPL

  • Vertica SQL

What you'll learn

In this lab, you will learn:

  • To translate scripts using Batch SQL translator.

  • To interactively translate queries with Interactive SQL translator.

Setup

Qwiklabs setup

For each lab, you get a new Google Cloud project and set of resources for a fixed time at no cost.

  1. Make sure you signed into Qwiklabs using an incognito window.

  2. Note the lab's access time (for example, and make sure you can finish in that time block.

  1. When ready, click .

  2. Note your lab credentials. You will use them to sign in to the Google Cloud Console.

  3. Click Open Google Console.

  4. Click Use another account and copy/paste credentials for this lab into the prompts.