-
Notifications
You must be signed in to change notification settings - Fork 0
Database Queries
This guide explains how to execute database queries in GLUE and export the results. We'll cover how to use the list
command for core and custom tables, specify conditions with the where
clause, and configure console output settings for exporting data.
The list
command retrieves data from GLUE's core tables or custom tables defined within a project. The basic structure is as follows
list <tableName> <field1> <field2> ... [options]
In the Dengue-GLUE project, the following command lists the sequence ID, source name, and genotype of sequences from a specific source:
list sequence sequenceID source.name genotype -w "source.name = 'ncbi-nuccore-short'"
Options for the list
Command:
-
-w "<whereClause>"
: Applies filters (explained below). -
-p <pageSize>
: Defines how many results to display per page. -
-l <fetchLimit>
: Limits the total number of records fetched. -
-o <fetchOffset>
: Skips a number of records. -
-s <sortProperties>
: Sorts results by the specified field(s).
The where
clause specifies conditions to filter results. It must be enclosed in double quotes (" "
). If filtering by a text field (e.g., varchar
type), values must be enclosed in single quotes (' '
), within the double-quoted clause.
To list sequences from the ncbi-nuccore-short
source: