Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Platform Guide for AWS GLUE

End-to-end guide to running Zingg on AWS Glue from S3 bucket setup and IAM configuration to your first match result. Covers Community (open source) and Enterprise.

AWS Glue provides serverless Spark on AWS. There are no servers to manage; you define your session configuration, Glue provisions the workers, and you pay only for what you use. Zingg runs on Glue Interactive Sessions using the standard Python API. S3 is used for all data input, output, model storage, and checkpointing.

Uses Arguments, FieldDefinition, CsvPipe, and ZinggWithSpark. The full workflow runs in a single Glue Studio notebook.

AWS setup

Complete these steps in the AWS Console before opening any notebook.

Step 1: Create an S3 bucket and upload JARs

Zingg on AWS Glue requires six JAR files uploaded to S3 before the session starts. These are injected into the Glue workers at session startup via the %%configure magic cell.

Create an S3 bucket (for example zingg-production-storage) and upload all six JARs into a /jars/ folder inside it. Also upload your data file (for example test.csv) directly to the bucket.

AWS Console:

  1. Navigate to S3 → Buckets → Create bucket.

  2. Give the bucket a globally unique name (for example zingg-production-storage).

  3. Set the region to match where your Glue jobs will run (for example us-east-1).

  4. Once created, upload the following JAR files into a /jars/ folder:

JAR
Purpose

zingg-0.6.0.jar

The Zingg engine

zingg-common-client-0.6.0.jar

Common client

zingg-common-core-0.6.0.jar

Common core

zingg-spark-client-0.6.0.jar

Spark client

zingg-spark-core-0.6.0.jar

Spark core

zingg-common-infra-0.6.0.jar

Infrastructure link

Download all JARs from github.com/zinggAI/zingg/releases. Also upload your data file to the bucket root.

Step 2: Create an IAM role for Glue

AWS Glue Interactive Sessions require a dedicated IAM Role that allows the notebook to read and write S3, run Glue jobs, and pass the role to the Glue service.

Step 2a: Create the role

  1. Navigate to IAM Console → Roles → Create role.

  2. Trusted entity type: AWS service.

  3. Service or use case: Glue.

  4. Name the role (for example zingg-glue-role).

Step 2b: Attach managed policies

Search for and attach these four AWS managed policies:

Policy
Purpose

AmazonS3FullAccess

Read and write data and models in S3

AWSGlueConsoleFullAccess

Manage Glue jobs via the Studio UI

AWSGlueServiceRole

Required for Glue to run worker nodes

AmazonQDeveloperAccess

Enables AI coding assistance (optional)

Step 2c: Attach an inline policy

Create an inline policy named ZinggSessionPermissions with the following JSON. Replace the Resource ARN in AllowIAMPassRole with your own role ARN.

Step 3: Create a Glue notebook and attach the IAM role

  1. Navigate to AWS Glue Studio → Notebooks.

  2. Choose Jupyter Notebook → Interactive Session.

  3. Select the IAM role created in Step 2 (zingg-glue-role) from the dropdown.

  4. Open the notebook. Confirm the kernel in the top right shows Glue PySpark.

Notebook 01: Set up Zingg

Everything in this guide runs in a single Glue Studio notebook. The steps below follow the cell-by-cell execution order.

Step 4: Configure the Glue session (run this cell first)

This is the most important step for Glue. The %%configure magic cell must be the very first cell you run in a fresh notebook. It tells Glue to inject the Zingg JARs from S3 into every worker node and install the Zingg Python package before the Spark session starts. If you run any other cell first, the JARs will not be available.

Replace your-bucket with your actual S3 bucket name throughout.

Step 5: Initialise Spark and Glue contexts

AWS Glue requires a GlueContext alongside the standard Spark context. This is specific to Glue—other platforms do not need this.

Verify Java is available:

Step 6: Set the S3 checkpoint directory

Zingg uses a checkpoint directory to store intermediate Spark computation state. On Glue, this must be an S3 path - Glue workers are ephemeral and have no persistent local storage.

Verify it is set:

Step 7: Set the model ID and S3 storage paths

BUCKET is your S3 bucket name. modelId is the unique name for this model run. zinggDir is where Zingg writes model files and training data. Use the same values for every step in this notebook.

MARKED_DIR and UNMARKED_DIR are derived automatically. Zingg writes candidate pairs to UNMARKED_DIR during findTrainingData and reads labeled pairs from MARKED_DIR during train.

Step 8: Import libraries and set up helper functions

Helper functions for managing training data and labels:

Step 9: Build the arguments object

Arguments is the central configuration object. Every phase in this workflow reads from the same args instance.

Step 10: Preview your data

Read your CSV from S3 and preview it before configuring the Zingg pipes.

Step 11: Configure input and output pipes

CsvPipe connects Zingg to your S3 data. The schema string must match your dataset column names exactly.

Step 12: Define fields and match types

Every field in your input schema must appear in fieldDefinition. List the most important fields first — field order affects blocking quality.

Step 13: Configure performance settings

numPartitions controls how data is distributed across Glue workers. labelDataSampleSize controls how much of the dataset is scanned when finding candidate pairs.

Notebook 01 continued: Find training data and label pairs

Step 14: Find candidate pairs

Zingg scans your dataset using the field rules defined in Step 12 and selects the most informative pairs for labeling. Candidate pairs are saved to UNMARKED_DIR in your S3 bucket.

Step 15: Export candidate pairs for offline labeling

Initialise the label phase and pull candidate pairs into a local Pandas DataFrame:

Because standard Jupyter widgets do not work in Glue, export the candidate pairs as a vertical CSV to S3 for offline review. Each pair appears as a side-by-side block with a >>> DECISION row at the bottom where you enter 0 (No Match), 1 (Match), or 2 (Uncertain).

Step 16: Sync labeled pairs back to Zingg

After labeling the review sheet and uploading it back to S3, run this cell to read the labels and save them to the Zingg training data folder.

Notebook 01 continued: Generate model documentation (optional)

Step 17: Generate model documentation

Run generateDocs after labeling to produce a model report showing field weights, training data quality, and precision and recall estimates. The HTML report is written to your S3 model directory and can be downloaded from the S3 console.

Notebook 01 continued: Train and match

Step 18: Train and match

trainMatch combines train and match into a single phase. Zingg builds a model from your labeled pairs and immediately applies it to the full dataset. This is the most compute-intensive step; it distributes the workload across all Glue workers.

You can also run train and match as separate phases if you want to inspect the trained model before running the full dataset:

Step 19: View output

Match output is written to output_path in your S3 bucket as distributed part files. Spark reads the entire folder and merges them automatically.

Last updated

Was this helpful?