skip to Main Content

Amazon web services – botocore.exceptions.NoRegionError: You must specify a region for EmrServerlessCreateApplicationOperator

I am trying to create a emr-serverless application through the EmrServerlessCreateApplicationOperator but I keep facing the error botocore.exceptions.NoRegionError: You must specify a region. I am passing the region like below: create_app = EmrServerlessCreateApplicationOperator( task_id="create_spark_app", job_type="SPARK", release_label="emr-6.6.0", config={"aws_access_key_id":args["aws_access_key_id"], "aws_secret_access_key": args["aws_secret_access_key"], "aws_session_token":…

VIEW QUESTION

Amazon web services – Why does AWS EMR PySpark get stuck when I try to aggregate dataframe

I'm running a Spark application in AWS EMR. The code is like this: with SparkSession.builder.appName(f"Spark App").getOrCreate() as spark: dataframe = spark.read.format('jdbc').options( ... ).load() print("Log A") max_date_result = dataframe.agg(max_(date_format('date', 'yyyy-MM-dd')).alias('max_date')).collect()[0] print("Log B") This application always gets stuck for a long time…

VIEW QUESTION
Back To Top
Search