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.
airflow/providers/google/cloud/example_dags/example_mssql_to_gcs.py
upload = MSSQLToGCSOperator(
task_id='mssql_to_gcs',
mssql_conn_id='airflow_mssql',
sql=SQL_QUERY,
bucket=GCS_BUCKET,
filename=FILENAME,
export_format='csv',
)
Reference¶
For further information, look at: * Microsoft SQL Server Documentation * Google Cloud Storage Documentation