pull_data: Pull data from Looker.

Description Usage Arguments Details Value Examples

Description

This function assumes that you have set the environment variables LOOKER_URL, LOOKER_ID, and LOOKER_SECRET.

Usage

1
2
pull_data(model, view, fields, filters = list(), limit = 1000,
  silent_read_csv = TRUE)

Arguments

model

character. The model parameter of the query.

view

character. The view parameter of the query.

fields

character. The fields parameter of the query.

filters

list or character. Either a named list, or a character vector using colons as separators each vector describing one of the filters of the query.

limit

numeric. The limit parameter of the query.

silent_read_csv

logical. Whether or not to suppress warnings when reading the streamed data into a data frame.

Details

The function will not allow the query to proceed unless you specify a model, a view, and at least one field.

Value

a data.frame containing the data returned by the query

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
  df <- pull_data(model = "thelook",
                view = "orders",
                fields = c("orders.count", "orders.created_month")
                filters = list("orders.created_month" = "90 days", "orders.status" = "complete")
  )

  df <- pull_data(model = "thelook",
                view = "orders",
                fields = c("orders.count", "orders.created_month")
                filters = c("orders.created_month: 90 days", "orders.status: complete")
  )

## End(Not run)

avantcredit/looker3 documentation built on May 11, 2019, 4:06 p.m.