QueueDataWarehouse: Queue a DataWarehouse Report

Description Usage Arguments Details Value Examples

View source: R/QueueDataWarehouse.R

Description

A QueueDataWarehouse report is a report where metrics are retrieved, broken down by an unlimited number of elements such as page, eVar, prop, etc, and with or without temporal aggregation.

Usage

1
2
3
4
5
QueueDataWarehouse(reportsuite.id, date.from, date.to, metrics, elements,
  date.granularity = "day", segment.id = "", data.current = TRUE,
  expedite = FALSE, interval.seconds = 5, max.attempts = 120,
  validate = TRUE, enqueueOnly = TRUE, ftp = "",
  classification = c())

Arguments

reportsuite.id

Report suite id

date.from

Start date for the report (YYYY-MM-DD)

date.to

End date for the report (YYYY-MM-DD)

metrics

List of metrics to include in the report

elements

List of elements to include in the report

date.granularity

Time granularity of the report (year/month/week/day/hour), default to 'day'. Pass NULL if you do not want any time granularity.

segment.id

Id of Adobe Analytics segment to retrieve the report for

data.current

TRUE or FALSE - whether to include current data for reports that include today's date

expedite

Set to TRUE to expedite the processing of this report

interval.seconds

How long to wait between attempts

max.attempts

Number of API attempts before stopping

validate

whether to submit report definition for validation before requesting the data.

enqueueOnly

only enqueue the report, don't get the data. returns report id, which you can later use to get the data

ftp

FTP client parameters, only used if enqueueOnly=TRUE. Double check ftp parameters before requesting a long report.

classification

List of SAINT classifications for each element. If supplied, must be a character vector of length equal to elements.

Details

The QueueDataWarehouse function allows to access to Data WareHouse data and returns either json or sends a csv to a ftp server.

Because of the Reporting API structure, this function requests the report, then, if enqueueOnly=FALSE, checks the reporting queue to see if the report is completed, and when the report returns as "done" pulls the report from the API (if ftp is not defined). This checking process will occur up to the specified number of times (default 120), with a delay between status checks (default 5 seconds). If the report does not return as "done" or a "delivery_complete" after the number of tries have completed, the function will return an error message. When enqueueOnly=TRUE and no ftp server is set, the report can be retrieved with Report.Get using the reportId returned by the QueueDataWarehouse function.

Data Warehouse documentation: https://docs.adobe.com/content/help/en/analytics/export/data-warehouse/data-warehouse.html

Data Warehouse (1.4) API documentation: https://github.com/AdobeDocs/analytics-1.4-apis/blob/master/docs/reporting-api/data_warehouse.md

Multiple segments are supported as long as they are compatible with Data Warehouse.

Classifications are supported, and if supplied, must be equal in length to elements. Pad out classifications with either a blank string or NA if and as necessary.

The following element properties are not supported in Data Warehouse reports: - selected - search - top - startingWith - sortBy

Calculated metrics are not supported.

Results for data warehouse reports can be accessed in two ways: directly through the API and through FTP delivery. Email delivery is not supported.

All data warehouse results are paged in chunks of 20 MB. Add "page": to Report.Get to determine the page returned. If no page is specified then the first page is returned.

Value

Data frame or report id, if enqueueOnly is TRUE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
report.data <- QueueDataWarehouse("your_report_suite",
                            "2014-01-01",
                            "2014-01-07",
                            c("visits", "pageviews","event10"),
                            c("page","geoCountry","geoCity"),
                            enqueueOnly=TRUE,
                            ftp = list(host = "myftpserver.com",
                                       port = "21",
                                       directory = "/fromDW/",
                                       username = "memyselfandirene",
                                       password = "valkilmer",
                                       filename = "myreport.csv")
                            )

## End(Not run)

randyzwitch/RSiteCatalyst documentation built on May 11, 2020, 3:05 p.m.