Articles in this section
Category / Section

Create Facebook dashboard using Data integration platform

2 mins read

Introduction

This article explains how to fetch the Facebook page data using the APIs by creating workflows in the Syncfusion Data Integration Platform and to move the processed data into the SQL table to create Dashboards.

Steps involved:

Using the Syncfusion Data Integration Platform:

  1. To know the reach of the Syncfusion.Inc Page on Facebook by fetching the Video engagement KPI.
  2. Clean and process the JSON data into the required flat schema.
  3. Move the final processed data into a SQL database.

Using the Syncfusion Dashboard:

4. Create a dashboard for Facebook to showcase the reach of the videos on the Facebook page.

For steps 1 to 5, we will be defining a data-flow in the Data Integration Platform as shown in the following image.

Dataflow in Data Integration Platform

           Data flow in Data Integration Platform

Step 1: Flow File Creation

Generate an empty Flow file using the GenerateFlowFile processor to load data to be fetched using the Facebook API.

GenerateFlowFile configuration

Step 2: Use the Facebook API to fetch data of Video Engagement KPI for the Syncfusion.Inc page.

InvokeHttp processor that is used to invoke the specified URL. Investigate to get API for any Facebook KPI using the Facebook API guide before creating the dataflow. Refer to the following configuration where you can specify the investigated API in the Remote URL property.

InvokeHttp configuration

Step 3: Data preparation — clean and process the JSON data into required fields (attributes) using the processor — Evaluate JSON Path

In the EvaluateJsonPath processor, we have added a new property called “Value” and specified the JSON path expression to filter JSON array data present in the path.

EvaluateJsonPath configuration

 

In the SplitJson processor, specify the JsonPath Expression.  SplitJson processor is used to splitting JSON array data in the specified JsonPath into separate flow files.

SplitJson configuration

The EvaluateJsonPath processor that is used to filter the fields like the DateTime and value in the JSON data.

Note:

These attributes and property names will be used as column names in the SQL table.

 

EvaluateJsonPath configuration

            Property names as a column in SQL table

Step 4: Replace the field content using the SQL statement

Drag the ReplaceText processor that is used to replace the content of the filtered fields in the SQL insert statement.

ReplaceText configuration

Step 5: Move the processed data into a SQL table

Drag the PutSQL processor the is used to execute the Insert commands to insert the fetched attributes in the SQL table.

PutSQL configuration

 

Note:

Make sure you have created a SQL table (VideoEngagement) using the following query and create a controller service for it in the Data Integration Platform. For more details on controller settings, refer to our documentation.

 

SQL Table schema

The data integration workflow can be scheduled in real-time by setting it to “CRON driven” and specify CRON expression in Run Schedule so that it runs daily.

Dataflow scheduling

Step 6: The final step is to create a Facebook weekly comparison dashboard like the following in the Syncfusion Dashboard Cloud.

To learn the basics of creating a dashboard, refer to these links:

You can follow the steps covered in these links to create your dashboards easily.

Facebook weekly comparison dashboard

                       Facebook weekly comparison dashboard

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied