Skip to main content
If you prefer not to integrate the Hyperline API, you can use connectors to import data directly from your own database.

Prerequisites

  • You need a Postgres database that can receive incoming traffic from our IPs 15.188.105.163, 15.188.215.105 and 35.181.129.14
  • The associated database URL (should look something like postgres://username:password@host.com/database)
As a best practice, use a read replica and create a dedicated user for Hyperline. Limit this user’s access to the subset of data Hyperline needs.

Load your data

To get started, go to the data loaders page in Hyperline. You should see an empty state.
Add your first connection by clicking New connection. In the modal:
  • Select a provider
  • Give a name you’ll remember to your connection
  • Enter the URL you got from the prerequisites
When you click Submit, Hyperline runs a blank query to check that your database is accessible. Your connection then appears as live. Next, create your first loader by clicking New data loader on the right side of the screen. In the modal:
  • Select the connection you just created
  • Set an event type for this query. Hyperline uses this identifier to refer to the data from this query. For example, api_calls or active_users
  • Select the refresh rate for your use case. Every hour is usually enough to get started

Getting the SQL right

Now write your query. Hyperline expects the query output to follow a specific format. Hyperline requires 3 fields to validate the query:
  • timestamp — The date used to determine whether a record falls within a billing period. For example, if you bill monthly API calls, only events with a timestamp within the current billing cycle are included. This field is less critical if your pricing does not rely on periodic metering.
  • customerId — The Hyperline ID or external ID of the customer. This field is used to associate each record with the corresponding customer.
  • id — A unique identifier for the record (can be an ID from your system). Hyperline uses this field to de-duplicate and update records, so ensure it uniquely represents each record.
When importing records, Hyperline tries to match an existing customer. If no match exists, Hyperline creates a new customer with the status automatically_created. To avoid clutter, these customers don’t appear in your customers list by default. You can access them in the pending customers table. Optionally, you can also return a customerName property. Hyperline uses it to name the customer on creation, which makes the customer easier to find later. To summarise, the minimum acceptable request looks like this:
Or to import the customer name:
This is the minimum for Hyperline to accept and load a query. You can add other fields to your query. Only include what’s necessary to keep data sharing to a minimum. Then click Preview query. Hyperline checks that the required fields are present and displays a preview of 5 records so you can verify the output.
Save the data loader and go to your events page. After a few seconds, a table with your newly ingested events appears. Use this page as a debugger to check your data.

Updating records

Hyperline automatically updates existing records. It uses the combination of the supplied id and customerId and always keeps the latest version. Hyperline doesn’t update customer names, even if the name has changed. To change a name, update it in the interface.

Deleting records

Hyperline doesn’t delete records automatically. Instead, add a deletedAt field to the query and set it when the record is deleted. You can then filter these records out in the Hyperline pricing engine.

Loading big tables

Hyperline processes queries in batches of up to 120k rows per minute. If your table is bigger than this, import only records updated after the last refresh, or import them less often.