def METHOD_NAME(
    gcs_client,
    gcs_source_path,
    gcs_target_path,
    project_id,
    target_bucket_name,
    log_table_id,
    object_name_config_file,
    default_db,
):
    """
    Check if batch report file already exist then delete before running the migration:
    """
    print("Starting Migration workflow")
    parent = f"projects/{project_id}/locations/us"
    # Construct a BigQuery Migration client object.
    service_client = bigquery_migration_v2.MigrationServiceClient()
    # Set the source dialect to Snowflake SQL.
    source_dialect = bigquery_migration_v2.Dialect()
    source_dialect.snowflake_dialect = bigquery_migration_v2.SnowflakeDialect()
    # Set the target dialect to BigQuery dialect.
    target_dialect = bigquery_migration_v2.Dialect()
    target_dialect.bigquery_dialect = bigquery_migration_v2.BigQueryDialect()
    # Source env
    source_env = bigquery_migration_v2.SourceEnv(default_database=default_db)
    json_data_string = readgcs_file(
        gcs_client, target_bucket_name, prefix=object_name_config_file
    )
    object_name_mapping_list = parse_json(json_data_string)
    # Prepare the config proto.
    translation_config = bigquery_migration_v2.TranslationConfigDetails(
        gcs_source_path=gcs_source_path,
        gcs_target_path=gcs_target_path,
        source_dialect=source_dialect,
        target_dialect=target_dialect,
        source_env=source_env,
        name_mapping_list=object_name_mapping_list,
    )
    # Prepare the task.
    migration_task = bigquery_migration_v2.MigrationTask(
        type_="Translation_Snowflake2BQ", translation_config_details=translation_config
    )
    # Prepare the workflow.
    workflow = bigquery_migration_v2.MigrationWorkflow(
        display_name="Demo_Snowflake2BQ_Migration"
    )
    workflow.tasks["translation-task"] = migration_task
    # Prepare the API request to create a migration workflow.
    request = bigquery_migration_v2.CreateMigrationWorkflowRequest(
        parent=parent,
        migration_workflow=workflow,
    )
    response = service_client.METHOD_NAME(request=request)
    # code to check the migration completed succesfully or not:
    starttime = t.time()
    while True:
        if file_exist(gcs_client, target_bucket_name, log_table_id):
            break
        else:
            t.sleep(60.0 - ((t.time() - starttime) % 60.0))
    print("Created workflow:")
    print(response.display_name)
    print("Current state:")
    print(response.State(response.state))
    print("Migration completed succesfully")