✨ Generating Match Reports from Neon Data
A step-by-step walkthrough of Interzoid's Postgres Data Matching Wizard, connected directly to a Neon serverless Postgres database
This guide demonstrates Interzoid's data matching tool for Postgres using Neon. The goal is to identify duplicate records, perform entity resolution, discover inconsistent data, and show how you can join tables using data that is not exactly the same, but that clearly represents the same entity: an organization name, a person name, an address, and so on.
Neon is a serverless PostgreSQL platform. It separates storage from compute, scales compute to zero when idle, and adds database branching, while remaining a full PostgreSQL database that speaks the standard wire protocol. In this demonstration, Interzoid connects directly to a Neon database using a standard PostgreSQL connection string, allowing us to process and improve data without requiring a custom integration.
Why Matching Matters
Traditional SQL joins and GROUP BY operations depend on values being identical. Real data rarely cooperates. The same customer arrives as "Acme Corp.", "ACME Corporation", and "Acme Inc" across three different systems, and every exact-match query treats them as three separate companies. Interzoid's matching algorithms generate a similarity key for each value, a short string derived from the meaning and structure of the data rather than its exact characters. Records that represent the same real-world entity receive the same key, which turns fuzzy, human-entered values into something you can sort, group, and join on.
What You Will Need
- An Interzoid API Key: Register for an account to obtain your unique API license key. This key authenticates your requests and tracks usage credits.
- A Neon Account and Project: Free to create at Neon.com. Every project includes a full PostgreSQL database, named
neondbby default. - The psql Client: Neon has no browser-based CSV import, so loading sample data requires
psql, the standard PostgreSQL command line client. Any PostgreSQL installation includes it, and it is also available as a standalone client package. - Data to Match: Any table containing names, companies, or addresses. Sample data is provided below if you want to start from scratch.
- Available Credits: Each record processed consumes one API credit. Make sure your account has enough credits for the number of records in your table.
1Create Your Neon Project and Table
Determine which data table in Neon you will connect to and generate an Interzoid Match Report with. Any table containing company names, individual names, or street addresses is a good candidate.
If you do not have sample data, you can load the following CSV file into a Neon table. You can get this sample data at the following address:
https://dl.interzoid.com/csv/companies.csv
If you do not have a Neon account set up yet, it is easy to create one at Neon.com. Creating a project provisions a PostgreSQL database immediately, with no instance sizing or provisioning step.
Creating the Target Table
Unlike some managed Postgres platforms, Neon does not offer a browser-based CSV importer that infers a schema for you. The table must exist before the data is loaded, and its columns must line up with the columns in the CSV file. Open the SQL Editor in the Neon Console and create the table:
> CREATE TABLE companies (
id SERIAL PRIMARY KEY,
company TEXT,
category TEXT
);
The sample file has two columns, company and category, and contains 91 records. The id column above is added for convenience and is populated automatically by its sequence, so it does not appear in the CSV. If you are loading your own file, adjust the CREATE TABLE statement so the columns appear in the same order as the header row, and use TEXT for anything you intend to match on. Matching operates on the values as they were entered, so there is no benefit to narrower types here.
2Load the CSV with psql
Neon does not support a browser-based file upload for table data, and the server-side COPY ... FROM '/path/to/file.csv' form does not work either, because that reads from the database server's own filesystem, which is not accessible on a managed serverless platform. The supported approach is the \copy meta-command in psql, which streams the file from your local machine over the connection you already have open.
\dt and \d, but it does not support \copy. The load must be run from a real psql session on your own machine.
Download the Sample File
> curl -O https://dl.interzoid.com/csv/companies.csv
Connect and Load
Start a psql session using the connection string from your Neon dashboard, then run \copy. The column list is given explicitly so that the id column continues to populate from its sequence:
> psql "postgresql://neondb_owner:YOUR-PASSWORD@ep-your-endpoint.us-east-2.aws.neon.tech/neondb?sslmode=require"
neondb=> \copy companies(company, category) FROM 'C:/data/companies.csv' WITH (FORMAT csv, HEADER true, ENCODING 'UTF8');
COPY 91
neondb=> SELECT COUNT(*) FROM companies;
The \copy command reports the number of rows loaded, shown here as COPY 91 for the sample file. The COUNT query confirms it against the table. The count should match the number of data rows in the file, with the header row consumed rather than loaded.
psql on your path, and quote the connection string. Give \copy the full path to the file. Forward slashes work on Windows and avoid any escaping questions, as in 'C:/data/companies.csv', but backslashes are also accepted inside the single quotes. The ENCODING 'UTF8' clause is included above because company names frequently contain accented characters.
- Column count mismatch: the CSV has more or fewer fields than the column list. Compare the header row against your
CREATE TABLEstatement. - Permission denied:
\copyreads from your local filesystem, so check the path and file permissions rather than database privileges. - Encoding errors: if the file contains non-ASCII characters, add
ENCODING 'UTF8'to theWITHclause, or convert the file first. - Prepared statement errors: use the direct connection string rather than the pooled one, as described in Step 3.
3Copy Your Neon Connection String
Interzoid connects to Neon the same way any other PostgreSQL client does, using a standard connection string. Neon generates this for you, so there is nothing to compose by hand.
- Click Connect: The Connect button on your Neon Project Dashboard opens the connection modal, which shows the connection string for the selected branch, database, and role.
- Choose the direct connection: The modal includes a pooled connection option, which adds a
-poolersuffix to the hostname. Use the direct string, without the suffix, for both the psql load and the matching wizard. - Copy the string: The password is included in the copied string. Treat it as a credential.
A Neon connection string looks like this:
postgresql://neondb_owner:YOUR-PASSWORD@ep-cool-darkness-a1b2c3d4.us-east-2.aws.neon.tech/neondb?sslmode=require
Reading the Connection String
- Username: Neon creates a default role named
neondb_owner. Your project may use a different role name if you created one. - Host: The endpoint ID identifies the compute for a specific branch, in the form
ep-name-id.region.aws.neon.tech. Each branch has its own endpoint, so make sure you are copying the string for the branch that holds your data. - Port: Neon uses the default PostgreSQL port,
5432. It is usually omitted from the string. - Database: Neon names the default database
neondb. - SSL: Neon requires TLS on all connections, so
sslmode=requirebelongs in the string.
Neon's pooled endpoint runs PgBouncer in transaction mode, which returns the connection to the pool after every transaction. That behavior is well suited to serverless applications opening thousands of short connections, but it interferes with prepared statements and session state, and can produce errors such as prepared statement "s1" already exists during a bulk load or a long read.
The matching wizard opens one connection and reads sequentially, which is exactly the workload the direct endpoint is designed for. Use the string without -pooler in the hostname.
&channel_binding=require. Most modern PostgreSQL clients support it, but if a connection is refused with an authentication error and the credentials are known good, removing that parameter is worth trying before anything else.
4Launch the Wizard and Enter Your API Key
Open the Postgres Data Matching Wizard in your browser. Before beginning, enter your Interzoid API key in the top-right area of the header bar. Your key is saved in your browser for future sessions.
- API Key Field: Type or paste your API key into the input field in the header. Click the lock or eye icon to toggle visibility.
- Check Credits: Click the Credits button to verify your current balance before starting a job. The sample company file is small, so a demonstration run costs very little.
- Language Selection: Click the language dropdown in the navigation bar to switch between any of the 17 supported languages. The entire interface updates immediately. You can also set the language by URL parameter:
?lang=frfor French,?lang=jafor Japanese, and so on.
Once your API key is entered, click Get Started on the introduction screen to begin.
5Select a Matching Function
The wizard presents six matching functions. Choose the one that fits your data and use case. Each function card shows a description and the column parameters it requires.
Single-Column Functions
| Function | Use Case | Column Required |
|---|---|---|
| Company Name Matching | Match variations like "IBM", "I.B.M. Corp", "International Business Machines" | Company Name |
| Individual Name Matching | Match "James Johnston", "Jim Johnston", "J. Johnston" as the same person | Full Name |
| Street Address Matching | Match "400 E Broadway St" with "400 East Broadway Street" | Address |
Combination Functions
These functions use two columns together for higher matching precision:
| Function | Use Case | Columns Required |
|---|---|---|
| Company + Address | Higher precision matching using both company name and street address | Company Name, Address |
| Company + Full Name | Contact deduplication using company and individual name | Company Name, Full Name |
| Address + Full Name | Person-at-address matching using address and individual name | Address, Full Name |
For the sample company data, select Company Name Matching. Click the card for your chosen function, then click Next.
6Connect to Neon
This is where the Neon connection string from Step 3 comes in. The wizard connects to PostgreSQL in real time and presents the available objects at each level through cascading dropdown menus.
Connection Flow
- Switch to connection string mode: Use the toggle at the top of the form to select the connection string option rather than individual fields.
- Paste your string: Drop in the direct Neon connection string, without the
-poolersuffix. The field is masked by default. Use the eye icon to reveal it and the clipboard icon to copy it back out. - Click Connect: The wizard validates the connection. Because the database name is already carried in the connection string, the database dropdown is skipped and you go straight to schema selection.
- Select the schema: Choose
public, which is where the table you created in Step 1 lives. Internal schemas such aspg_catalogandinformation_schemaare filtered out of the list.
Using Connection Fields Instead
If you prefer to fill in the fields individually, take the values from the same Neon connection string: host is ep-your-endpoint.region.aws.neon.tech, port is 5432, username is neondb_owner or your custom role, database is neondb, and SSL Mode is require.
Saving Your Connection Details
Below the credentials is a Remember these connection details on this browser toggle. It is off by default, and nothing connection-related is saved until you turn it on. When enabled, the wizard stores your connection mode, host, port, username, password, SSL mode, and connection string in your browser. When disabled, any previously saved values are erased immediately. Because the stored values include your password, leave this toggle off on shared computers.
The wizard only reads from your database, and it is good practice to connect with a role that can do nothing else. In the Neon SQL Editor, you can create a dedicated read-only role in a few seconds:
CREATE ROLE interzoid_reader LOGIN PASSWORD 'strong-password-here';
GRANT CONNECT ON DATABASE neondb TO interzoid_reader;
GRANT USAGE ON SCHEMA public TO interzoid_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO interzoid_reader;
ALTER DEFAULT PRIVILEGES IN SCHEMA public
GRANT SELECT ON TABLES TO interzoid_reader;
Substitute this role and password into the connection string in place of the default role, keeping the same host and database. You can revoke access at any time by dropping the role or revoking its privileges. Roles created this way exist on the branch where you create them.
7Select Your Table, Columns, and Options
Choose the table to match against and configure which columns to use for matching and which columns to include in the output.
Table Selection
The wizard presents a dropdown of all tables and views available in the schema you selected. Choose the table holding the records you want to match, such as the companies table you loaded in Step 2. Once selected, the wizard loads the column names from that table in their natural column order.
Match Columns
For each matching parameter required by your chosen function, select the corresponding column from the dropdown. Having chosen Company Name Matching, select the column containing company names.
- Single-column functions: Select one column for the matching parameter.
- Combination functions: Select two different columns, one for each parameter. The two columns must be different.
Output Columns
Use the checkboxes to select which columns you want to include in the match report output. At least one column must be selected. The match columns are automatically included even if you do not check them separately, which ensures the data you matched on always appears in the results.
Output Options
- Show Similarity Keys: When enabled (the default), each output record includes the generated similarity key as the last column. Records sharing a key are matches. Disable this if you want clean output with only the selected data columns.
- Matches Only: When enabled (the default), only records that have at least one other matching record are shown. Disable this to see every record in the table after processing, sorted by similarity key. If you plan to load the results back into Neon, turn this option off. See Step 10 for why.
Click Next when your selections and options are configured.
8Review and Run the Match
The final screen shows a summary of all your selections: matching function, server, SSL mode, database, schema, table, column assignments, and output options. Review these carefully before proceeding.
Click the green Run Match button to start processing. The wizard will:
- Validate your API key and check that your account has sufficient credits for the job.
- Connect to Neon and read the selected columns from your table.
- Process each record through the selected matching algorithm using concurrent workers for performance.
- Generate the match report with records sorted and grouped into clusters of matching entries.
A progress indicator is shown while the job runs. Processing time depends on the number of records. The sample company file completes in seconds, while very large tables (up to 500,000 records) may take a minute or more.
9Interpret the Match Report
The match report appears in the results panel at the bottom of the screen. Records are organized into clusters, groups of records that the AI has determined to be matches. Each cluster is separated by a blank line for readability.
Example Output
For a company name match on the sample table, with the company and category columns selected for output and similarity keys enabled:
IBM Corporation,Technology,d477E1d7sG6dja3hDNsk9P
I.B.M. Corp,Information Technology,d477E1d7sG6dja3hDNsk9P
Microsoft Inc.,Software,k8Rp2mNx4wQjL9vB3cYh7T
Microsoft Corporation,Software,k8Rp2mNx4wQjL9vB3cYh7T
MSFT Corp,Technology,k8Rp2mNx4wQjL9vB3cYh7T
In this example, the first cluster contains two records identified as variations of IBM, and the second cluster contains three records identified as variations of Microsoft. The last column in each row is the similarity key. All records sharing the same key are considered matches, even though not one of the company name values is spelled identically to another. Notice that the category values also vary within a cluster, which is exactly the kind of inconsistency a match report surfaces.
What the Clusters Tell You
- Duplicate records: Two or more rows in the same cluster that should be a single record. These are candidates for merging.
- Inconsistent data: Clusters where the entity is clearly the same but the formatting varies. These reveal where standardization is needed upstream.
- Entity resolution: A cluster establishes that separate rows refer to one real-world organization, person, or location, which is the foundation for building a single view of a customer.
- Join keys: The similarity key gives you something to join on across tables where no shared identifier exists. Two tables processed with the same matching function produce the same key for the same entity.
10Save and Use Your Results
Click the Save Results button above the results panel to download the match report as a CSV file. On supported browsers, a save dialog appears allowing you to choose the file name and location. On other browsers, the file downloads automatically.
The saved file is clean, delimited text that can be imported directly into spreadsheets, databases, or other data processing tools for further analysis.
Bringing the Results Back into Neon
If your goal is to load the results back into Neon rather than simply review them, go back to the options in Step 7 and uncheck the Matches Only option, leaving Show Similarity Keys enabled.
With Matches Only turned off, every input row is included in the output with its similarity key appended, not just the rows that landed in a cluster. That gives you a complete, one-to-one copy of your source data with a new key column, which is exactly what you want to load back into a Neon table. Records that matched nothing still carry a key, so nothing is silently dropped and row counts reconcile against the original table.
Loading it back uses the same psql approach as Step 2. Create a table for the results, remove the blank cluster separator lines from the file, then run \copy:
CREATE TABLE match_results (
company TEXT,
category TEXT,
similarity_key TEXT
);
\copy match_results FROM 'C:/data/match_report.csv' WITH (FORMAT csv, ENCODING 'UTF8')
Once the keyed data is in a table, matching becomes an ordinary SQL operation, and you can perform fuzzy joins within your Neon data tables by joining on the similarity key instead of on exact text:
-- Count the records in each match cluster
SELECT similarity_key, COUNT(*) AS record_count
FROM match_results
GROUP BY similarity_key
HAVING COUNT(*) > 1
ORDER BY record_count DESC;
-- Fuzzy join: match customers to prospects on entity
-- similarity rather than on exact text
SELECT c.company, p.company, c.similarity_key
FROM customer_matches c
JOIN prospect_matches p ON c.similarity_key = p.similarity_key;
similarity_key for the appended key column, when the receiving tool expects field names, or leave it off for pipelines that read raw data rows.
Because Neon provides a full PostgreSQL database with standard connection methods, Interzoid works with it exactly as it does with any other PostgreSQL server, with no custom integration and no data export. The result is a fast path from raw, inconsistent records to a clean match report you can act on, whether that means merging duplicates, standardizing entries, resolving entities across systems, or joining tables that share no common key. If you have any questions or need assistance, do not hesitate to reach out to our support team.