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

# Raw Data Pull

> How the AI Analyst handles requests for rows, fields, and CSV exports

When you ask for specific rows or fields rather than an interpretation, the AI Analyst uses the **Raw Data Pull** workflow — returning the requested data as a table preview and a downloadable CSV, without adding analysis or charts.

***

## When Raw Data Pull Is Used

Raw Data Pull handles **retrieval requests** — questions where you want the underlying data, not a summary or trend analysis.

### Examples

```
Pull order ID, order date, UTM source, UTM medium, and revenue for last week
Give me raw orders from yesterday with discount code, channel, and net revenue
Export customers acquired in March with email, first order date, and lifetime revenue
Show line items for SKU ABC-123 from the past 30 days
Pull campaign-level spend, clicks, impressions, and campaign name for TikTok last month
Give me all sessions from last week with landing page, UTM source, and UTM campaign
```

These requests share key characteristics:

* **Pull or export language** ("pull", "export", "give me", "show me rows")
* **Named fields** (order ID, customer email, UTM source)
* **Entity lookups** (line items for a specific SKU or order)
* **No interpretation requested** — you want the data itself, not trends or recommendations

<Info>
  If you want the AI Analyst to interpret and summarize the results, phrase your question as an analysis instead: "What are the trends in orders by UTM source last week?"
</Info>

***

## How It Works

Raw Data Pull follows a focused pipeline optimized for retrieval:

<Steps>
  <Step title="Recognize Pull Intent">
    The AI detects pull or export language and field-level specificity, and classifies the request as a data retrieval rather than an analysis.
  </Step>

  <Step title="Identify Tables">
    The AI determines which BigQuery tables contain the requested fields. For order fields it routes to `obt_orders`; for campaign fields it uses `rpt_ad_performance_daily`.
  </Step>

  <Step title="Generate SQL">
    The AI writes a SELECT query for the requested fields, applying your specified filters (time range, product, channel, campaign, store). Aggregation and interpretation are skipped.
  </Step>

  <Step title="Execute Query">
    The query runs against your BigQuery warehouse. Results are validated and any data quality issues are flagged.
  </Step>

  <Step title="Return Data">
    The AI returns a short confirmation describing the rows, fields, and time range returned — along with a table preview and a CSV attachment. No chart is generated.
  </Step>
</Steps>

***

## What You'll See

During a Raw Data Pull, the AI Analyst shows progress through each phase:

| Status                           | What's Happening                |
| -------------------------------- | ------------------------------- |
| 🔍 Understanding your question…  | Classifying as a data pull      |
| 🗂️ Identified relevant table(s) | Finding the right data sources  |
| 💻 Query prepared                | Generating the retrieval query  |
| ⚡ Running your analysis…         | Executing against BigQuery      |
| ✅ Results verified               | CSV attached, response complete |

<Note>
  Raw Data Pull never generates a chart. If you want a visualization of the returned data, ask a follow-up like "Now analyze this by channel."
</Note>

***

## Response Components

| Component        | Description                                                                      |
| ---------------- | -------------------------------------------------------------------------------- |
| **Confirmation** | Short note describing the rows returned, fields included, and time range covered |
| **Data Table**   | Preview of the returned rows (truncated for readability)                         |
| **SQL Query**    | The exact query used (downloadable as `query.sql`)                               |
| **CSV Export**   | Full returned dataset, attached automatically as `results.csv`                   |

Raw data pulls never generate charts. Chart generation is always skipped regardless of the question.

***

## Tips for Best Results

<AccordionGroup>
  <Accordion title="Name the exact fields you need">
    Listing fields explicitly gets you a cleaner result: "Pull order ID, order date, customer email, discount code, and net revenue for last week." The AI maps your field names to the correct columns.
  </Accordion>

  <Accordion title="Specify the time range">
    "Last week," "past 30 days," "March 2026" — the AI handles relative and absolute ranges. Without a time range, the AI will ask you to clarify.
  </Accordion>

  <Accordion title="Add filters to narrow the result">
    Include filters like product, SKU, channel, campaign, or store: "Pull line items for SKU ABC-123 from the past 30 days" or "Export TikTok campaign data for last month."
  </Accordion>

  <Accordion title="Use pull or export language">
    Words like "pull," "export," "give me rows," or "show me line items" signal to the AI that you want data retrieval, not interpretation. Using analysis language ("analyze," "summarize," "how did") may trigger Standard Analysis or Deep Analysis instead.

    Note: asking for specific dimensions alone does not trigger a Raw Data Pull. "What is our revenue by UTM source and medium?" is a Standard Analysis question — it asks what the data means. "Pull order ID, UTM source, UTM medium, and revenue for last week" is a Raw Data Pull — it asks for the rows themselves.
  </Accordion>

  <Accordion title="Follow up for interpretation">
    After receiving a raw pull, ask a follow-up in the same thread to get analysis: "Now summarize the top UTM sources by revenue" or "What trends do you see in this data?"
  </Accordion>
</AccordionGroup>

***

## Limitations

* **No charts** — Raw pulls return tabular data and CSV only; chart generation is always skipped
* **No Deep Analysis** — Pull requests always use this single-path workflow regardless of scope
* **No interpretation** — The confirmation is intentionally brief; trend detection and recommendations require a follow-up or a separate analysis question
* **Misclassification** — If your request is classified as Standard Analysis instead of a data pull, you'll get an interpretive summary rather than rows. Add explicit pull language ("pull", "export", "give me rows") and name specific fields to avoid this

***

## Related

<CardGroup cols={2}>
  <Card title="Standard Analysis" icon="bolt" href="/ai-analyst/workflows/standard">
    How specific metric questions are handled with a focused SQL query and analytical summary.
  </Card>

  <Card title="Deep Analysis" icon="brain" href="/ai-analyst/workflows/deep-analysis">
    How open-ended questions trigger multi-perspective analysis.
  </Card>
</CardGroup>

<Card title="Thread continuity and follow-ups" icon="message-lines" href="/ai-analyst/thread-continuity-follow-ups">
  Learn how to continue analysis in the same thread after a raw pull.
</Card>
