Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Unlocking SQL Server to Bigtable: A comprehensive guide to non-heterogeneous migration

shashanktp
Staff

image4.jpg

As businesses scale, their data storage needs evolve—often demanding more flexibility, lower latency, and better cost-efficiency. While Microsoft SQL Server has long served as a reliable relational database for transactional workloads, modern data demands increasingly point toward distributed NoSQL solutions.

Google Cloud Bigtable, a fully managed, highly scalable NoSQL database, is purpose-built for real-time analytics and high-throughput workloads. In this guide, we’ll walk through the practical steps and key considerations involved in migrating from SQL Server to Bigtable in a non-heterogeneous setup.

Why migrate from SQL Server to Bigtable?

Bigtable is ideal for storing and serving large volumes of single-keyed data with ultra-low latency. Unlike traditional relational systems, it’s optimized for use cases such as:

  • Time-series data
  • IoT telemetry ingestion
  • Financial tick data
  • Real-time analytics at scale
Key benefits of migrating to Bigtable include:
  • Unlimited horizontal scalability for massive datasets.
  • Low-latency performance for both reads and writes.
  • Cost optimization through separation of storage and compute.

That said, migration from a relational system like SQL Server to Bigtable is not plug-and-play. The fundamental differences in data modeling require thoughtful design to preserve data integrity, access patterns, and performance goals.

Understanding non-heterogeneous migration

A non-heterogeneous migration involves moving data across systems with fundamentally different architectures—such as relational (SQL Server) to non-relational (Bigtable)—while still preserving certain business rules and access logic.

This process typically includes:

  • Schema flattening and denormalization: Converting relational tables and joins into a flat, wide-row format.
  • Data type mapping: Translating SQL Server data types into Bigtable-compatible formats (usually strings or bytes).
  • Key design strategy: Creating a composite row key structure that aligns with Bigtable access patterns and avoids hotspots.
  • ETL orchestration: Building pipelines to extract, transform, and load data, often using tools like Dataflow, Dataproc, or custom scripts.
Key steps for a successful migration

1. Assessment and planning

  • Understand your use case: Bigtable works best for wide-column, high-throughput workloads. Evaluate if your SQL Server workload is suitable.
  • Data analysis: Identify the tables, columns, and queries that need to be migrated. Assess how they’ll translate to Bigtable’s row-key design.
  • Access patterns: Bigtable’s schema should be designed based on your access patterns (e.g., time-series, lookups).

2. Schema design for Bigtable

  • Mapping relational schema to Bigtable: Flatten SQL Server’s relational structure into Bigtable’s row and column-oriented model.
  • Row keys: Carefully design row keys as they determine the performance of Bigtable queries.
  • Column families: Group related columns together to optimize performance.

3. Data transformation

  • Use tools like Cloud Dataflow, Cloud Data Fusion, or custom scripts to transform and migrate data.
  • Convert incompatible SQL Server data types (e.g., VARCHAR, DATETIME) into Bigtable-compatible formats like strings or timestamps.

4. Data migration

  • Export data from SQL Server: Use SQL queries or SSIS to export data to CSV or AVRO formats.
  • Load data into Bigtable: Leverage pipelines to ingest data into Bigtable.

5. Validation and testing

  • Data integrity checks: Ensure that the data in Bigtable matches SQL Server.
  • Performance benchmarking: Test query performance to ensure it meets expectations.
  • Functional testing: Verify that the application using Bigtable works as intended.

6. Optimizing Bigtable for production

  • Monitor Bigtable’s performance using tools like Cloud Monitoring, Row-key Visualizer.
  • Optimize the schema or access patterns based on real-time performance data.
  • Implement security best practices like IAM roles and encryption.
Common challenges and solutions
  1. Schema mapping: SQL Server’s relational schema doesn’t directly map to Bigtable.
    Solution: Flatten and denormalize data while maintaining logical groupings.
  2. Key design: Poorly designed row keys lead to hotspotting, Bigtable only provides a single way of accessing the table.
    Solution: Analyze access patterns and use composite row keys for uniform data distribution.
  3. Data volume: Migrating large datasets can be time-consuming.
    Solution: Use parallel processing and incremental data migration techniques.
Designing an optimal schema in Bigtable

Schema design is one of the most critical aspects of ensuring performance and scalability in Bigtable. Unlike relational databases, Bigtable relies heavily on how you design your row keys and organize your columns. Poor schema design can lead to inefficient queries, data hotspots, and bottlenecks.

To get the most out of Bigtable:

  • Design row keys based on your access patterns (read and write).
  • Avoid hotspotting by adding salting or hashing mechanisms if needed.
  • Group related columns into column families to optimize reads.
  • Minimize the number of column families and use them consistently.
  • Prefer wide rows over deep nesting when storing related records.

Following schema best practices ensures that your Bigtable setup remains cost-efficient, performant, and scalable as your dataset grows.

You can refer to Google Cloud's official guide on Bigtable schema design best practices for a deeper dive into planning your schema effectively.

Migration approach:

There are several approaches to migrate data from MS SQL Server to Bigtable, and the best method depends on your specific use case and requirements. In this article, we will focus on the migration using the Google Cloud service — Data Fusion. While another viable option includes leveraging Dataflow templates with a custom pipeline solution on top, this guide will concentrate on the Data Fusion approach for its simplicity and low-code interface suited for many common migration scenarios.

Migrating with Google Cloud Data Fusion:

In this section, we walk through how to implement the migration from MS SQL Server to Bigtable using Cloud Data Fusion. This approach leverages Data Fusion’s visual interface and pre-built plugins to enable low-code, scalable data integration.

