BigQuery Part 3 - Defining a cloud trigger to send data to BigQuery
This part will walk you through defining a cloud trigger in the deviceWISE Cloud to send (or publish) the data to BigQuery.
Each cloud trigger has an event type that identifies when the cloud trigger is executed, such as when a property is published to the deviceWISE Cloud, and one or more actions that contain the application logic, such as publishing that data to BigQuery.
Define a cloud trigger to publish to BigQuery
- Select the Developer navigation link, then from the
left hand menu, select Triggers.
- The Triggers page will display the cloud triggers
defined in the current organization.
- To define a new cloud trigger, select the
New Trigger button in the upper
right.
The Adding Trigger page is displayed. - Enter parameters for the new cloud trigger,
including:
Parameter Description Name Enter BigQuery - Power Data. Description Enter an optional description for the cloud trigger. Event Type Select property.change. Thing Key Enter homepower or the appropriate thing key for the thing that is publishing data to the M2M Service. Operator Select Always execute. - Under the Actions section, select
the plus icon next to Add
Action.
A new action section is listed, allowing the specific action to be selected and defined.
A cloud trigger can have an unlimited number of actions. They are executed sequentially in the order that they are listed. - In the new action's section for the action
selection list, select
bigquery.publish.
- Enter parameters for the bigquery.publish
action, including:
Parameter Description BigQuery Table ID Enter power. Include Location Select false Include Attributes Select True Include Properties Select True - Select the Add button in the lower
left of the page.
The new BigQuery - Power Data trigger details page is displayed. - Select the Start button to start
your new cloud trigger.
- Select the Developer ->
Triggers link to display the Triggers
page and your the cloud trigger:
The information displayed includes the cloud trigger name, the cloud trigger event type, the cloud triggers status and the Success count and Failure count.
As the data is published to the deviceWISE Cloud and your cloud trigger executes, it will then publish the data using the defined BigQuery configuration and the Success count will increase.
You are ready for Part 4 - Verifying the data is present in BigQuery
Continue with BigQuery Part 4 - Verifying the data is present in BigQuery.