Skip to content

Commit

Permalink
fix: dataprocpysparkjob project_id as self.project_id (#17075)
Browse files Browse the repository at this point in the history
set project_id as self.project_id from self.hook.project_id
  • Loading branch information
iostreamdoth committed Jul 19, 2021
1 parent 126788a commit 026ffe6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/providers/google/cloud/operators/dataproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,7 @@ def generate_job(self):
# Check if the file is local, if that is the case, upload it to a bucket
if os.path.isfile(self.main):
cluster_info = self.hook.get_cluster(
project_id=self.hook.project_id, region=self.region, cluster_name=self.cluster_name
project_id=self.project_id, region=self.region, cluster_name=self.cluster_name
)
bucket = cluster_info['config']['config_bucket']
self.main = f"gs://{bucket}/{self.main}"
Expand All @@ -1613,7 +1613,7 @@ def execute(self, context):
# Check if the file is local, if that is the case, upload it to a bucket
if os.path.isfile(self.main):
cluster_info = self.hook.get_cluster(
project_id=self.hook.project_id, region=self.region, cluster_name=self.cluster_name
project_id=self.project_id, region=self.region, cluster_name=self.cluster_name
)
bucket = cluster_info['config']['config_bucket']
self.main = self._upload_file_temp(bucket, self.main)
Expand Down

0 comments on commit 026ffe6

Please sign in to comment.
  翻译: