@@ -71,7 +71,7 @@ def external_schema(cloudformation_outputs, parameters, glue_database):
7171 IAM_ROLE '{ parameters ["redshift" ]["role" ]} '
7272 REGION '{ region } ';
7373 """
74- engine = wr .catalog .get_engine (connection = f "aws-data-wrangler-redshift" )
74+ engine = wr .catalog .get_engine (connection = "aws-data-wrangler-redshift" )
7575 with engine .connect () as con :
7676 con .execute (sql )
7777 yield "aws_data_wrangler_external"
@@ -160,7 +160,7 @@ def test_redshift_temp_engine(parameters):
160160
161161
162162def test_postgresql_param ():
163- engine = wr .catalog .get_engine (connection = f "aws-data-wrangler-postgresql" )
163+ engine = wr .catalog .get_engine (connection = "aws-data-wrangler-postgresql" )
164164 df = wr .db .read_sql_query (sql = "SELECT %(value)s as col0" , con = engine , params = {"value" : 1 })
165165 assert df ["col0" ].iloc [0 ] == 1
166166 df = wr .db .read_sql_query (sql = "SELECT %s as col0" , con = engine , params = [1 ])
@@ -170,7 +170,7 @@ def test_postgresql_param():
170170def test_redshift_copy_unload (bucket , parameters ):
171171 path = f"s3://{ bucket } /test_redshift_copy/"
172172 df = get_df ().drop (["iint8" , "binary" ], axis = 1 , inplace = False )
173- engine = wr .catalog .get_engine (connection = f "aws-data-wrangler-redshift" )
173+ engine = wr .catalog .get_engine (connection = "aws-data-wrangler-redshift" )
174174 wr .db .copy_to_redshift (
175175 df = df ,
176176 path = path ,
@@ -220,7 +220,7 @@ def test_redshift_copy_unload(bucket, parameters):
220220
221221
222222def test_redshift_copy_upsert (bucket , parameters ):
223- engine = wr .catalog .get_engine (connection = f "aws-data-wrangler-redshift" )
223+ engine = wr .catalog .get_engine (connection = "aws-data-wrangler-redshift" )
224224 df = pd .DataFrame ({"id" : list ((range (1_000 ))), "val" : list (["foo" if i % 2 == 0 else "boo" for i in range (1_000 )])})
225225 df3 = pd .DataFrame (
226226 {"id" : list ((range (1_000 , 1_500 ))), "val" : list (["foo" if i % 2 == 0 else "boo" for i in range (500 )])}
@@ -313,7 +313,7 @@ def test_redshift_copy_upsert(bucket, parameters):
313313)
314314def test_redshift_exceptions (bucket , parameters , diststyle , distkey , sortstyle , sortkey , exc ):
315315 df = pd .DataFrame ({"id" : [1 ], "name" : "joe" })
316- engine = wr .catalog .get_engine (connection = f "aws-data-wrangler-redshift" )
316+ engine = wr .catalog .get_engine (connection = "aws-data-wrangler-redshift" )
317317 path = f"s3://{ bucket } /test_redshift_exceptions_{ random .randint (0 , 1_000_000 )} /"
318318 with pytest .raises (exc ):
319319 wr .db .copy_to_redshift (
@@ -347,7 +347,7 @@ def test_redshift_spectrum(bucket, glue_database, external_schema):
347347 partition_cols = ["par_int" ],
348348 )["paths" ]
349349 wr .s3 .wait_objects_exist (paths = paths , use_threads = False )
350- engine = wr .catalog .get_engine (connection = f "aws-data-wrangler-redshift" )
350+ engine = wr .catalog .get_engine (connection = "aws-data-wrangler-redshift" )
351351 with engine .connect () as con :
352352 cursor = con .execute (f"SELECT * FROM { external_schema } .test_redshift_spectrum" )
353353 rows = cursor .fetchall ()
@@ -361,7 +361,7 @@ def test_redshift_spectrum(bucket, glue_database, external_schema):
361361def test_redshift_category (bucket , parameters ):
362362 path = f"s3://{ bucket } /test_redshift_category/"
363363 df = get_df_category ().drop (["binary" ], axis = 1 , inplace = False )
364- engine = wr .catalog .get_engine (connection = f "aws-data-wrangler-redshift" )
364+ engine = wr .catalog .get_engine (connection = "aws-data-wrangler-redshift" )
365365 wr .db .copy_to_redshift (
366366 df = df ,
367367 path = path ,
@@ -399,7 +399,7 @@ def test_redshift_unload_extras(bucket, parameters, kms_key_id):
399399 schema = parameters ["redshift" ]["schema" ]
400400 path = f"s3://{ bucket } /{ table } /"
401401 wr .s3 .delete_objects (path = path )
402- engine = wr .catalog .get_engine (connection = f "aws-data-wrangler-redshift" )
402+ engine = wr .catalog .get_engine (connection = "aws-data-wrangler-redshift" )
403403 df = pd .DataFrame ({"id" : [1 , 2 ], "name" : ["foo" , "boo" ]})
404404 wr .db .to_sql (df = df , con = engine , name = table , schema = schema , if_exists = "replace" , index = False )
405405 paths = wr .db .unload_redshift_to_files (
@@ -466,7 +466,7 @@ def test_to_sql_cast(parameters, db_type):
466466def test_uuid (parameters ):
467467 table = "test_uuid"
468468 schema = parameters ["postgresql" ]["schema" ]
469- engine = wr .catalog .get_engine (connection = f "aws-data-wrangler-postgresql" )
469+ engine = wr .catalog .get_engine (connection = "aws-data-wrangler-postgresql" )
470470 df = pd .DataFrame (
471471 {
472472 "id" : [1 , 2 , 3 ],
0 commit comments