Skip to content
M↓ View as Markdown ↗

Actian AI Analyst Lossless Format

Lossless is the native Actian AI Analyst export format. It keeps the full detail of a Workspace's semantic layer and AI analysts, so you can restore it or import it into another Workspace or organization. In the product, this format appears as Lossless on Settings → Import / export.

To create a Lossless file, see Export Semantic Layer & Agents. To load one, see Import Actian AI Analyst Format (YAML / JSON).

What's exported

  • Models: source table or custom query, data connection, grain, dimensions (including sample and enum values), measures, filters, and relationships between models.
  • Metrics: expression, anchor model, time dimension and time grains, unit and precision, joins, and the dimensions, measures and filters available to the metric.
  • Glossary: terms, definitions, synonyms and mappings.
  • AI analysts: description, instructions, avatar, deployment state, audience, model and glossary access, suggestions and saved prompts. Both draft and deployed analysts are exported. Deleted analysts are not.

Not included:

  • Database IDs. Every entity, and every reference between entities, is identified by name.
  • Glossary term tags.
  • The list of people who can use an AI analyst whose audience is restricted.
  • Data connections and their credentials. Models only name their connection.

File layout

A Lossless export is a .zip file with exactly four files at its root. They are either all YAML or all JSON, depending on the encoding you chose:

File Contents
models.yaml / models.json models and relationships
metrics.yaml / metrics.json metrics
glossary.yaml / glossary.json glossary
agents.yaml / agents.json agents (AI analysts)

YAML files are easy to read and review in version control. JSON files are written on a single line, without indentation.

Every file starts with the same header:

version: "1.0"
exported_at: "2026-01-28T10:30:00.000Z"   # when the export was made (UTC)
environment:
  name: Production                        # internal name, not the Workspace name

Models file

version: "1.0"
exported_at: "2026-01-28T10:30:00.000Z"
environment:
  name: Production
models:
  - name: Orders
    description: All customer orders
    agent_guidance: Use this model for order-related questions
    data_source: PostgreSQL DB          # name of the data connection
    source_type: TABLE                  # TABLE or CUSTOM_QUERY
    source_path: [public, orders]
    source_query: null                  # SQL text when source_type is CUSTOM_QUERY
    grain:                              # present only when a grain is set
      description: One row per order
      column_names: [id]
    dimensions:
      - name: Status
        description: Current order status
        expression: status
        type: ENUM                      # STRING, NUMBER, BOOLEAN, TIMESTAMP, DATE or ENUM
        primary_key: false
        time_grains: []
        sample_values: [pending, shipped]   # present only when sample values exist
        enum_values:
          - value: pending
            description: Awaiting processing
            sort_order: 1
    measures:
      - name: Total Amount
        description: Sum of order amounts
        expression: SUM(amount)
        unit: USD
        precision: 2
    filters:
      - name: Active Orders
        description: Excludes cancelled orders
        expression: status != 'cancelled'
        apply_default: false
relationships:
  - name: Orders to Customers
    from_model: Orders
    from_key: customer_id
    to_model: Customers
    to_key: id
    type: MANY_TO_ONE                   # ONE_TO_ONE, ONE_TO_MANY or MANY_TO_ONE
    join_type: LEFT                     # INNER, LEFT, RIGHT or FULL

Metrics file

metrics:
  - name: Total Revenue
    description: Sum of all order amounts
    agent_guidance: Use for revenue questions
    expression: SUM(amount)
    model: Orders                       # anchor model
    time_dimension: Order Date          # name of a dimension, or null
    time_grains: [day, month, year]
    unit: USD
    precision: 2
    joins:
      - alias: customer
        from_model: Orders
        relationship: Orders to Customers   # relationship name
    available_dimensions:
      - model: Customers
        name: Country
    available_measures: []
    available_filters:
      - model: Orders
        name: Active Orders

Glossary file

glossary:
  - term: Revenue
    definition: Total sales amount before deductions
    synonyms: [Income, Sales]
    mappings:
      - target: metric                  # model, dimension, measure, filter or metric
        name: Total Revenue
      - target: dimension
        model: Orders                   # owning model, for dimension, measure and filter targets
        name: Status

A mapping whose target no longer exists is left out of the export.

Agents file

agents:
  - name: Sales Analyst
    description: Answers questions about sales performance
    instructions: Focus on revenue trends and customer segments
    avatar_seed: sales-analyst
    deployment_state: DEPLOYED          # DRAFT or DEPLOYED
    audience: EVERYONE                  # EVERYONE or RESTRICTED
    model_access:
      mode: MANUAL                      # MANUAL, ONLY_TAGS or EXCLUDE_TAGS
      models:
        - name: Orders
          all_fields: true
        - name: Customers
          all_fields: false             # dimensions and measures are listed only when false
          dimensions: [Country]
          measures: [Customer Count]
      tags: []
    glossary_access:
      mode: UNRESTRICTED                # UNRESTRICTED, ONLY_GROUPS or EXCLUDE_GROUPS
      tags: []
    suggestions:
      - category: Revenue
        category_position: 0
        title: Monthly revenue
        body: What was our revenue by month this year?
        icon: ""
        position: 0
    saved_prompts:
      - slug: weekly-summary
        title: Weekly summary
        body: Summarize last week's sales.
        description: A quick weekly overview

The values in these examples are illustrative. Your files contain your own names, expressions and settings.