> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudhumans.com/llms.txt
> Use this file to discover all available pages before exploring further.

# claudia_messages

> Every message on both sides of a conversation, with what triggered each agent reply. The largest table in the export.

Every message on both sides of a conversation, with what triggered each agent reply. The largest table in the export.

<Columns cols={3}>
  <Card title="One row is">
    one message
  </Card>

  <Card title="Delivery">
    Daily delta on `etl_updated_at`
  </Card>

  <Card title="Columns">
    19
  </Card>
</Columns>

## Where it lands

```text theme={null}
s3://<YOUR_BUCKET>/v1/datamart_claudia/claudia_messages/etl_date=<DATE>/
```

Each partition holds only the rows the datamart ingested that day, so union every
`etl_date=` partition to reconstruct the table. One of them is
`etl_date=__initial__`, the first load, holding everything that preceded the
earliest daily partition. Check for `_SUCCESS` before reading a partition, as
described in [bucket layout](/data-export/bucket-layout#how-to-tell-if-a-partition-is-ready).

## Columns

<ResponseField name="conversation_message_sk" type="bigint">
  Internal warehouse key. Not stable between deliveries — join on `message_id` instead.
</ResponseField>

<ResponseField name="project_name" type="varchar(510)">
  Project the conversation belongs to.
</ResponseField>

<ResponseField name="tenant_id" type="varchar(256)">
  Id of the tenant. `NULL` for rows with no tenant mapping.
</ResponseField>

<ResponseField name="tenant_name" type="varchar(256)">
  Name of the tenant. `NULL` for rows with no tenant mapping.
</ResponseField>

<ResponseField name="message_id" type="varchar(510)">
  **Join key.** Unique id of the message.
</ResponseField>

<ResponseField name="cloudchat_id" type="varchar(510)">
  **Join key.** Conversation the message belongs to. Matches `cloudchat_id` on [`claudia_conversation`](/data-export/catalog/claudia/claudia_conversation).
</ResponseField>

<ResponseField name="sender_role" type="varchar(50)">
  Who sent the message: `USER` for the customer, `AGENT` for the agent or the person who took over.
</ResponseField>

<ResponseField name="content_text" type="varchar(65535)">
  Message body as sent. Truncated at the column length for unusually long messages.
</ResponseField>

<ResponseField name="send_at" type="timestamp">
  When the message was sent. Order by this column within a conversation to reconstruct the transcript.
</ResponseField>

<ResponseField name="private_flag" type="boolean">
  Whether the message was an internal note rather than something the customer saw. Exclude these when you rebuild a transcript.
</ResponseField>

<ResponseField name="message_type" type="varchar(50)">
  How the message was produced: `STATIC` for a fixed text, `FLOW` for a step in a controlled flow, `OTHER` for everything else.
</ResponseField>

<ResponseField name="originated_from_answer" type="varchar(65535)">
  The answer the agent built this message from. `NULL` on customer messages.
</ResponseField>

<ResponseField name="originated_from_action" type="varchar(65535)">
  The action the agent decided to take alongside sending the message.
</ResponseField>

<ResponseField name="originated_from_enlightenment_limit_flag" type="boolean">
  Whether the message was sent because the agent ran out of clarifying questions.
</ResponseField>

<ResponseField name="originated_from_user_query" type="varchar(65535)">
  The customer question this message answers, as the agent understood it. This is the interpreted query, not necessarily the customer's literal words.
</ResponseField>

<ResponseField name="originated_from_class" type="varchar(128)">
  Which response strategy produced the message. The value is a fully-qualified internal class name and its exact string is not part of the delivery contract: read the trailing segment, for example `LowConfidenceResponse`, `ClarificationResponse` or `N2SectionResponse`.
</ResponseField>

<ResponseField name="media_class" type="varchar(128)">
  Medium of the message, in the same fully-qualified form as `originated_from_class`. The trailing segment is the useful part: `TextMessage`, `ImageMessage`, `AudioMessage` or `FileMessage`.
</ResponseField>

<ResponseField name="etl_updated_at" type="timestamp">
  When the datamart last wrote this row. This is the cursor for the daily delta: a partition holds the rows whose `etl_updated_at` fell on that day, so a message edited later reappears in a later partition.
</ResponseField>

<ResponseField name="etl_date" type="varchar">
  Partition column. The day whose rows this file holds, in `YYYY-MM-DD`. Not a date type, because the initial load carries the literal `__initial__` instead of a day.
</ResponseField>