Cloud Data Fusion (CDF) is a fully managed, code-optional data integration service that simplifies the creation, deployment, and monitoring of data pipelines. It enables secure connections to on-premise or cloud-hosted SQL Server instances — including via Private IP — and facilitates seamless data flow into Bigtable, Google Cloud’s scalable NoSQL database.

image3.jpg

Permissions required for SQL Server to Bigtable migration:

To ensure a smooth and secure data migration process using Cloud Data Fusion, it's important to assign the right set of roles and permissions to both the service account executing the pipeline and the admin users managing the migration.

Service account roles

The service account running the Data Fusion pipelines must have the following roles to perform actions across Bigtable, SQL Server (via Cloud SQL), Dataproc, and Cloud Storage:

  • Bigtable User: Grants access to read/write data to Bigtable tables.
  • Cloud Data Fusion API Service Agent: Enables interaction with Cloud Data Fusion APIs.
  • Cloud Data Fusion Runner: Allows execution of data pipelines within CDF.
  • Cloud SQL Client: Provides permission to connect to Cloud SQL instances.
  • Cloud SQL Instance User: Grants access to database instances.
  • Cloud SQL Viewer : Enables read-only access to Cloud SQL resources for validation and debugging.
  • Dataproc Editor: Grants permissions to manage Dataproc resources for pipeline execution.
  • Dataproc Worker: Allows tasks to run on Dataproc clusters.
  • Service Account User: Allows impersonation of service accounts required during runtime.
  • Storage Admin: Enables read/write access to Google Cloud Storage buckets for staging and logging.
Admin user roles

Admin users overseeing the setup and monitoring of the migration process should be assigned these elevated roles for full control and visibility:

  • Bigtable Administrator: Full access to create, manage, and monitor Bigtable instances and tables.
  • Cloud Data Fusion Admin: Grants full control over Cloud Data Fusion instances and pipelines.
  • Cloud SQL Admin: Allows full access to manage SQL Server instances hosted on Cloud SQL.
  • Dataproc Administrator: Enables creation and management of Dataproc clusters used for data transformation.
  • Project IAM Admin: Allows assigning IAM roles and managing access across project-level resources.
Step-by-step guide: Setting up the migration using Cloud Data Fusion

Before you begin, ensure the following:

Note 1: All resources (Cloud SQL, Cloud Data Fusion, Dataproc, etc.) should be created within the same VPC network and region to ensure seamless connectivity.

Note 2: Private Google Access must be enabled for the subnet (e.g., 10.128.0.0/20) in your VPC. This is essential for successful Dataproc cluster provisioning when triggered by Cloud Data Fusion.

image11.png

Step 1: Create SQL Server in Cloud SQL (Private IP enabled)

  • Navigate to Cloud SQL in the Google Cloud Console.
  • Launch a new SQL Server instance.
  • During setup, enable Private IP access. This will allow secure and internal communication from Data Fusion to Cloud SQL.

image5.png

 

image6.png

Step 2: Create a Cloud Data Fusion instance (Private IP Enabled)

  • Go to Cloud Data Fusion and create a new instance.
  • Under Network settings, enable Private IP.
  • Choose Private Service Connect as the connection type.

Ensure a Network Attachment is created to bind the instance with your selected VPC.image1.png

Step 3: Deploy the SQL Server JDBC Driver

  • Once the Data Fusion instance is ready, open the Hub in the Studio UI.
  • Search for Microsoft SQL Server connector.
  • Download and Deploy the required JAR file (JDBC driver) to enable secure SQL Server connectivity.
image9.png

 

image2.pngStep 4: Configure the SQL Server source connection

To connect to your Cloud SQL instance using a Private IP, follow these steps:

  1. Deploy the JDBC driver as mentioned above.
  2. In the pipeline designer, select SQL Server as the source connector.
  3. Open the connector’s properties and create a new connection.
  4. Use:
    • Port: 1433 (default for SQL Server)
    • Host: Private IP of your Cloud SQL instance (available in the instance details)
    • Credentials: SQL Server username and password

image10.png

 

image7.pngStep 5: Build and deploy your pipeline

  • With the connection configured, use the Studio UI to design your pipeline.
  • Add your SQL Server source and Cloud Bigtable as the sink.
  • Validate the pipeline configuration, deploy it, and run the pipeline.

image8.pngPros:

  1. User-friendly interface: Drag-and-drop UI reduces engineering effort and accelerates pipeline development.
  2. Seamless GCP integration: First-party connectors ensure native support for SQL Server, Bigtable, and other Google Cloud services.
  3. Operational simplicity: Managed service reduces infrastructure maintenance and automates scaling, retries, and logging.

Cons:

  1. Cost considerations: As a managed service, CDF can be more expensive than custom Dataflow pipelines, especially for large volumes or always-on pipelines.
  2. Advanced use cases require coding: Complex logic (e.g., custom JSON parsing or enrichment) still requires Python/Java development, which may increase development effort for non-technical teams.
Conclusion

Migrating from SQL Server to Bigtable offers significant performance and scalability advantages, especially for organizations dealing with massive datasets and real-time processing needs. While non-heterogeneous migration presents challenges, careful planning and the right tools can ensure a smooth transition.

In this guide, we’ve covered everything from schema design to data migration using Cloud Data Fusion, highlighting its simplicity, flexibility, and integration capabilities. With these insights, you’re now equipped to unlock the full potential of Bigtable and drive meaningful outcomes for your business.

💡 Note: While this article focuses on the Data Fusion approach, other methods — such as custom pipelines built with Dataflow — offer flexible and scalable alternatives, particularly for more complex or highly customized migration scenarios. These approaches may be explored in a future article.

Thank you for reading!. Have questions? Ask me in the comments below!

References: