# Chat with your PostgreSQL, MySQL, SQLite, OpenAPI, GraphQL

Connect to your data systems securely without exposing credentials to third parties.

Self-host it. Own your data. Stay compliant.

[Check out GitHub](https://github.com/inferablehq/inferable/tree/main/data-connector)

Data Connector by Inferable

[Open video in Loom](https://www.loom.com/share/0252ba9f5d924eb9bd702386b937cd46)

## Your Universal Data Management Pane

Simplify data operations across your organization without building custom internal tools

🛠️

### Developers

Developers can quickly inspect and modify data during local development, test system behavior, and troubleshoot issues without writing custom scripts.

- Quick data inspection
- Local development testing
- System behavior verification
- Database state manipulation

### Quality Assurance

QA teams can efficiently create, modify, and clean test data across multiple systems without depending on development teams.

- Test data generation
- Cross-system validation
- Data cleanup automation
- Test environment management

### Product Analytics

Product owners can create custom queries across different data sources to gather insights and make data-driven decisions.

- Cross-system analytics
- Custom metric tracking
- User behavior analysis
- Feature adoption monitoring

### Data Operations

Perform quick data operations and migrations without building custom tools or writing complex scripts.

- Data migrations
- System synchronization
- Batch updates
- Data verification

### Troubleshooting

Customer support teams can quickly look up information and resolve issues across multiple systems.

- Quick data lookup
- Issue investigation
- Customer data verification
- System status checks

### System Integration

Easily verify and debug integrations between different systems in your infrastructure.

- Integration testing
- API verification
- Data flow monitoring
- System connectivity checks

## Quick Start

Chat with your local Postgres in under 2 minutes

```bash
docker run -e INFERABLE_API_SECRET="sk_xxxx" \
    -e POSTGRES_URL="postgresql://postgres:postgres@localhost:5432/postgres" \
    -e POSTGRES_SCHEMA="public" \
    -v $PWD/config.json:/app/config.json \
    --network host \
    inferable/data-connector
```

Don't have an Inferable API secret? Inferable is the agent framework that powers the Data Connector.

[Get one for free](/content/goto/app/index.html) or learn how to [self-host Inferable](https://docs.inferable.ai/pages/self-hosting#self-hosting-inferable)

## Keep Your Data Where It Belongs

Built with enterprise-grade security features to ensure credentials never leave your infrastructure and database connections remain private.

### Secure Credentials

Your credentials never leave your infrastructure. All queries execute within your environment.

### No Incoming Access

The connector runs inside your network and pulls instructions. No inbound connections required.

### Privacy Mode

Optional mode where query outputs are never sent to the model. Results go directly to end users.

### Approval Mode

Add an extra safety layer by requiring manual approval before executing any query.

### Schema Adaptation

Automatically adapts to schema changes by periodically fetching the latest definitions.

### Extensible

Adding new data sources is as simple as writing a new connector. Built for customization.

## Supported Data Systems

- **PostgreSQL**: Automatically reads table schemas, relationships, and indexes. Executes optimized SQL queries including JOINs and Sub queries.

- **MySQL**: Analyzes database structure including foreign keys and constraints. Generates efficient queries while respecting table relationships.

- **SQLite**: Reads local database files, understands table definitions and indexes. Perfect for hobby projects and local development.

- **OpenAPI**: Parses OpenAPI specifications to understand available endpoints, parameters, and response schemas. Makes authenticated API calls as needed.

- **GraphQL**: Introspects GraphQL schema to understand types and relationships. Constructs optimal queries to fetch exactly what's needed.

```typescript
version: '3'
services:
  data-connector:
    image: "inferable/data-connector:latest"
    configs:
      - source: "connector_config"
        target: "/app/config.json"
configs:
  connector_config:
    content: |
      {
        "privacyMode": 0,
        "approvalMode": 0,
        "connectors": [\
          {\
            "type": "postgres",\
            "name": "myPostgres",\
            "connectionString": "postgresql://...",\
            "schema": "public"\
          }\
        ]
      }
```

### Runs anywhere where Docker runs

Deploy the data connector wherever you can run a Docker container. Our flexible deployment options ensure you maintain complete control over your data infrastructure:

- **Cloud Providers**: Deploy on AWS ECS, Google Cloud Run, Azure Container Instances, or any cloud platform that supports Docker
- **Local Development**: Perfect for testing and development on your local machine with simple docker-compose commands
- **On-premise Infrastructure**: Run within your existing infrastructure to maintain complete data sovereignty and compliance
- **Kubernetes Clusters**: Scale seamlessly in your K8s environment with our container-native architecture

## Frequently Asked Questions

Common questions about the Data Connector

### Data Privacy & Security

- Are my database credentials safe?
- What is Privacy Mode and when should I use it?
- How secure is my data with the Data Connector?

### Technical

- What are the failure modes I should be aware of?
- How does the connection to my database work?

### Infrastructure

- Why do I need Inferable to run the Data Connector?
- How can I deploy the Data Connector?
- What is Inferable's role in the Data Connector?
- Can I self-host everything?
