PSQLQueryTool Glossary

From DavinciWiki
Revision as of 10:04, 8 April 2014 by Murray (Talk | contribs)

Jump to: navigation, search

Contents: Description, Procedure

Description

In order to make the most of the MSFF PSQL Mars database, you must be familiar with the schema and table layout of the database. The examples, provided here allow you to access the descriptions of the tables and columns available for you to use in your queries.

There are two sources for this information in the reference schema:

  1. reference.pubmars_glossary
    This is a VIEW based on joining several of the postgres control tables which define the actual Mars data tables; this includes tables in the public schema. Field descriptions will be null, if the table author did not populate a descriptive comment about the column.
    Suggested selection-list fields: schema_name, table_name, column_name, datatype_name, description
  2. reference.glossary
    This is a hand-updated table describing all of the tables under the control of THEMIS Mission-Operations; the descriptions provided here may be more verbose than those in the pubmars_glossary
    Suggested selection-list fields: table_name, field_name, value_type, description
    Suggested constraints: schema_name='thmpub'

The examples provided below are intended to get you started; however, you should refine the constraints-list and the order-by-list according to your needs.

Procedure

  • Use the following commands and set up in each of the following examples

(1) Write the query; (2) access the PSQLQueryTool from Davinci; (3) read in the results (two options)

dv>query="..."
 ... dv-results
dv>url=themis3db(query,psql=1,header=1)
 ... dv-results
dv>gloss=read_lines("...")
 ... dv-results
--OR--
dv>copy("...",$TMPDIR)
... dv-results
  • Example-1: Get a list of available tables
dv> commands here
dv results ...
  • Example-2: Explore the columns available in a single table
dv> commands here
dv results ... 
  • Example-3: Search for available columns related to the concept of "temperature"
dv> commands here
dv results ... 

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Functions Used

{{{3}}}

Related Procedures

{{{4}}}

Personal tools