LogoLogo
Back to OsmosDeveloper DocsOsmos BlogWhat's New
  • Welcome to Osmos
  • 👋Getting Started with Osmos
    • Terminology
  • 🎉What's New
  • 🧩Osmos API Reference
  • ⌨️Osmos Chat
  • 👩‍💻Developer Docs
    • Manage API Keys
    • Embedding an Osmos Uploader
    • Embedding Uploader Jobs Table
    • Turning on Advanced Mode Uploader
    • Customizing Uploader Styling
    • Passing Parameterized Fields
    • Configuring Uploader's "Recall" functionality
    • Optional Uploader Settings
    • Uploader Submission Callback
    • Configuring AutoClean for your Uploader
    • Uploader Client-Side Validation
      • Data Validators
      • Checking for Duplicate values in a field
      • Creating Dropdown-Controlled Fields
      • Dynamic Dropdown Options
      • Dropdown Interaction with Validation Functions
    • Validation and Transformation Webhooks
      • OpenAPI Validation Webhook Testing
    • Parser Webhook for file based connectors
  • 🔠Datasets
    • Osmos Datasets
      • Uploading Data to your Table
      • Creating Primary and Foreign keys
      • Osmos Dataset Destination Connector
      • Osmos Dataset Source Connector
      • Dataset Edits
    • Datasets Query Builder
      • Query Builder Metadata
    • Performing Look Ups
      • Performing Joins
        • Types of Joins
  • ⏏️Uploader
    • Creating an Osmos Uploader
      • Testing your Osmos Uploader
    • Uploader Validation Summary
    • Advanced Mode
      • Overview
      • Process
    • Standard Mode
      • Overview
      • AutoClean
      • Process
    • AI AutoMapping
    • Uploaders Page
    • Uploader Details Page
  • 🔀Pipelines
    • Step 1. Select the Source
    • Step 2. Select a Destination
    • Step 3. Map & Transform Data
    • Step 4. Schedule the Pipeline
    • Step 5. Review & Confirm
    • Pipelines Page
    • Pipeline Details Page
  • ⏩Data Transformations
    • AutoMap
    • Column Mapping & Data Cleanup Panel
    • QuickFixes
    • AI Value Mapping
    • AI AutoClean
    • Lookups
      • Performing Lookups
    • SmartFill
    • Formulas
      • Date & Time Formulas
        • DateTime Format Specifiers
        • Timezone specifiers
      • Math Formulas and Operators
      • Logical Formulas & Operators
        • True & False Casting
      • Text Formulas
      • Other Formulas
    • Deduplication
  • ↘️Source Connectors
    • Amazon S3
    • Azure Blob Storage
    • BigQuery
    • Email
    • FTP
    • Google Cloud Storage (GCS)
    • Google Drive
    • Google Sheets
    • HTTP API (Call an Osmos API)
    • HTTP API (Osmos Calls Your API)
    • Osmos Dataset
    • Snowflake
    • Accessing Sources behind firewall
  • ↖️Destination Connectors
    • Amazon S3
    • BigQuery
    • FTP
    • Google Cloud Storage (GCS)
    • Google Drive
    • Google Sheets
    • HTTP API (Call an Osmos API)
    • HTTP API (Osmos Calls Your API)
      • Passing Dynamic Tokens in the API Header
    • MySQL
    • Osmos Dataset
    • PostgreSQL
    • Snowflake
    • Accessing Destinations behind firewall
  • 🗂️Projects
  • ⚙️Administration
    • Email Notifications
  • 🔒Security
  • 📞Support
  • Back to Osmos.io
Powered by GitBook
On this page
  • Overview
  • Pre-Requisites to build a Query
  • How to Build a Query

Was this helpful?

  1. Datasets

Datasets Query Builder

PreviousDataset EditsNextQuery Builder Metadata

Last updated 10 months ago

Was this helpful?

Overview

Performing a Query typically involves pulling data objects from a table or a series of tables. In Osmos, once you have created your Dataset(s) and have populated at least one Table, you are ready to build a query.

Queries are created in the Query Builder interface in Datasets.

Pre-Requisites to build a Query

  1. Create a and upload data

How to Build a Query

Step 1: Select a table you would like to Query, and enter the Query builder

  1. On the Datasets panel, click on the name of one of the tables you will be querying.

Step 2: Select Table and Joins

Step 3: Select Columns

  1. The columns available from table selection and any join activity will appear in a dropdown. The values here can be selected for display in your output.

Step 4: Aggregations

  1. Rows can be aggregated in order to reformat the data in the table. Any columns created using aggregations will need to be named. Available aggregations are: Average, Count, Count Distinct, Minimum, Maximum, Sum, Concatenate, Concatenate Distinct, Boolean: All, Boolean: Any

  1. Columns can also be inter-aggregated in order to create new outputs. In this example the columns First name and Last name have been combined into a single output

Step 5: Filters

  1. In order to access a specific subset of records, conditions can be set to include or exclude records based on values in specific fields. Complex filters can be designed leveraging AND and OR scenarios.

Step 6: Group By

  1. Group by allows a user to select the key fields to be output, and collapse non-key fields. This step is required for aggregations to be performed. In the context of an excel pivot table, Group by fields are the equivalent of the "Rows" used to construct a pivot. In this example, grouping by State and Employee Type, Our aggregations will tell us how many employees of each type are in a given state, and how much salary is being paid out to that group. This field will auto-populate based on the requirements of any aggregations that are to be performed.

Group By is required for aggregations to be performed

Step 7: Run Query/Download Output

  1. Once the query has been built, a user can select "Run Query" in order to confirm the output. If there are any issues with the query configuration, an error will populate at this point. If a query is successful, a user will receive a notification of the success and the number of rows returned.

  1. If the output created by the query is correct, a user can now download their results as a .csv file. If a query is being built for a pipeline, the query can then be saved, to be run at set intervals.

Step 8: Save query

  1. If a query is likely to be used again in the future, either to create consistent inputs to a pipleine or to generate output ad hoc, the query can be saved. Selecting save query and providing a name will allow the query to be recalled using the dropdown on the top right of the query builder.

The table that was initially selected will be pre-populated into the query. Additional tables can be added by linking values in the tables via .

🔠
join logic
Dataset
Build your query
Select Save Query
Select Saved Query to Run