LogoLogo
  • Overview
  • publisher
    • Introduction
    • Getting Started
      • Logging in to Publisher
    • Data Sources
      • Connecting a Data Source
      • Managing a Data Source
      • Connectors
        • AWS S3 Permissions
        • Connecting to AWS S3 Storage
        • Google Cloud Storage (GCS) Permissions
        • Connecting to Google Cloud Storage
        • PostgreSQL Permissions
        • Connecting to PostgreSQL
        • PostgreSQL on Azure Permissions
        • Microsoft Azure Blob Storage Permissions
        • Connecting to Microsoft Azure Blob Storage
        • Connecting to HTTPS
        • Connecting to other sources via Trino
          • BigQuery
    • Collections
      • Creating a Collection
      • Sharing a Collection
      • Collection Filters
      • Editing Collection Metadata
      • Updating Collection Contents
    • Access Policies
      • Creating an Access Policy
      • Managing Access Policies
    • Questions
      • Adding Questions
      • Example Question
    • Settings
      • Viewing Current and Past Administrators
      • Adding an Administrator
      • Removing an Administrator
      • Setting Notification Preferences
  • Explorer
    • Introduction
    • Viewing a Collection
    • Browsing Collections
    • Asking Questions
    • Accessing a Private Collection
      • Requesting Access to a Private Collection
    • Filtering Data in Tables
      • Strings
      • Dates
      • Numbers
  • Workbench
    • Introduction
    • Getting Started
      • Logging into Workbench
      • Connecting an Engine
      • Finding or Importing a Workflow
      • Configuring Workflow Inputs
      • Running and Monitoring a Workflow
      • Locating Outputs
    • Engines
      • Adding and Updating an Engine
        • On AWS HealthOmics
        • On Microsoft Azure
        • On Google Cloud Platform
        • On Premises
      • Parameters
        • AWS HealthOmics
        • Google Cloud Platform
        • Microsoft Azure
        • On-Premises
        • Cromwell
        • Amazon Genomics CLI
    • Workflows
      • Finding Workflows
      • Adding a Workflow
      • Supported Languages
      • Repositories
        • Dockstore
    • Instruments
      • Getting Started with Instruments
      • Connecting a Storage Account
      • Using Sample Data in a Workflow
      • Running Workflows Using Samples
      • Family Based Analysis with Pedigree Information
      • Monitor the Workflow
      • CLI Reference
        • Instruments
        • Storage
        • Samples
        • OpenAPI Specification
    • Entities
    • Terminology
  • Passport
    • Introduction
    • Registering an Email Address for a Google Identity
  • Command Line Interface
    • Installation
    • Usage Examples
    • Working with JSON Data
    • Reference
      • workbench
        • runs submit
        • runs list
        • runs describe
        • runs cancel
        • runs delete
        • runs logs
        • runs tasks list
        • runs events list
        • engines list
        • engines describe
        • engines parameters list
        • engines parameters describe
        • engines health-checks list
        • workflows create
        • workflows list
        • workflows describe
        • workflows update
        • workflows delete
        • workflows versions create
        • workflows versions list
        • workflows versions describe
        • workflows versions files
        • workflows versions update
        • workflows versions delete
        • workflows versions defaults create
        • workflows versions defaults list
        • workflows versions defaults describe
        • workflows versions defaults update
        • workflows versions defaults delete
        • namespaces get-default
        • storage add
        • storage delete
        • storage describe
        • storage list
        • storage update
        • storage platforms add
        • storage platforms delete
        • storage platforms describe
        • storage platforms list
        • samples list
        • samples describe
        • samples files list
      • publisher
        • datasources list
  • Analysis
    • Python Library
    • Popular Environments
      • Cromwell
      • CWL Tool
      • Terra
      • Nextflow
      • DNAnexus
Powered by GitBook

© DNAstack. All rights reserved.

On this page
  • Creating a Question
  • Defining the Question
  • Creating Your Query
  • Defining and Configuring Variables
  • Using Variables in SQL
  • Configuring Variables
  • Testing Your Query
  • Sharing Your Question to the Network
  • Confirming Implementation

Was this helpful?

  1. publisher
  2. Questions

Adding Questions

PreviousQuestionsNextExample Question

Last updated 6 months ago

Was this helpful?

Creating a Question

In Publisher, select the desired collection in the Collections tab in the sidebar. Click on the tab in the Collection and scroll down to the Questions section below the Download section. Click on "New Question" to start defining a new query.

Defining the Question

Fill in the Question Name and Description.

The description tells the user what type of query they are running.

Creating Your Query

The query will allow you to join tables from your collection, retrieve data, and apply filters using variables. Tables and their schema will be displayed in the left sidebar.

You may notice a default SQL statement in the query window. Remove the default SQL and replace it with your SQL statement for the question.

In the SQL editor, write a SQL query that pulls data from the necessary tables. Use JOIN to link related tables as needed.

Defining and Configuring Variables

The sidebar to the right of your Query window should automatically populate with new variables.

If this does not occur, please edit the SQL query to retype any variables in {{ }} format.

Using Variables in SQL

Define variables in the WHERE clause to make your query dynamic. For example:

Unset
SELECT *
FROM subject_metadata s
INNER JOIN enterotypes e
ON s.sample_name = e.sample_name
WHERE s.sex = {{sex}}

Here, {{sex}} is a variable that will be entered by the researcher when they run the query.

Configuring Variables

In the Variables panel on the right, create and configure the variables used in your SQL query.

  • Name: The identifier for the variable matching the SQL query (e.g. sex).

  • Label: The display name that researchers will see in Explorer when entering values.

  • Type: Data type of the field (e.g. boolean, decimal, datetime, integer, string).

  • Input Type: Specify the type of input (e.g. text, dropdown).

  • Default Value (optional): Specify the default value of the variable that gets applied to the SQL.

  • Description (optional): Add a description to guide researchers on how to use this variable.

Once this is filled in, you can test your query.

Testing Your Query

Click the "Test Query" button above the query window.

  • If the results window displays an error message: Please double-check the SQL statement and the variables in the sidebar to resolve any issues. If the errors persist, copy the error message or take a screenshot and contact DNAstack for support.

  • If the results window shows no errors: Click "Save" to preserve your work, even if the query is incomplete. You can always edit the question later to continue building or refining the query.

Note: If you do not save the question and an unexpected issue or session timeout occurs, you may lose all the progress made. Saving frequently is a best practice to avoid this.

Sharing Your Question to the Network

Once the question is tested and saved, navigate to the Sharing tab of your collection and scroll down to the Questions section.

“Public” allows any researcher who accesses your Network to ask the question.

“Registered” only permits other researchers within your Network who have created accounts to ask the question.

Once your access policy is selected, click “Save.”

Confirming Implementation

To confirm that the question has been successfully applied to your collection, perform the following steps:

  1. Click the collection card representing your collection

  2. Confirm that a new tab with the previously defined name for the question has been added to your collection.

  3. Click on the tab, add inputs, and submit the question.

In the dropdown, admins can select from a variety of access permissions:

Alternatively, admins may also select from any additional that were in your Network.

Go to your site (e.g. )

Sharing
Access Policy
Access Policies
created
Explorer
neuroscience.ai