@@ -49,7 +49,8 @@ def __init__(self,
4949 athena_encryption : Optional [str ] = "SSE_S3" ,
5050 athena_kms_key : Optional [str ] = None ,
5151 athena_database : str = "default" ,
52- athena_ctas_approach : bool = False ):
52+ athena_ctas_approach : bool = False ,
53+ redshift_temp_s3_path : Optional [str ] = None ):
5354 """
5455 Most parameters inherit from Boto3 or Pyspark.
5556 https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html
@@ -73,6 +74,7 @@ def __init__(self,
7374 :param athena_s3_output: AWS S3 path
7475 :param athena_encryption: None|'SSE_S3'|'SSE_KMS'|'CSE_KMS'
7576 :param athena_kms_key: For SSE-KMS and CSE-KMS , this is the KMS key ARN or ID.
77+ :param redshift_temp_s3_path: redshift_temp_s3_path: AWS S3 path to write temporary data (e.g. s3://...)
7678 """
7779 self ._profile_name : Optional [str ] = (boto3_session .profile_name if boto3_session else profile_name )
7880 self ._aws_access_key_id : Optional [str ] = (boto3_session .get_credentials ().access_key
@@ -95,6 +97,7 @@ def __init__(self,
9597 self ._athena_kms_key : Optional [str ] = athena_kms_key
9698 self ._athena_database : str = athena_database
9799 self ._athena_ctas_approach : bool = athena_ctas_approach
100+ self ._redshift_temp_s3_path : Optional [str ] = redshift_temp_s3_path
98101 self ._primitives = None
99102 self ._load_new_primitives ()
100103 if boto3_session :
@@ -149,7 +152,8 @@ def _load_new_primitives(self):
149152 athena_encryption = self ._athena_encryption ,
150153 athena_kms_key = self ._athena_kms_key ,
151154 athena_database = self ._athena_database ,
152- athena_ctas_approach = self ._athena_ctas_approach )
155+ athena_ctas_approach = self ._athena_ctas_approach ,
156+ redshift_temp_s3_path = self ._redshift_temp_s3_path )
153157
154158 @property
155159 def profile_name (self ):
@@ -223,6 +227,10 @@ def athena_database(self) -> str:
223227 def athena_ctas_approach (self ) -> bool :
224228 return self ._athena_ctas_approach
225229
230+ @property
231+ def redshift_temp_s3_path (self ) -> Optional [str ]:
232+ return self ._redshift_temp_s3_path
233+
226234 @property
227235 def boto3_session (self ):
228236 return self ._boto3_session
@@ -304,7 +312,8 @@ def __init__(self,
304312 athena_encryption : Optional [str ] = None ,
305313 athena_kms_key : Optional [str ] = None ,
306314 athena_database : Optional [str ] = None ,
307- athena_ctas_approach : bool = False ):
315+ athena_ctas_approach : bool = False ,
316+ redshift_temp_s3_path : Optional [str ] = None ):
308317 """
309318 Most parameters inherit from Boto3.
310319 https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html
@@ -325,6 +334,7 @@ def __init__(self,
325334 :param athena_s3_output: AWS S3 path
326335 :param athena_encryption: None|'SSE_S3'|'SSE_KMS'|'CSE_KMS'
327336 :param athena_kms_key: For SSE-KMS and CSE-KMS , this is the KMS key ARN or ID.
337+ :param redshift_temp_s3_path: AWS S3 path to write temporary data (e.g. s3://...)
328338 """
329339 self ._profile_name : Optional [str ] = profile_name
330340 self ._aws_access_key_id : Optional [str ] = aws_access_key_id
@@ -342,6 +352,7 @@ def __init__(self,
342352 self ._athena_kms_key : Optional [str ] = athena_kms_key
343353 self ._athena_database : Optional [str ] = athena_database
344354 self ._athena_ctas_approach : bool = athena_ctas_approach
355+ self ._redshift_temp_s3_path : Optional [str ] = redshift_temp_s3_path
345356
346357 @property
347358 def profile_name (self ):
@@ -407,6 +418,10 @@ def athena_database(self) -> Optional[str]:
407418 def athena_ctas_approach (self ) -> bool :
408419 return self ._athena_ctas_approach
409420
421+ @property
422+ def redshift_temp_s3_path (self ) -> Optional [str ]:
423+ return self ._redshift_temp_s3_path
424+
410425 @property
411426 def session (self ):
412427 """
@@ -427,4 +442,5 @@ def session(self):
427442 athena_encryption = self ._athena_encryption ,
428443 athena_kms_key = self ._athena_kms_key ,
429444 athena_database = self ._athena_database ,
430- athena_ctas_approach = self ._athena_ctas_approach )
445+ athena_ctas_approach = self ._athena_ctas_approach ,
446+ redshift_temp_s3_path = self ._redshift_temp_s3_path )
0 commit comments