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

# Data connectors in Slack

> The Julius Slack Agent automatically has access to all data connectors you've configured in your Julius account. When you ask a question in Slack, Julius intelligently detects which data connector you want to use based on your query context and automatically connects to the appropriate data source.

<Tip>
  No additional setup needed! If you've already connected data sources in Julius, they're immediately available through the Slack agent.
</Tip>

## How Automatic Detection Works

Julius analyzes your query context to determine which data connector to use:

1. **Query Analysis:** Julius reads your question and identifies data references
2. **Connector Matching:** Matches keywords against your configured data connector names and types
3. **Automatic Connection:** Connects to the appropriate data source without requiring explicit instructions
4. **Smart Fallback:** If ambiguous, Julius asks you to clarify which connector to use

## Best Practices for using data connectors in Slack

Name your data connectors clearly so you can reference them from Slack easily.

### Connector Naming Conventions

How you name your connectors directly impacts how easily Julius can detect and use them in Slack queries. Follow these guidelines when naming your data connectors:

#### ✅ Do's

**Use the environment or purpose in the name:**

* `prod-read-replica` - Clearly indicates this is a production read-only copy
* `analytics-warehouse` - Shows the primary use case
* `staging-db` - Indicates it's a staging environment
* `customer-data` - Describes the data type it contains

**Keep names short and memorable:**

* `prod-replica` - Short and easy to reference
* `analytics` - Simple one-word name works well
* `main-db` - Descriptive but concise

**Be specific to avoid ambiguity:**

* `prod-read-replica-postgres` - Very clear what this is
* `west-coast-warehouse` - Specific enough that there's no confusion with other connectors

#### ❌ Don'ts

**Don't name connectors after the database type alone:**

* ❌ `postgres` - Too generic, especially if you have multiple Postgres databases
* ❌ `bigquery` - Doesn't distinguish between different BigQuery projects
* ❌ `snowflake` - Vague if you have multiple Snowflake connections

**Don't use ambiguous or vague names:**

* ❌ `db` - Too vague, Julius won't know which connector you mean
* ❌ `main` - Ambiguous across multiple teams or projects
* ❌ `database` - Not descriptive enough
* ❌ `data` - Doesn't help Julius identify the right connector

**Don't use names that are too similar to other connectors:**

* ❌ `postgres-1`, `postgres-2` - Hard to remember which is which
* ❌ `db-prod`, `db-production` - Confusingly similar
* ❌ `analytics-v1`, `analytics-v2` - Ambiguous which version to use

### Example Usage:

Imagine you have a Postgres connection named **"prod read replica"** in your Julius account. Let's walk through good and bad examples of referencing this connector in your queries:

#### ✅ Good Examples

**Use the exact connector name:**

```
@Julius using prod read replica, get the most recent users from the past week
```

Julius will immediately connect to your Postgres database and find recent users.

**Mentioning the database type :**

```
@Julius using Postgres, get the most recent users from the past week
```

Julius will be able to detect you're talking about the "prod read replica" connector.

<Warning>
  If you have multiple connectors of the same type, Julius will have a hard time disambiguating between them, and may get it wrong. Use the connector name instead.
</Warning>

**Include the purpose:**

```
@Julius using our read replica, show me the top 10 customers by spend
```

Julius recognizes "read replica" from your connector name and connects automatically.

#### ❌ Bad Examples

**Vague query without connector reference:**

```
@Julius get the most recent users from the past week
```

Julius won't get a good sense for which connector to use. If you only have one connector, this query may work ok.

**Wrong connector type:**

```
@Julius using BigQuery, get recent users
```

You only have a Postgres connector, not BigQuery.

**Ambiguous reference without enough context:**

```
@Julius using db, show me everything
```

"db" is too vague. Julius can't match this to "prod read replica" reliably. Be more specific:

## Query Examples

Here are common query patterns that work well with automatic connector detection:

<Tabs>
  <Tab title="Explicit Connector">
    ```
    @Julius using prod-replica, what were our daily sign-ups for October?
    ```

    Julius will use the connector named "prod-replica"
  </Tab>

  <Tab title="Database Type">
    ```
    @Julius query Postgres for last week's revenue by product
    ```

    Julius will use your PostgreSQL connector
  </Tab>

  <Tab title="Natural Language">
    ```
    @Julius show me active customers from the production database
    ```

    Julius will detect "production database" and use your main connector
  </Tab>

  <Tab title="Multiple Joins">
    ```
    @Julius using analytics-bigquery, join users and transactions to show purchases by user cohort
    ```

    Julius will use the specified BigQuery connector for complex queries
  </Tab>
</Tabs>

## Troubleshooting Connector Issues

<AccordionGroup>
  <Accordion title="Julius says 'No data connectors available'">
    **Cause:** No data connectors are configured in your Julius account.

    **Solution:**

    1. Go to [julius.ai/settings/data\_connectors](https://julius.ai/settings/data_connectors)
    2. Click "Add New Connector"
    3. Follow the setup guide for your database type
    4. Test the connection before using in Slack
  </Accordion>

  <Accordion title="Julius can't find the connector I mentioned">
    **Cause:** The connector name might be spelled differently than expected.

    **Solution:**

    * Check the exact name of your connector in Julius settings
    * Use the database type instead (e.g., "Postgres" instead of specific name)
    * Ask Julius to list available connectors: "@Julius what data sources can you access?"
  </Accordion>

  <Accordion title="Query returns 'Connection failed' or 'Permission denied'">
    **Cause:** The database connection is misconfigured or credentials are invalid.

    **Solution:**

    1. Test the connector directly in Julius web app
    2. Verify the database credentials are correct
    3. Check that the database user has read permissions
  </Accordion>

  <Accordion title="Julius asks which connector to use but I only have one">
    **Cause:** The connector name is ambiguous or matches multiple connectors.

    **Solution:**

    * Specify the full connector name: "@Julius using \[exact-name], ..."
    * Rename the connector to be more unique
    * Use the database type for clarity
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Setup Data Connectors" icon="database" href="https://julius.ai/settings/data_connectors">
    Configure your first data connector in Julius
  </Card>

  <Card title="Query Best Practices" icon="lightbulb" href="/slack-agent/setup">
    Learn best practices for writing effective queries in Slack
  </Card>

  <Card title="Scheduled Reports" icon="calendar" href="/slack-agent/slack-reports">
    Automate recurring analysis and data reports to Slack
  </Card>
</CardGroup>

***

<Info>
  Questions about your connectors? Check our [Data Connectors Guide](/data-connectors/overview) or reach out to [**team@julius.ai**](mailto:team@julius.ai).
</Info>
