Prerequisites
- A bucket whose schema declares the fields and blobs the source writes. See Bucket schema.
- An API key with the
adminpermission to create the connection. Syncs needwrite. - Network access from Mixpeek to the database, camera or API host.
sync_mode, polling_interval_seconds, file_filters, schema_mapping, reconcile), monitoring and the dead-letter queue are the same for every provider and are covered in Object storage and syncs. This page covers what differs per source.
Connect a source
The example syncs a PostgreSQL table. For any other source, changeprovider_type, provider_config and source_path as the sections below describe.
1
Create the connection
2
Create the sync and run it
Sync the customers table every 30 minutes
POST /v1/buckets/$BUCKET_ID/syncs/$SYNC_ID/trigger for the first pass, or wait one interval.POST /v1/organizations/connections/$CONNECTION_ID/test, then read the sync’s total_files_synced and the bucket’s objects as described in Check that it worked.
RTSP camera streams
One connection is one camera or encoder. Each sync run opens the stream, capturessegment_seconds × segments_per_run seconds, cuts it into segments, and closes it. Each segment becomes one object.
Capture is windowed. Footage between runs is not kept, so an RTSP connection samples a stream and does not archive it. Coverage is segment_seconds × segments_per_run ÷ polling_interval_seconds:
Each run adds about 9.4 seconds of setup. Keep capture plus setup under
polling_interval_seconds, or runs overlap; that caps coverage at about 97% on a 300-second interval and 84% on a 60-second one.
provider_config
Capture cost does not depend on segment length, because capture copies the stream without re-encoding. The cost that scales is downstream: each segment is one object and one pipeline run. Shorter segments give a first result sooner (about
segment_seconds + 9.4 seconds + pipeline time).
Map the segment to your blob field. Without a schema_mapping, segments land on the default blob property content, and a collection reading another property processes nothing while reporting success. Use the rtsp_field source for capture and gate values: source_url, segment_index, segment_duration_seconds, captured_at, transport, applied, top_score, match_count and error.
Sync schema_mapping for RTSP
Drop segments that do not matter
Drop segments that do not matter
Two filters run on each segment, cheapest first.
scene_change_threshold (0 to 64) compares a 64-bit perceptual hash of the segment’s first frame with the last kept segment and drops it when the Hamming distance is at or below the value. 0 drops only identical frames; 5 allows for compression noise.A gate then judges each remaining segment. Set one of:gate_on_error (publish by default, or drop) decides what happens when the gate fails or times out. A dropped live segment cannot be recaptured. Keep gate_timeout_seconds (default 30) well below the capture window. Map applied to a field: false marks a segment the gate could not judge, which otherwise looks the same as one it passed.Alert on what the gate kept
Alert on what the gate kept
Once gate values are fields on the object, a retriever filtered on
gate_top_score or gate_match_count selects confident matches, and an alert on that retriever fires only for them. A filter on provider = rtsp matches every segment and fires constantly. If an alert’s batch channel feeds a collection, set batch_collection_ids on the sync so the sync does not also feed that collection.PostgreSQL
Each row becomes one JSON object. The same connection backs thesql_lookup retriever stage, which reads PostgreSQL during a query. Requires PostgreSQL 12 or later and a role with CONNECT on the database, USAGE on the schema and SELECT on the tables.
Read-only role
Every reading session runs with
default_transaction_read_only = on.
Bulk import, embedding columns and change capture
Bulk import, embedding columns and change capture
For a large table, or one with a
vector or halfvec column, set provider_filters.import on the sync. The table is read in primary-key slices, each slice lands as one Parquet object, and each row becomes one document whose ID derives from the table and primary key, so re-runs update the same document.provider_filters.import
vector_columnsmodecarrystores the vector with no embedding call;reextractembedstext_columninstead. A carried vector whose model or dimension differs from the collection’s feature is refused at sync create.replication: logicalcreates a replication slot, copies the slices inside its snapshot, then streams inserts, updates and deletes. It needswal_level = logical, a role withREPLICATIONconnecting directly (no transaction-mode PgBouncer), and a publication:CREATE PUBLICATION mixpeek_pub FOR TABLE public.scenes;. Setmax_slot_wal_keep_sizeso a stalled slot cannot fill the disk. A slot paused 24 hours is dropped; deleting the sync drops it too.replication: pollingreads rows whoseupdated_atmoved and misses hard deletes.noneimports once.- A column starting with
_or named like a field Mixpeek writes (metadata,text,data,document_id,collection_id,mime_type) is refused. Import a view that renames it, withkey_columnsnaming the view’s key. Views cannot use logical replication.
Snowflake
Each table row becomes one object, with incremental sync on a watermark column.provider_config
credentials.type is key_pair (with optional private_key_passphrase) or username_password. The role needs USAGE on the warehouse, database and schema and SELECT on the table. Without incremental_column, every run scans the whole table. Use a dedicated warehouse to keep sync cost separate.
The sql_lookup stage reads PostgreSQL only. To join Snowflake values onto results at query time, use the api_call stage against an endpoint that queries Snowflake.
Export to Snowflake or Databricks
Mixpeek has no Databricks connector. To get extracted features into Snowflake or Databricks for SQL analytics, BI and model training, read documents from a collection and load them on your side: SnowflakeCOPY INTO or Snowpipe, or Databricks Auto Loader into Delta tables. An alert or webhook on batch completion can start the load.
HTTP API
Polls any JSON or JSONL endpoint and creates one object per item, with the item’s JSON as the blob. Items whose ID already exists are skipped unless the sync setsskip_duplicates: false.
provider_config
source_path is the full URL.
RSS and Atom feeds
Each entry becomes one object, and entries already seen are skipped. A public feed needs an emptyprovider_config; a private one takes {"credentials": {"type": "http_headers", "headers": {"Authorization": "Bearer FEED_TOKEN"}}}. One connection serves many feeds: create one sync per feed URL, with the URL as source_path. Feeds are fetched in full on each poll. Map entry values with the rss_field schema mapping source.
Bright Data
Each sync run triggers a new snapshot of a Bright Data dataset, waits for it to be ready, and creates one object per record. The record’s JSON is the blob, and its top-level string, number and boolean fields become object metadata. Records are deduplicated across runs by<snapshot_id>:<record_id>.
provider_config
source_path is the dataset ID from the Bright Data marketplace, starting with gd_. country (ISO 3166-1 alpha-2) narrows collection to one country. A snapshot can take from minutes to an hour, and snapshots expire after 1 hour by default, so a large dataset may need geo-targeting or a higher Bright Data tier. Most datasets change daily or weekly; poll at that cadence (polling_interval_seconds: 86400).
source_path. You need no relationship with the watched accounts.
Create the connection in Studio under Connections > Add Connection > Instagram and complete the OAuth flow. Pick a Facebook Page that has a linked Instagram Business account; without one, Business Discovery does not work. The app needs instagram_basic, pages_show_list and business_management.
Only public posts are available, with no stories or private accounts. The Graph API allows about 200 calls per hour per viewer account, roughly 5,000 posts per hour at the default page size of 25. Mixpeek halves the page size on server errors (down to 5), honors
Retry-After, and keeps pages already synced when a later one fails. Tokens last 60 days and refresh automatically within 7 days of expiry; if no sync runs for 60 days, reconnect.
TikTok
Syncs the videos of the account you authorize through the TikTok Content API, with description, likes, views, shares and comment count on each object. It does not read arbitrary public accounts.provider_config
user.info.basic and video.list scopes and a Login Kit authorization of the account. Access tokens last 24 hours; Mixpeek renews them with the refresh token. The sync requires source_path and the provider ignores it, so pass /.
conn_abc123@inbound.mixpeek.com. Forward or send mail to it, and each email becomes one object.
provider_config
inbound_address and the signing secret are generated for you. allowed_senders takes exact addresses or *@domain wildcards; empty accepts everyone. Create a sync on the bucket with any source_path, such as inbox. Mail to a connection with no sync is refused with 400, and mail from a sender outside the allowlist with 403.
Root-level fields:
email_from, email_to, email_cc, email_subject, email_date, email_message_id, email_in_reply_to, email_references and email_attachment_count. Filter on them with the attribute_filter stage. A second email with the same Message-ID is skipped. Email headers and bodies often contain personal data; restrict access to the namespace that holds them.
What goes wrong
Related
- Object storage and syncs: the shared connection and sync flow, filters, schema mapping and reconciliation
- Buckets and objects: object states, duplicates and batches
- Retrievers and Stages: search what you ingested, including
sql_lookup - Create storage connection API

