a blue background with lines and dots

Migrating from SAS to Google BigQuery typically follows a structured process that moves from initial assessment to final optimization. Since there is no single "magic button" for this transition, most organizations use a combination of automated tools and manual rewriting.

Assessment and Planning

Begin by cataloging your existing SAS ecosystem to understand what needs to move.

  • Inventory: Identify all datasets (SAS7BDAT, XPT), SAS programs, macros, and ETL pipelines.

  • Identify Criticality: Decide whether to migrate all workloads at once or take an iterative approach, starting with less critical workloads to build confidence.

  • Gap Analysis: Check for SAS-specific functions or procedures (like PROC TRANSPOSE) that don't have direct SQL equivalents and will require User-Defined Functions (UDFs).

Data Migration

Move your physical data from SAS storage to BigQuery.

  • Connectivity Tools: Use the SAS/ACCESS Interface to Google BigQuery to establish a direct connection via LIBNAME or CASLIB statements.

  • Transfer Methods:

    • Bulk Loading: Use SAS bulk-load support to move large tables into BigQuery efficiently.

    • Direct Ingestion: For smaller files, convert SAS datasets to CSV or Parquet and upload them to Google Cloud Storage before loading them into BigQuery.

    • Third-Party Connectors: Tools like CData Sync can automate data movement from local SAS files to BigQuery

Code and Pipeline Conversion

This is the most complex phase, as SAS logic must be translated into BigQuery-compatible SQL.

  • SQL Translation: Translate PROC SQL directly to BigQuery Standard SQL. While much of the syntax is similar, you must update table and column names to match the new schema.

  • Data Step Conversion: DATA steps must be rewritten as SQL queries or transformed using tools like Google Cloud Dataflow or Dataproc.

  • AI-Assisted Tools: Leverage AI-powered converters or the BigQuery Migration Service to automate the translation of complex scripts

Validation and Optimization

Once migrated, ensure the data and logic are accurate.

  • Validation: Use the BigQuery Migration Service to check for structural mismatches, data content errors, and type fidelity.

  • Performance Tuning: Optimize your new BigQuery environment by implementing partitioning and clustering on large tables to lower costs and improve query speed.

  • Governance: Re-establish access controls and data governance using Google Cloud IAM.

a blue background with lines and dots