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

# Getting started

> Quick start guide to creating your first Cube project and accessing the Cube Playground

**Focus:** Get up and running with Metrics Store by creating your first project, accessing Cube Playground, and querying your first cubes.

This guide will walk you through creating your first Cube project and getting started with the Metrics Store in just a few minutes.

## Prerequisites

Before you begin, ensure you have:

* Access to the 5X Platform
* Metrics Store permissions
* An environment configured in your workspace

## Step 1: Navigate to Metrics Store

1. **Go to Metrics Store page**
   * Navigate to `/metrics-store` in your browser
   * Or click **"Metrics Store"** from the navigation menu

2. **View the interface**
   * If you have no projects, you'll see a **"Create project"** button
   * If projects exist, use the project dropdown in the header and select **"New project"**

## Step 2: Create your first project

### **Project details**

Fill in the project creation form:

**Project name**

* Choose a unique, descriptive name (max 50 characters)
* Example: `My First Cube Project`

**Repository type**

* **Platform managed** (recommended for beginners) - 5X-managed Git repository
* **Imported** - Connect an existing GitHub repository

**Environment**

* Select your environment from the dropdown
* Choose the environment where your data warehouse is configured

**Deployment option**

* **Always on** - Service runs continuously (recommended for production)
* **On demand** - Service starts when needed
* **Scheduled** - Time-based or CRON-based scheduling

### **Add project**

Click **"Add Project"** and wait for project creation:

* Repository cloning will begin automatically (if imported)
* Project initialization takes a few seconds
* You'll be automatically taken to the project workspace

<Note>
  **Platform managed repositories**

  For beginners, we recommend starting with **Platform Managed** repositories. 5X handles all Git repository management, making setup easier and faster.
</Note>

## Step 3: Access Cube Playground

Once your project is created:

1. **Cube Playground loads automatically** in the main workspace area
2. **Start exploring** your cubes and data

The Cube Playground is an interactive interface where you can:

* Build queries visually using the query builder
* Write SQL queries directly
* Explore available cubes, measures, and dimensions
* Test queries before deploying

## Step 4: Get API credentials

To connect BI tools or applications to your cubes:

1. **Click "API Credentials"** button in the header
2. **View SQL API credentials**:
   * Copy the connection string
   * Use in BI tools or SQL clients
   * Credentials include host, port, database, username, and password
3. **Switch to REST API tab** for REST API credentials:
   * Base URL and authentication token
   * Use for RESTful API access

<Note>
  **Credentials availability**

  API credentials are only available when:

  * A project is selected
  * A branch is selected
  * Server heartbeat status is **"RUNNING"**
</Note>

## Step 5: Create your first cube

In the Cube Playground, you can define cubes using YAML or JavaScript. Here's a simple example:

```yaml theme={null}
cubes:
  - name: orders
    sql_table: orders
    measures:
      - name: count
        type: count
      - name: total_revenue
        sql: sum(amount)
        type: sum
    dimensions:
      - name: status
        sql: status
        type: string
      - name: created_at
        sql: created_at
        type: time
```

**Key components:**

* **Measures** - Quantitative metrics (counts, sums, averages)
* **Dimensions** - Attributes for analysis (status, date, category)
* **Time dimensions** - Special dimensions for time-based analysis

Save your cube definition and deploy it to make it available for querying.

## Step 6: Query your data

### **Using SQL API**

Connect a SQL client or BI tool using the SQL API credentials:

```sql theme={null}
SELECT 
  orders.status,
  orders.total_revenue
FROM orders
GROUP BY orders.status
```

### **Using REST API**

Use the REST API credentials to query data programmatically:

```bash theme={null}
curl -X POST 'https://your-api-url/v1/load' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -d '{
    "query": {
      "measures": ["orders.total_revenue"],
      "dimensions": ["orders.status"]
    }
  }'
```

### **Using Cube Playground**

Build queries visually in the Cube Playground:

1. Select your cube from the sidebar
2. Choose measures and dimensions
3. Apply filters if needed
4. Click **"Run"** to execute the query
5. View results in the query results panel

## Common tasks

### **Switch between projects**

1. Click the project name in the header
2. Select a project from the dropdown
3. Wait for the project to load and Cube Playground to refresh

### **Sync latest changes**

1. Click **"Sync now"** button in the header
2. Wait for sync to complete
3. Changes from your Git repository will be reflected automatically

### **Add BI integration**

1. Click **"BI Integration"** button
2. Click **"New BI Connection"**
3. Select your BI tool
4. Configure connection settings
5. Sync to activate the connection

## Next steps

Now that you have your first project set up:

<CardGroup cols={2}>
  <Card title="Project Management" icon="folder" href="/core-features/metric-store/project-management">
    **Manage projects**

    Learn how to create, edit, and manage multiple Cube projects.
  </Card>

  <Card title="Cube Playground" icon="code" href="/core-features/metric-store/cube-playground">
    **Build cubes**

    Master the Cube Playground for building and testing cube definitions.
  </Card>

  <Card title="API Credentials" icon="key" href="/core-features/metric-store/api-credentials">
    **Connect tools**

    Learn how to use API credentials to connect BI tools and applications.
  </Card>

  <Card title="BI Integration" icon="link" href="/core-features/metric-store/bi-integration">
    **Sync BI tools**

    Set up automatic synchronization with your BI tools.
  </Card>
</CardGroup>

## Tips for success

* **Start with Platform Managed** repositories for easier setup
* **Use Always On deployment** for production environments
* **Protect main branch** in project settings for production work
* **Sync regularly** to keep data up-to-date with repository changes
* **Document your cubes** with descriptions and examples for team members
* **Test queries in Playground** before deploying to production

***

<CardGroup cols={2}>
  <Card title="Project Management" icon="folder" href="/core-features/metric-store/project-management">
    **Next: Manage projects**

    Learn how to create, edit, and configure Cube projects.
  </Card>
</CardGroup>
