Advanced Analytica Advanced Analytica: IBOM
← All connectors
Fauna logo

Source connector

Fauna

Set up Fauna as a source and move its data into your chosen destination.

Version 0.1.10 archived alpha

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.

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.

  1. 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 },
    },
  ],
});
  1. Create a key with that role using this query:
CreateKey({
  name: "airbyte-readonly",
  role: Role("airbyte-readonly"),
});
  1. Copy the secret output from the CreateKey command. 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.

  1. 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.

  1. 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 },
    },
  ],
});
  1. Create a key with that role using this query:
CreateKey({
  name: "airbyte-readonly",
  role: Role("airbyte-readonly"),
});
  1. Copy the secret output from the CreateKey command. 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 TypeFormatNote
Document Ref{ id: "id", "collection": "collection-name", "type": "document" }
Other Ref{ id: "id", "type": "ref-type" }This includes all other refs, listed below.
Byte Arraybase64 url formatting
Timestampdate-time, or an iso-format timestamp
Query, SetRefa string containing the wire protocol of this valueThe 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 Typetype 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
VersionDatePull RequestSubject
0.1.102026-10-0788305Archive connector: Fauna shut down its service on 2025-05-30
0.1.92025-05-1059992Update dependencies
0.1.82025-05-0359430Update dependencies
0.1.72025-04-2658913Update dependencies
0.1.62025-04-1257799Update dependencies
0.1.52025-04-0557218Update dependencies
0.1.42025-03-2956519Update dependencies
0.1.32025-03-2255955Update dependencies
0.1.22024-07-1041051Migrate to poetry
0.1.12022-12-1220275Fix index lookup with no values
0.1.02022-11-1715274Add Fauna Source
Advanced Analytica

Most businesses are sitting on information they can’t use at speed. The people who hold it are busy, and when they leave, the knowledge goes with them. The documents are static, and the processes around them weren’t designed for AI.

Advanced Analytica works with these businesses to turn that information into structured data assets. Once they're integrated, AI systems can govern it, and the business can use it. We bring in the strategy, the specification and the AI skills to rework how the business operates.

MOVE FAST. STAY SAFE.