dbqSNB: query raw data, all b_ tables at once

View source: R/U_queries.R

dbqSNBR Documentation

query raw data, all b_ tables at once

Description

query raw data, all b_ tables at once

Usage

dbqSNB(
  username,
  host = "scidb.mpio.orn.mpg.de",
  q = "SELECT * FROM boxtables limit 1",
  db = getOption("snbDB_v2"),
  .boxes = getOption("boxes_v2")
)

Arguments

username

username

host

host

q

query,boxtables kw should be used instead of bnnn box name.

db

default to getOption('snbDB_v2')

.boxes

default to 1:277

ncores

number of cores to use

Examples

## Not run: 
# Simple SELECT
dbqSNB('snbAdmin', host = "scidb.mpio.orn.mpg.de", 'SELECT * FROM boxtables limit 1')

# Last entry
dbqSNB('snbAdmin', host = "scidb.mpio.orn.mpg.de", 
        'SELECT * FROM boxtables ORDER BY r_pk desc limit 1')

# SELECT last n days
x = dbqSNB('snbAdmin', host = "scidb.mpio.orn.mpg.de",
'SELECT datetime_, LB, transp FROM  boxtables
   WHERE datetime_ >= DATE_ADD( (SELECT max(datetime_) from  boxtables) , INTERVAL -3 DAY) AND
   YEAR(datetime_) = YEAR(CURDATE() )
')

## End(Not run)


mpio-be/SNB2 documentation built on Sept. 17, 2024, 4:27 p.m.