diff --git a/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py b/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py index 531c076ffdf0..fdf2e0ea03e3 100644 --- a/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py +++ b/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py @@ -520,7 +520,7 @@ def __init__(self, options, root_staging_location=None): transport = None if self.google_cloud_options.dataflow_endpoint: endpoint = self.google_cloud_options.dataflow_endpoint - if 'localhost' in endpoint: + if 'localhost' in endpoint or 'sandbox' in endpoint: transport = 'rest' else: endpoint = re.sub('^https?://', '', endpoint)