# Osmos Datasets

## Overview

This page outlines the initial process for creating a new Osmos Dataset.

## Creating an Osmos Dataset&#x20;

Step 1: Click the Datasets icon and select **Create Dataset.**

Step 2: In the New Dataset Window, enter the name of your **Dataset.**

Step 3: Hit **Save.**&#x20;

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2FGOkc8hNISdqk7rMoMBhW%2FCleanShot%202023-04-11%20at%2014.46.03%402x.png?alt=media&#x26;token=1c76a814-0bf5-4e36-a787-811d80874e50" alt=""><figcaption></figcaption></figure>

## Adding a Table to your Osmos Dataset

Step 1: Click the Dataset icon, and select your newly created **Osmos Dataset**.

Step 2: Select **Add New Table.**

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2FWbJG2WOeQEqjDagBVvLc%2Fimage.png?alt=media&#x26;token=15507f5f-f58a-401f-874c-f35d4a665130" alt=""><figcaption></figcaption></figure>

Step 3: Enter the **Table Name.**

Step 4:  Enter the **Schema.**

Design the output schema via two options, either import the schema or build it within Osmos.

#### Option 1: Schema Import

Upload or drag & drop the schema file.

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2FtoYA97HWLLrdDx8uW6Zi%2FCleanShot%202023-10-17%20at%2010.14.07%402x.png?alt=media&#x26;token=52bc6295-ab22-48fa-82fb-5e8a825dd023" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Import a file with the headers along with one row of sample data.  This data is used ***only*** in schema creation.
{% endhint %}

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2FbMM6n6atXab4SvIWAFzA%2FCleanShot%202023-10-17%20at%2010.14.50%402x.png?alt=media&#x26;token=1785ed2d-e374-438b-9628-f51e5d6f5ba3" alt=""><figcaption></figcaption></figure>

#### **Option 2: Building the Schema for the Destination Connector**

Use the schema designer to build the output schema for your table.

| Parameter       | Description                                                                                                                                                       |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Field Name      | Provide a field name for the output fields. These names will be used as the column headers or field names in the output file you are writing to.                  |
| Type            | Define the type of each field. The field types will be used to enforce rules when you send data to this Connector.                                                |
| Required        | Check this box if the field is nullable. If the field is not nullable, you will be required to provide values for this field when sending data to this Connector. |
| Actions         | Deletes the field.                                                                                                                                                |
| Add Field       | Adds another field to the schema.                                                                                                                                 |
| Upload Schema   | Upload schema or drag & drop header fields                                                                                                                        |
| Add Foreign Key | Add a foreign key column to be used in a lookup & join criteria when the data from a related table is combined                                                    |

A Primary key can be associated with this table.  The key field must be required and unique.&#x20;

{% hint style="info" %}
See [Key Fields](https://docs.osmos.io/datasets/getting-started/creating-primary-and-foreign-keys) for more detail
{% endhint %}

Select Save Table.

## Dataset Actions

You can take four actions in a Dataset.

1. Create Table
2. Access QueryBuilder
3. Clone a Dataset
4. Edit a Dataset

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2FrXWjlaH42cAiKaWqCWm8%2Fimage.png?alt=media&#x26;token=d71661bc-c789-4ebe-b7c0-7e4392340e02" alt=""><figcaption></figcaption></figure>

Here is a drill down on the Dataset options:

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2F8Drfib3nxs9z5d6nSaWq%2Fimage.png?alt=media&#x26;token=66767f2f-7f0d-492c-97f2-0452c1c5a88a" alt=""><figcaption></figcaption></figure>

### Create Table

[See above](#creating-an-osmos-dataset)

### Query your Dataset

Drill directly into the Query Builder to build your table filters, joins, and aggregations.

Step 1:  Click the cylinder icon from your **Osmos Dataset**

For more guidance on [the Query Builder.](https://docs.osmos.io/datasets/datasets-query-builder)

### Cloning your Osmos Dataset

Cloning will duplicate a Dataset.  Note, that this process will move the existing tables but will not clone the data in each table. &#x20;

Step 1: Click the clone icon from your **Osmos Dataset**.

Step 2: Select the **Project.**

Step 3: Enter the new **Dataset Name.**

Step 4:  Click on **Clone.**

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2F9Bmp41EoKABVCxhDTbR8%2Fimage.png?alt=media&#x26;token=051b42c6-a9e4-4adb-9b6a-e2f6b0f7e0db" alt=""><figcaption></figcaption></figure>

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2FPqB5v90TcQr8a0u3EjBr%2Fimage.png?alt=media&#x26;token=72120dd4-8c45-4a68-bbc5-5b5f215febdd" alt="" width="375"><figcaption></figcaption></figure>
