Microsoft SQL Server To Google Cloud Storage Operator

The Google Cloud Storage (GCS) service is used to store large data from various applications. This page shows how to copy data from Microsoft SQL Server to GCS.

Prerequisite Tasks

MSSQLToGCSOperator

MSSQLToGCSOperator allows you to upload data from Microsoft SQL Server database to GCS.

Below is an example of using this operator to upload data to GCS.

tests/system/providers/google/cloud/gcs/example_mssql_to_gcs.py[source]

    upload_mssql_to_gcs = MSSQLToGCSOperator(
        task_id='mssql_to_gcs',
        mssql_conn_id='airflow_mssql',
        sql=SQL_QUERY,
        bucket=BUCKET_NAME,
        filename=FILENAME,
        export_format='csv',
    )

Reference

For further information, look at: * Microsoft SQL Server Documentation * Google Cloud Storage Documentation

Was this entry helpful?