verifyQuery: Check Query Against a Provider

Description Usage Arguments Details Value See Also Examples

View source: R/TSdbiMethods.R

Description

Check validity of fields of a query against a provider.

Usage

1
    verifyQuery(provider, Q, verbose = TRUE)

Arguments

provider

Character string indicating a provider.

Q

Character string indicating fields of a query.

verbose

Logical indicating if problems should be printed out. If FALSE only return the logical result.

Details

This functions check fields of the query Q against those expected by the provider indicated by provider. If all fields check ok then TRUE is returned, otherwise the result is FALSE. If verbose is TRUE then the first error found will be printed.

Note that, even though the query is valid, the providor may not have data for the specified combination of fields, in which case a data request will not return data.

As of February 2015, the WB provider is not responding to queries in the same way as it indicates they should be, so this utility is not very useful with this provider. That is, even if the declared structure is FREQ.SERIES.REF_AREA, you have to build the WB query as REF_AREA.SERIES.

Value

TRUE/FALSE returned invisibly

See Also

getProviders, getFlows, getDimensions, getCodes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
  print(verifyQuery('IMFx', 'PGI.CA.*.*.*.*'))# returns FALSE

  print(verifyQuery('IMF', 'PGI.CA.*.*.*.*', verbose = FALSE)) # returns TRUE

  print(verifyQuery('IMF', 'PGI.CAN.*.*.*.*'))# returns FALSE 

  #print(verifyQuery('NBB', 'HICP.000000.*.*'))
  #print(verifyQuery('NBB', 'HICP.000000.BE.M'))
  
## End(Not run)

TSsdmx documentation built on May 2, 2019, 2:45 a.m.

Related to verifyQuery in TSsdmx...