Sync Data

Now that we have our PGVector destination set up, the final step is to configure the connection to tell Airbyte how you want to move data.

Tap Connections from the lefthand menu. Define the source, and select your custom connector, StripeCustomerData

ssq

seup-destination

Next is to test the source with the Stripe API secret key.

ss2

You should see a success message similar to this:

connection2

After this, select the PGVector destination that you set up earlier by tapping Create a Connection.

destinationnewwww

Next step is to just wait till the schema is fetched so you can select your streams.

destination

Go ahead and choose the streams created earlier: customers, search customer, invoices, and products.

selectstreams

Great! Now, we can configure the connection.

configfureconnecTIon

Click “Finish & Sync” to finally move the data!

airbyteconnectiondone

You will know when your sync works when all streams are completed with green checkmarks!

Before continuing, you will want to make sure that the data was properly moved to Supabase.

This can be done by logging into the Supabase dashboard, and tapping on Table Editor. If there are tables for customers, invoices, and products, you are set!

To check if your tables exist and have data, tap on SQL Editor and run any of the following queries:

SELECT COUNT(*) FROM customers;
SELECT COUNT(*) FROM products;
SELECT COUNT(*) FROM invoices;

To test that the emebeddings column has been correctly populated with vector data run a SELECT query in SQL editor within Supabase to verify this data being populated. Examples are shown below:

-- Check customer embeddings
SELECT id, email, embedding 
FROM customers 
LIMIT 1;
-- Check product embeddings
SELECT id, name, embedding 
FROM products 
LIMIT 1;
-- Check invoice embeddings
SELECT id, customer_id, embedding 
FROM invoices 
LIMIT 1;

Each should return a number greater than 0 to indicate data is present within the tables.