Fauna
:::warning
Deprecation
You can no longer use the archived Fauna source connector in Airbyte. Fauna shut down its database service on May 30, 2025. See Fauna announcement. The connector can’t sync data because its API, including db.fauna.com and the regional endpoints, no longer exists.
Recommended actions
Fauna hasn’t published a hosted replacement for the service. If you migrated your data, use the connector for its new platform. If needed, build a custom connector.
:::
This page shows you how to set up a Fauna source.
Overview
The Fauna source supports these sync modes:
- Full Sync - exports all data from a Fauna collection.
- Incremental Sync - exports data incrementally from a Fauna collection.
Create a separate source for each collection you want to export.
Initial setup
Enter the domain of the collection’s database you’re exporting. You can find the URL in the docs.
Full sync
Follow these steps to run a full sync for this connection.
- Create a role that can read the collection you’re exporting. Create the role in Dashboard or fauna shell using this query:
CreateRole({
name: "airbyte-readonly",
privileges: [
{
resource: Collections(),
actions: { read: true },
},
{
resource: Indexes(),
actions: { read: true },
},
{
resource: Collection("COLLECTION_NAME"),
actions: { read: true },
},
],
});
Replace COLLECTION_NAME with the collection name configured for this connector. To sync multiple collections, add an entry for each additional collection. For example, use this query to sync users and products:
CreateRole({
name: "airbyte-readonly",
privileges: [
{
resource: Collections(),
actions: { read: true },
},
{
resource: Indexes(),
actions: { read: true },
},
{
resource: Collection("users"),
actions: { read: true },
},
{
resource: Collection("products"),
actions: { read: true },
},
],
});
- Create a key with that role using this query:
CreateKey({
name: "airbyte-readonly",
role: Role("airbyte-readonly"),
});
- Copy the
secretoutput from theCreateKeycommand. Enter it as the “Fauna Secret” on the left. Important: The secret appears only once. If you lose it, you’ll need to create a new key.
Incremental sync
Follow these steps to run incremental syncs for this connection.
- Create the “Incremental Sync Index” so the connector can run incremental syncs. Create the index with fauna shell or in Dashboard using this query:
CreateIndex({
name: "INDEX_NAME",
source: Collection("COLLECTION_NAME"),
terms: [],
values: [{ field: "ts" }, { field: "ref" }],
});
Replace COLLECTION_NAME with the collection name configured for this connector.
Replace INDEX_NAME with the name configured for the Incremental Sync Index.
Repeat this step for each collection you want to sync.
- Create a role that can read the collection, index and metadata for all indexes. The role needs index metadata access to validate the index settings. Create it using this query:
CreateRole({
name: "airbyte-readonly",
privileges: [
{
resource: Collections(),
actions: { read: true },
},
{
resource: Indexes(),
actions: { read: true },
},
{
resource: Collection("COLLECTION_NAME"),
actions: { read: true },
},
{
resource: Index("INDEX_NAME"),
actions: { read: true },
},
],
});
Replace COLLECTION_NAME with the collection name configured for this connector.
Replace INDEX_NAME with the name configured for the Incremental Sync Index.
To sync multiple collections, add an entry for each collection and index. For example, use this query to sync users and products with Incremental Sync:
CreateRole({
name: "airbyte-readonly",
privileges: [
{
resource: Collections(),
actions: { read: true },
},
{
resource: Indexes(),
actions: { read: true },
},
{
resource: Collection("users"),
actions: { read: true },
},
{
resource: Index("users-ts"),
actions: { read: true },
},
{
resource: Collection("products"),
actions: { read: true },
},
{
resource: Index("products-ts"),
actions: { read: true },
},
],
});
- Create a key with that role using this query:
CreateKey({
name: "airbyte-readonly",
role: Role("airbyte-readonly"),
});
- Copy the
secretoutput from theCreateKeycommand. Enter it as the “Fauna Secret” on the left. Important: The secret appears only once. If you lose it, you’ll need to create a new key.
Export formats
This section covers every export format for special-case data stored in Fauna. The list is exhaustive.
The exported database’s ref column contains only the document ID from each document’s reference, or “ref”. Each connector configuration includes one collection. The document ID therefore refers to a document in the synced collection.
| Fauna Type | Format | Note |
|---|---|---|
| Document Ref | { id: "id", "collection": "collection-name", "type": "document" } | |
| Other Ref | { id: "id", "type": "ref-type" } | This includes all other refs, listed below. |
| Byte Array | base64 url formatting | |
| Timestamp | date-time, or an iso-format timestamp | |
| Query, SetRef | a string containing the wire protocol of this value | The wire protocol is not documented. |
Ref types
Each ref is serialised as a JSON object with 2 or 3 fields, as listed above. The type field must contain one of these strings:
| Reference Type | type string |
|---|---|
| Document | "document" |
| Collection | "collection" |
| Database | "database" |
| Index | "index" |
| Function | "function" |
| Role | "role" |
| AccessProvider | "access_provider" |
| Key | "key" |
| Token | "token" |
| Credential | "credential" |
For all other refs, such as a stored Collections() result, type must be "unknown". A specific collection ref, retrieved with Collection("name"), differs from the reference to all collections, retrieved with Collections(). Therefore, type is "unknown" for Collections(), but not for Collection("name").
To select the document ID from a ref, add "id" to the additional column’s “Path”. For example, change the “Path” from ["data", "parent"] to ["data", "parent", "id"].
To select the collection name, add "collection", "id" to the additional column’s “Path”. For example, change the “Path” from ["data", "parent"] to ["data", "parent", "collection", "id"]. This uses the FQL Select internally.
IP allow list
If you use Airbyte Cloud and restrict access to specific IPs, add Airbyte Cloud IP addresses to your allow list.
Changelog
Expand to review
| Version | Date | Pull Request | Subject |
|---|---|---|---|
| 0.1.10 | 2026-10-07 | 88305 | Archive connector: Fauna shut down its service on 2025-05-30 |
| 0.1.9 | 2025-05-10 | 59992 | Update dependencies |
| 0.1.8 | 2025-05-03 | 59430 | Update dependencies |
| 0.1.7 | 2025-04-26 | 58913 | Update dependencies |
| 0.1.6 | 2025-04-12 | 57799 | Update dependencies |
| 0.1.5 | 2025-04-05 | 57218 | Update dependencies |
| 0.1.4 | 2025-03-29 | 56519 | Update dependencies |
| 0.1.3 | 2025-03-22 | 55955 | Update dependencies |
| 0.1.2 | 2024-07-10 | 41051 | Migrate to poetry |
| 0.1.1 | 2022-12-12 | 20275 | Fix index lookup with no values |
| 0.1.0 | 2022-11-17 | 15274 | Add Fauna Source |