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. Due API limitations, only one segment can be used if needed.

Usage

1
2
3
4
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 = "")

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'

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.

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 10 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.

API limitations: https://marketing.adobe.com/developer/documentation/data-warehouse/r-report-2

A single segment is supported. Multiple segments are not supported.

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)

RSiteCatalyst documentation built on July 22, 2017, 1:01 a.m.