Learn R Programming

atsd (version 1.2.0)

get_entities: Get information about entities from Axibase Time-Series Database.

Description

This function fetches a list of entities from ATSD, and convert it to a data frame.

Usage

get_entities(expression = "", active = "", tags = "*", limit = "",
  verbose = TRUE)

Arguments

expression

Optional string argument. Select entities matching particular name pattern and/or user-defined entity tags. The syntax of the expression argument is explained in the package vignette. Type browseVignettes(package = "atsd") to see the vignette.

active

Optional string argument: "true" or "false". Filter entities by lastInsertTime. If active = "true", only entities with positive lastInsertTime are included in the response.

tags

Optional string argument. User-defined entity tags to be included in the response. By default, all the tags will be included.

limit

Optional integer argument. If limit > 0, the response shows the top-N entities ordered by name.

verbose

Optional boolean argument. If verbose = FALSE then all console output will be suppressed. By default, verbose = TRUE.

Value

A data frame. Each row of the data frame corresponds to an entity and its tags: name, enabled, lastInsertTime and user-defined entity tags as requested by the 'tags' argument. For more information look at the package vignette: browseVignettes(package = "atsd").

See Also

Visit http://axibase.com/axibase-time-series-database/ for information about ATSD.

Examples

Run this code
# NOT RUN {
# get all entities and include all their tags in the data frame
get_entities()

# get all active entities and include all their tags in the data frame
get_entities(active = "true")

# Get the top 2 entities whose 'name'  and user-defined entity tag, 'app',
# match to the expression. Include the tag, 'app', into response 
# and exclude oter user-defined entity tags.
get_entities(expression = "name like 'nur*' and lower(tags.app) like '*hbase*'", 
             tags = "app", limit = 2)
# }

Run the code above in your browser using DataLab