Skip to content

Commit

Permalink
add default location
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian authored and rudolfix committed Sep 14, 2022
1 parent 8f32a40 commit ef87098
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dlt/pipeline/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def default_dataset(self, new_value: str) -> None:
@classmethod
def from_services_dict(cls, services: StrAny, dataset_prefix: str, location: str) -> "GCPPipelineCredentials":
assert dataset_prefix is not None
return cls("bigquery", services["project_id"], dataset_prefix, services["client_email"], services["private_key"], location)
return cls("bigquery", services["project_id"], dataset_prefix, services["client_email"], services["private_key"], location or cls.LOCATION)

@classmethod
def from_services_file(cls, services_path: str, dataset_prefix: str, location: str) -> "GCPPipelineCredentials":
Expand All @@ -61,7 +61,7 @@ def from_services_file(cls, services_path: str, dataset_prefix: str, location: s

@classmethod
def default_credentials(cls, dataset_prefix: str, project_id: str = None, location: str = None) -> "GCPPipelineCredentials":
return cls("bigquery", project_id, dataset_prefix, None, None, location)
return cls("bigquery", project_id, dataset_prefix, None, None, location or cls.LOCATION)


@dataclass
Expand Down

0 comments on commit ef87098

Please sign in to comment.