How to query Data Pipeline for Apple News Real-time data
Apple News Real-time data is now available in Parse.ly Data Pipeline! Send us a message at firstname.lastname@example.org to learn more about enabling Apple News in the data pipeline.
You may need to consider how to filter out Apple News real-time data depending on how your ETL/Data Warehouse/Lambda functions or other methods for ingesting data.
As mentioned in the Data Pipeline v.2.3.0 Release Plan, there is now a new column named:
channel. This will match the channel data that you see in your Parse.ly Dashboard.
If using SQL with Parse.ly data, you’ll likely want to GROUP BY the
channel field for doing metric calculations. This is because certain metrics — like unique visitor counts — only make sense on single channels.
To filter out or include Apple News Real-time data, use the following queries:
Include Apple News Real-time data:
Select <fields> From parsely_rawdata Where channel == 'apln-rta'
Exclude Apple News Real-time data:
Select <fields> From parsely_rawdata Where channel <> 'apln-rta'
Apple News Real-time fields:
For the Apple News events, you’ll also find some of the original data from Apple in the
extra_data object under the
apln key. This is a passthrough of what we receive from the Apple News API and contains fields specific to that platform. In particular, this is where you’ll want to look for the section of the Apple News that you can use as a referrer source.
Expected Apple News Real-time fields are detailed below:
is_rta: (boolean) true if the event is from apple news real-time API and not available otherwise.
dashboardId: (string) Identifier for the Apple News specific dashboard in which the events will be aggregated.
eventType: (string) The type of event. Possible values: “ARTICLE_VIEW_EVENT”, “FEATURED_ARTICLE_EVENT”, or “NOTIFICATION_EVENT”.
contentType: (string) The type of content in the article. Possible values: “article”, “video”, or “slideshow”.
sections: (array of strings) Names of the sections in which the article appears.
isPaywalled: (boolean) true if the article requires payment or subscription. false otherwise.
userId:(string) UUID uniquely identifying the user. This identifier is unique per article, which means it can be used to track returns to this article, but not to track a user’s activities across articles.
geos: (array of strings) An array containing one ISO 3166 country code for the user’s locale, if available.
referralSource:(string) The location from which the user was referred to the article, if specified.
userPaid: (boolean) true if the user has a subscription or has otherwise paid for access to the article, false otherwise.
subscriberType: (string) The subscription type of the user. Possible values examples: “Apple News+ Subscriber”, “Channel Subscriber”, “iOS Subscriber”, “Authenticated Subscriber”, “Non-Subscriber”.
hasVideo(boolean) true if the article has one or more videos, false otherwise.
deviceModel: (string) The device type used when the event was created. Example: “iPhone”.
videoPlays: (array of video event objects) An array containing objects that represent the users interaction with video content during the article session. See below for more details about the contents of this array.
videoId: (string) A string identifying the video in context of the article.
videoDuration: (integer) The duration of the video in seconds.
videoTimePlayed: (integer) The number of seconds the user played.
trueif the user finished the video,