PySpark and Spark SQL side by side, the configuration you'll actually tune, what to do when the Spark UI looks wrong, and the AWS Glue essentials — plus every term from the course.
| To… | Spark SQL | PySpark DataFrame API |
|---|---|---|
| Pick columns | SELECT order_id, amount * 1.2 AS gross | df.select("order_id", (F.col("amount") * 1.2).alias("gross")) |
| Filter rows | WHERE status = 'delivered' AND amount > 100 | df.where((F.col("status") == "delivered") & (F.col("amount") > 100)) |
| NULL checks | WHERE country IS NULL | df.where(F.col("country").isNull()) |
| Default a NULL | COALESCE(country, 'unknown') | F.coalesce(F.col("country"), F.lit("unknown")) |
| Conditional | CASE WHEN amount >= 100 THEN 'big' ELSE 'small' END | F.when(F.col("amount") >= 100, "big").otherwise("small") |
| Add a column | SELECT *, DATE_FORMAT(order_date, 'yyyy-MM') AS month | df.withColumn("month", F.date_format("order_date", "yyyy-MM")) |
| Aggregate | SELECT status, COUNT(*), SUM(amount) … GROUP BY status | df.groupBy("status").agg(F.count("*"), F.sum("amount")) |
| Filter groups | … GROUP BY name HAVING COUNT(*) >= 4 | .agg(F.count("*").alias("n")).where(F.col("n") >= 4) |
| Join | FROM orders o JOIN customers c ON o.customer_id = c.customer_id | orders.join(customers, "customer_id", "inner") |
| Keep rows with / without a match | LEFT SEMI JOIN … / LEFT ANTI JOIN … | a.join(b, "id", "left_semi") / a.join(b, "id", "left_anti") |
| Window | ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY order_date DESC) | F.row_number().over(Window.partitionBy("customer_id").orderBy(F.desc("order_date"))) |
| Sort + top N | ORDER BY amount DESC LIMIT 10 | df.orderBy(F.col("amount").desc()).limit(10) |
| Distinct | SELECT DISTINCT country | df.select("country").distinct() |
| Query a DataFrame with SQL | SELECT … FROM orders | df.createOrReplaceTempView("orders"); spark.sql("SELECT … FROM orders") |
Assumes from pyspark.sql import functions as F, Window. Both forms compile to the same optimised plan.
| Config | Default | What it controls |
|---|---|---|
| spark.sql.shuffle.partitions | 200 | Partitions after a shuffle (joins, aggregations). AQE can coalesce them at runtime. |
| spark.sql.autoBroadcastJoinThreshold | 10 MB | Tables smaller than this are broadcast for joins; -1 disables auto-broadcast. |
| spark.sql.adaptive.enabled | true (3.2+) | Adaptive Query Execution: re-plans at stage boundaries using runtime statistics. |
| spark.sql.adaptive.advisoryPartitionSizeInBytes | 64 MB | Target size for AQE's post-shuffle partitions — only honoured when spark.sql.adaptive.coalescePartitions.parallelismFirst is false (it's true by default). |
| spark.sql.adaptive.skewJoin.enabled | true | Splits skewed shuffle partitions in sort-merge joins (> 5× median and > 256 MB). |
| spark.sql.files.maxPartitionBytes | 128 MB | Maximum bytes packed into one input partition when reading files. |
| spark.executor.memoryOverhead | max(384 MB, 10%) | Off-heap per executor: JVM overhead, Python workers, network buffers. |
| spark.memory.fraction | 0.6 | Share of (heap − 300 MB) for unified execution + storage memory. |
| spark.memory.storageFraction | 0.5 | Part of unified memory protected from eviction for cached data. |
| spark.dynamicAllocation.enabled | false | Scale executors with the task backlog (needs shuffle tracking or an external shuffle service). |
| spark.sql.execution.arrow.pyspark.enabled | true (4.2+) | Use Apache Arrow for toPandas() / createDataFrame(pandas_df); off by default before Spark 4.2. |
| spark.sql.ansi.enabled | true (4.0+) | ANSI SQL mode: invalid casts and division by zero raise errors instead of returning NULL. |
| spark.task.maxFailures | 4 | Attempts per task before the job fails. |
Defaults as documented for Spark 3.5 and 4.x. Set them with spark.conf.set(…), --conf or, on Glue, the job's --conf parameter.
| You see | Likely cause | First fixes |
|---|---|---|
| One task runs 10× longer than the median | Data skew — a hot key in one partition | AQE skew join, salt the key, broadcast the small side, handle NULL keys separately |
| Thousands of tiny tasks / tiny output files | Too many partitions or partitionBy on a high-cardinality column | Let AQE coalesce, coalesce()/repartition() before write, partition on low-cardinality columns |
| Spill (memory) / spill (disk) in stage metrics | Partitions too big for execution memory | More shuffle partitions, more memory per core, avoid wide rows |
| Driver OutOfMemoryError | collect() / toPandas() on big data, or a huge broadcast | Write results out, aggregate first, lower the broadcast threshold |
| Two Exchanges + Sorts on a small-dimension join | Sort-merge join where a broadcast would do | F.broadcast(dim) or raise autoBroadcastJoinThreshold (if dim stays small) |
| Glue job reprocesses every file each run | Bookmarks off, no transformation_ctx, or no job.commit() | Enable bookmarks and add both |
import sys
from awsglue.transforms import ApplyMapping
from awsglue.utils import getResolvedOptions
from awsglue.context import GlueContext
from awsglue.job import Job
from pyspark.context import SparkContext
args = getResolvedOptions(sys.argv, ["JOB_NAME"])
glueContext = GlueContext(SparkContext.getOrCreate())
spark = glueContext.spark_session
job = Job(glueContext)
job.init(args["JOB_NAME"], args) # bookmarks start here
# … read (with transformation_ctx), transform, write …
job.commit() # bookmarks advance here| Type | DPU | Per worker | Good for |
|---|---|---|---|
| G.025X | 0.25 | 2 vCPU · 4 GB | Low-volume streaming jobs |
| G.1X | 1 | 4 vCPU · 16 GB | Default for most ETL |
| G.2X | 2 | 8 vCPU · 32 GB | Memory-hungry transforms, ML |
| G.4X | 4 | 16 vCPU · 64 GB | Heavy aggregations and joins |
| G.8X | 8 | 32 vCPU · 128 GB | The most demanding jobs |
Billing is per DPU-hour, per second with a 1-minute minimum on Glue 2.0 and later. Check the AWS Glue docs for the newest worker types and versions.
| create_dynamic_frame.from_catalog | Read a catalog table (push_down_predicate prunes partitions) |
| create_dynamic_frame.from_options | Read S3 / JDBC / … by connection options |
| ApplyMapping | Rename and cast columns in one step |
| ResolveChoice | Settle ambiguous (choice) types: cast, make_cols, make_struct, project |
| DropNullFields | Drop fields that are null in every record |
| Relationalize | Flatten nested JSON into a set of flat tables |
| SelectFields / Filter / Map | Project, filter and map records |
| toDF() / DynamicFrame.fromDF() | Switch to DataFrames for joins, windows and built-in functions — and back |
| write_dynamic_frame.from_options | Write to S3 (partitionKeys), JDBC, … |
The process that runs your main program, creates the SparkSession, plans jobs into stages and tasks, and schedules them on executors.
A JVM process launched on a worker node for one application that runs tasks in parallel slots and holds cached data and shuffle files.
The external service — Spark Standalone, YARN or Kubernetes — that allocates CPU and memory for the driver and executors but never runs your code.
Where the driver runs: in the submitting process (client mode) or inside the cluster, started by the cluster manager (cluster mode).
The parallel computation Spark launches in response to an action, made up of one or more stages.
A set of identical tasks that run the same pipelined narrow operations on different partitions; stages are separated by shuffles.
The unit of work sent to one executor slot: a stage's code applied to exactly one partition.
Capacity to run one task at a time — by default one per executor core — so executors × cores sets how many tasks run in parallel.
A chunk of a dataset processed by one task; the number of partitions sets a stage's parallelism.
Resilient Distributed Dataset: an immutable, partitioned collection defined by its partitions, compute function, dependencies, optional partitioner and preferred locations.
The chain of dependencies recording how each partition was derived from its parents, used to recompute lost partitions instead of replicating data.
Narrow: each output partition depends on one input partition (filter, select) and can be pipelined; wide: it depends on many (groupBy, join) and needs a shuffle.
The all-to-all redistribution of rows by key across executors, where map tasks write blocks to local disk and reduce tasks fetch them over the network.
The directed acyclic graph of operations behind a job, which the DAGScheduler cuts into stages at shuffle boundaries.
Spark's model of recording transformations as a plan and executing nothing until an action needs a result.
An operation such as filter, select, groupBy or join that returns a new DataFrame or RDD and only extends the plan.
An operation such as count, collect, show or write that needs a result and therefore triggers a job.
How close a task runs to its data — PROCESS_LOCAL, NODE_LOCAL, NO_PREF, RACK_LOCAL or ANY — with spark.locality.wait (3 s) before each fallback.
The heap region of (heap − 300 MB) × spark.memory.fraction (0.6) shared by execution and storage, with spark.memory.storageFraction (0.5) protected for cached blocks.
Non-heap memory added to each executor container — default max(384 MB, 10% of the heap) — for JVM native memory and, in PySpark, Python workers.
How persist() keeps a dataset — in memory, on disk, serialised or replicated — e.g. MEMORY_AND_DISK_DESER, the DataFrame cache() default.
A read-only value shipped once to each executor and cached there, instead of being serialised into every task.
A shared variable that tasks can only add to and the driver can read; updates are guaranteed exactly once only inside actions.
Scaling the number of executors up when tasks queue and down when executors sit idle, enabled with spark.dynamicAllocation.enabled.
A long-running per-node process that serves shuffle files so they survive executor removal; not available on Kubernetes.
The library PySpark uses to call JVM objects from Python over a local socket; on a classic PySpark driver every DataFrame call goes through it.
A Python process an executor starts only when a task needs Python — a Python UDF, pandas UDF or RDD lambda — and exchanges serialised data with over a local socket.
The entry point to the DataFrame and SQL APIs; SparkSession.builder…getOrCreate() returns the active session or starts a new application.
An immutable, distributed table of rows with a named, typed schema, built lazily as a plan and executed when an action runs.
The object a DataFrame record becomes on the driver (from collect, take or first), readable like a named tuple: row.qty, row["qty"] or row.asDict().
The column names, data types and nullability of a DataFrame, given as a StructType or a DDL string such as "id STRING, amount DOUBLE".
The Spark type for a schema or a nested record: an ordered list of StructField(name, dataType, nullable) entries.
Letting Spark guess column types from the data, which for CSV and JSON costs an extra pass over the input and can produce different types from run to run.
What a DataFrame write does when the target already exists: error / errorifexists (the default), append, overwrite or ignore.
An unevaluated expression tree such as F.col("a") * 2 or F.when(…) that Spark evaluates for each row inside the JVM when the plan runs.
A user-defined function that runs your Python code once per row in a Python worker; it is opaque to the optimizer, so filters on it can't be pushed down.
A vectorised UDF declared with @pandas_udf and type hints that receives Arrow batches as pandas Series or DataFrames and runs once per batch.
A columnar in-memory format PySpark uses to move data efficiently between the JVM and Python for pandas UDFs, toPandas() and createDataFrame(pandas_df).
A generator function that turns each element of an array (or entry of a map) into its own row, dropping rows whose array is empty or null — explode_outer keeps them.
An array function such as transform, filter, exists or aggregate that applies a lambda-built expression to every element without exploding the array.
A function that parses a JSON string column into a struct, map or array using a schema you supply.
A function such as row_number, rank, lag or a windowed sum that computes a value for each row over related rows defined by Window.partitionBy().orderBy(), without collapsing them.
A join that keeps only the left rows with no match on the right, returning only the left columns — the standard check for orphaned keys.
One incremental Spark job in a Structured Streaming query that processes the data that arrived since the previous trigger.
What a streaming query writes on each trigger: append (new rows that are final), update (rows that changed) or complete (the whole result table).
A moving event-time threshold, set with withWatermark, that tells Spark how late data may arrive so it can finalise windows and drop old state.
A streaming trigger that processes everything available when the query starts, in rate-limited micro-batches, and then stops — an incremental batch job.
The durable directory where a streaming query records offsets, commits and state so it can resume exactly where it stopped after a failure or restart.
A streaming sink that calls your function with each micro-batch as a regular DataFrame plus its batch_id, so you can use any batch writer.
The client-server protocol (Spark 3.4+) in which a thin client sends unresolved logical plans over gRPC to a remote Spark server and receives results as Arrow batches.
A session-scoped name for a DataFrame's query plan, created with createOrReplaceTempView or CREATE TEMPORARY VIEW, that SQL can query; no data is copied and the name disappears with the session.
A view created with createGlobalTempView that every session of the application can see, stored in the system database global_temp and queried as global_temp.<name> until the application stops.
A metastore table whose files Spark writes under the warehouse directory (spark.sql.warehouse.dir) and owns, so DROP TABLE deletes the data as well as the definition.
A metastore table defined over files at a LOCATION (or a path option) that Spark doesn't own; DROP TABLE removes only the metadata and leaves the files in place.
The persistent catalog of databases, tables, schemas, file locations and partitions that Spark consults for non-temporary tables — a Hive metastore, or the AWS Glue Data Catalog on EMR and Glue.
SQL's logic of TRUE, FALSE and NULL (unknown), in which any comparison with NULL yields NULL and WHERE, HAVING and join conditions keep only the rows that evaluate to TRUE.
The <=> operator (eqNullSafe in PySpark), which returns TRUE when both sides are NULL and FALSE when only one is, so it never returns NULL.
The clause that filters groups after aggregation using aggregate values, unlike WHERE, which filters individual rows before grouping.
A GROUP BY extension that computes several groupings in one query and stacks the results; ROLLUP(a, b) and CUBE(a, b) are shorthands for common sets of groupings.
The first phase of a distributed aggregate, in which each task pre-aggregates its own rows per key (partial_sum, partial_count) so that at most one row per key per task is shuffled to the final aggregate.
A join (LEFT SEMI JOIN, how="left_semi") that returns each left row that has at least one match on the right, once, with only the left side's columns.
A join (LEFT ANTI JOIN, how="left_anti") that returns the left rows that have no match on the right, with only the left side's columns.
The subset of a window partition, relative to the current row, that a window aggregate uses — for example ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW for a running total.
A named intermediate result, WITH name AS (query), that the rest of one SQL statement can reference; Spark inlines it into the plan rather than storing it.
A subquery in parentheses that returns a single value (at most one row with one column) and can be used like a literal in SELECT, WHERE or HAVING.
Spark SQL's extensible query optimiser, which analyses, rewrites and physically plans both SQL and DataFrame queries using rule-based and cost-based techniques.
The Catalyst phase that resolves table, column and function names against the catalog and checks types, turning an unresolved logical plan into an analyzed one.
A tree of relational operators such as scan, filter, project, join and aggregate that describes what a query computes, independent of how it will be executed.
The executable form of a query, made of concrete operators such as FileScan, HashAggregate, SortMergeJoin and Exchange chosen by the physical planner.
An optimisation that moves filters as close to the data as possible — below joins and into the data source reader, where Parquet can use them to skip row groups.
An optimisation that removes columns no operator needs, so a columnar source such as Parquet reads only the columns listed in the scan's ReadSchema.
An optimisation that evaluates expressions made only of literals, such as 2 * 5, once at planning time instead of once per row.
The technique of fusing a chain of physical operators into one generated Java function compiled at run time, shown as *(n) markers in explain output.
Spark's execution-engine work on memory and CPU efficiency: compact binary rows (UnsafeRow) in Spark-managed memory, cache-aware algorithms and whole-stage code generation.
The SQL statement (DataFrame.explain() in PySpark) that prints a query's plans; its modes include EXTENDED, CODEGEN, COST and FORMATTED.
Spark SQL's runtime re-optimisation (spark.sql.adaptive.enabled, on by default since 3.2) that re-plans the rest of a query after each shuffle or broadcast stage, using measured sizes.
A join that copies the small side to every executor as a hash table so the large side is joined in place without a shuffle; automatic below spark.sql.autoBroadcastJoinThreshold (10 MB).
Spark's default join for large equi-joins: both sides are shuffled by the join key and sorted, then merged partition by partition.
A join that shuffles both sides by key and builds a hash table from the smaller side of each partition, skipping the sorts of a sort-merge join.
The fallback for joins without an equality condition: one side is broadcast and every row is compared with every broadcast row.
An instruction such as /*+ BROADCAST(t) */, MERGE, SHUFFLE_HASH or SHUFFLE_REPLICATE_NL (or df.hint(...)) asking Spark to use a specific join strategy for a relation.
An uneven distribution of rows across partitions, usually from a hot key, that makes a few tasks far bigger and slower than the rest.
Adding a random sub-key (0…N-1) to a hot key on the big side, and replicating the other side N times, so one key's rows spread over N partitions.
A task that runs much longer than the others in its stage and holds up the whole stage, caused by skew, a slow node or GC.
Data written from execution memory to local disk when a task's sort, aggregation or join buffers don't fit, shown as Spill (Memory) and Spill (Disk) in the Spark UI.
A DataFrame method that reduces the number of partitions by merging existing ones without a shuffle, lowering the parallelism of the stage it belongs to.
A DataFrame method that shuffles data into a given number of partitions, round-robin or hashed by the given columns.
Tables made of many tiny files, often from partitioned writes (files ≈ tasks × partition values), that slow down listing, opening and scanning for every reader.
Skipping whole partition directories (such as dt=2025-06-01/) whose values can't match a filter on the partition column, shown as PartitionFilters in the scan.
A Spark 3.0+ optimisation that uses a filtered dimension's join keys at runtime to prune partitions of a fact table partitioned by the join key.
Hash-distributing a table into a fixed number of buckets at write time (bucketBy + saveAsTable) so later joins and aggregations on the bucket column need no shuffle.
A horizontal slice of a Parquet file holding one column chunk per column, with min/max statistics a reader uses to skip it.
A file format such as Parquet or ORC that stores each column's values together, so queries read only the columns they need and compress better.
A metadata layer such as Apache Iceberg, Delta Lake or Apache Hudi on top of data files that adds atomic commits, schema evolution, time travel and file-level statistics.
Re-launching a copy of a task that runs much slower than its stage's median (spark.speculation, off by default) and keeping whichever copy finishes first.
Saving a DataFrame to reliable storage with checkpoint(), or on executors with localCheckpoint(), to truncate a long lineage.
A serializer (spark.serializer = KryoSerializer) that is faster and more compact than the default Java serialization, mainly useful for RDD code.
A Spark service (port 18080 by default) that rebuilds the web UI of finished or crashed applications from their event logs.
The record of an application's scheduler and task events that Spark writes when spark.eventLog.enabled is true, read by the history server.
AWS's serverless data integration service: a metadata catalog, schema-discovering crawlers, managed Spark and Python jobs, and triggers and workflows to run them.
Glue's persistent, Hive-metastore-compatible metadata store (one per AWS account per Region) that holds databases, tables, partitions and connections.
A logical group of table definitions in the Data Catalog; it holds metadata only, never data.
Metadata describing a dataset (columns, partition keys, location, input/output format, SerDe and parameters such as classification), versioned on every update.
A Data Catalog index on a subset of a table's partition keys (up to 3 per table) that lets GetPartitions fetch matching partitions instead of loading them all.
A Glue program that connects to a data store, runs classifiers to infer formats and schemas, and creates or updates tables and partitions in the Data Catalog.
Logic that recognises a data format and returns a schema and a certainty score; a crawler tries custom classifiers first, then the built-in ones.
A pattern of named building blocks such as %{TIMESTAMP_ISO8601:ts} that a custom grok classifier uses to split text log lines into columns.
Crawler setting for detected schema changes (UPDATE_IN_DATABASE or LOG) and for deleted objects (LOG, DEPRECATE_IN_DATABASE or DELETE_FROM_DATABASE).
Crawler setting for runs after the first: crawl everything, crawl only new folders, or crawl only the folders named in S3 event notifications.
Data Processing Unit: 4 vCPU and 16 GB of memory, the unit Glue capacity and billing are measured in (billed per DPU-hour).
The size of each Glue worker (G.025X, G.1X, G.2X, G.4X, G.8X, G.12X, G.16X or memory-optimised R.1X–R.8X); each Spark worker hosts one executor or the driver.
Job setting that pins the runtime, for example Glue 4.0 = Spark 3.3.0 with Python 3.10 and Glue 5.0 = Spark 3.5.4 with Python 3.11.
A lower-priced execution class for Glue 3.0+ Spark jobs on G.1X or G.2X workers that runs on spare capacity, so start and finish times vary.
Glue 3.0+ option in which the number of workers is a maximum and Glue adds or removes executors with demand, billing each worker only while it runs.
One execution of a Glue job with its own run ID, arguments, freshly provisioned workers and state (STARTING, RUNNING, SUCCEEDED, FAILED, TIMEOUT, STOPPED…).
A Glue object that starts jobs or crawlers on a cron schedule, on demand, when watched jobs or crawlers reach given states, or (for workflows) on EventBridge events.
A Glue graph of triggers, crawlers and jobs with a single start trigger, run, monitored and resumed as one unit.
Name/value pairs attached to a workflow run that its jobs can read and overwrite to pass small control values to later steps.
A Data Catalog object holding what's needed to reach a data store (JDBC URL, Secrets Manager secret, subnet and security groups); Glue uses it to place ENIs in your VPC.
A named set of encryption settings attached to jobs and crawlers that covers S3 output (SSE-S3 or SSE-KMS), CloudWatch logs and job bookmarks.
AWS service that adds database-, table-, column- and row-level permissions on Data Catalog resources and vends scoped S3 credentials to Glue, Athena, Redshift Spectrum and EMR.
The Glue console's authoring environment: a visual job editor that generates scripts, a script editor, notebooks and job run monitoring.
An on-demand serverless Spark backend that notebooks and IDEs use to run Glue code cell by cell, billed per second with a 1-minute minimum.
Serverless data quality checks written in DQDL that run against catalog tables or inside ETL jobs, built on the open-source Deequ framework.
The awsglue class that wraps a SparkContext and adds Glue readers, writers, connections and the Glue logger; glueContext.spark_session gives the SparkSession.
The object whose init() loads a job's bookmark state at the start of a script and whose commit() saves it atomically at the end.
The awsglue.utils function that returns the job parameters you name, such as JOB_NAME or input_path, as a dict read from sys.argv.
Glue's distributed collection of self-describing records whose schema is computed on demand and can hold choice types; convert with toDF() and DynamicFrame.fromDF().
One self-describing record in a DynamicFrame, like a DataFrame row that carries its own field names and types.
A union type in a DynamicFrame schema that records a field holding values of more than one type, such as double and string.
The Glue transform that turns choice types into one type per field with cast, project, make_cols, make_struct or MATCH_CATALOG.
The Glue transform that renames, casts and selects fields from (source, type, target, type) tuples, dropping fields that are not listed.
The Glue transform that flattens nested structs and pivots arrays into child tables, returning a collection of flat frames linked by join keys.
The Glue transform that removes fields whose type is null, meaning they are missing or null in every record.
A unique, stable name on a Glue source, transform or sink that keys its state in the job bookmark.
State Glue persists per job between runs, one entry per transformation_ctx, so incremental runs read only new S3 objects or JDBC rows.
The JDBC column or columns (the primary key by default, or jobBookmarkKeys) whose saved values decide which rows are new; each must be strictly monotonic.
A Spark SQL condition on partition columns, passed as push_down_predicate, that Glue applies to the catalog's partitions before listing files in S3.
An additional_options filter that the Data Catalog evaluates server-side with partition indexes, so only matching partitions are returned to the job.
An S3 connection option that, set to inPartition with an optional groupSize in bytes, reads many small row-format files as one task per group.
A Glue S3 sink option listing the columns used to write Hive-style key=value folders.
A Glue sink option that makes the job create or update the catalog table and register new partitions as it writes, without a crawler.
Glue's Parquet writer for DynamicFrames, enabled with useGlueParquetWriter (formerly format glueparquet), which computes the schema while writing.
The GlueContext method a streaming job uses to run a function on every micro-batch, with windowSize and checkpointLocation as required options.
The S3 path where a Glue streaming job records how far it has read, so a restarted job resumes where it stopped.
Jupyter magics such as %glue_version, %worker_type, %number_of_workers and %idle_timeout that configure a Glue interactive session before it starts.
The official public.ecr.aws/glue/aws-glue-libs container with the Glue ETL library and Spark, used to run Glue scripts and pytest locally.
Data Quality Definition Language, the rule language of Glue Data Quality, for example Rules = [IsComplete "order_id", ColumnValues "amount" > 0].
The awsgluedq transform that evaluates a DQDL ruleset against a DynamicFrame and returns one outcome per rule, optionally publishing CloudWatch metrics.