Skip to content

Commit 4e9b2df

Browse files
added cde integration with axon on-premise
1 parent 69f17c1 commit 4e9b2df

File tree

12 files changed

+79
-7
lines changed

12 files changed

+79
-7
lines changed

Project-Axon/On-cloud/README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ This project was developed and tested on the following component versions:
6060

6161
== Project Workflow
6262

63-
image::../images/project_flow_cloud.png[project_flow]
63+
image::../images/project_flow.png[project_flow]
6464

6565
== Steps to Run
6666

Project-Axon/On-prem/README.adoc

Lines changed: 77 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Ensure you have a running **Cloudera Private Cloud Base Cluster** with the follo
4646
- Knox
4747
- Hue
4848
- Cloudera DataViz
49+
- Cloudera Data Engineering Service
4950

5051
=== 3. Host File Configuration
5152

@@ -79,6 +80,7 @@ This project was developed and tested on the following component versions:
7980
- **Cloudera Flow Management (CFM)**: 2.1.7.2002-3
8081
- **Apache NiFi**: 1.28.1
8182
- **Cloudera DataViz**: 8.0.4-b47.p1.67141340
83+
- **Data Services**: 1.5.4 SP1
8284

8385
== Technology Stack
8486

@@ -212,9 +214,15 @@ kinit -kt /run/cloudera-scm-agent/process/1546343796-hdfs-NAMENODE/hdfs.keytab h
212214
----
213215

214216
==== Step 4: Create HDFS target directory
217+
218+
Create the /Axon-Files/ directory and set the permissions using the following commands. Replace <username> with your username (e.g., admin).
219+
215220
[source,shell]
216221
----
217222
hdfs dfs -mkdir /Axon-Files
223+
hdfs dfs -chown -R <username>:hive /Axon-Files
224+
hdfs dfs -chown -R <username>:hive /warehouse
225+
hdfs dfs -chmod -R 775 /Axon-Files
218226
----
219227

220228
=== 7. Update the Parameter Contexts in NiFi Flow
@@ -263,7 +271,7 @@ Go to **Hue → Query Editor → Hive**.
263271

264272
To create all the required databases and tables at once, simply:
265273

266-
- Open the https://github.com/cloudera/cloudera-partners/blob/project-axon/Project-Axon/create_queries.txt[create_queries.txt] file from the cloned folder.
274+
- Open the 'create_queries.txt' file from the cloned folder.
267275
- Copy the entire content.
268276
- Paste it into the Hue Query Editor.
269277
- Select all and click the **Run** button.
@@ -286,7 +294,62 @@ image::../images/table_verify.png[tables verify]
286294

287295
If any table shows a count of `0`, you may need to revisit the data ingestion step for that table.
288296

289-
=== 10. Connect DataViz to Impala
297+
=== 10. Create a Spark Job using Cloudera Data Engineering (CDE)
298+
299+
In this section, you will create and schedule a Spark job that summarizes call center interactions for each day.
300+
301+
This Spark job:
302+
303+
* Reads data from the `callcenter_interaction` table.
304+
* Aggregates metrics such as resolved calls, unresolved calls, average duration, and average satisfaction rating.
305+
* Appends the summary into the `callcenter_interaction_summary` table for the given date.
306+
* Runs daily on a schedule via CDE.
307+
308+
==== 10.1. Upload Spark Job
309+
310+
. Click on *Data Services* from Cloudera Manager UI and click on *Open CDP Private Cloud Data Services* to access the Data Services Homepage .
311+
+
312+
image::../images/pvc_data_services.png[cde data service]
313+
+
314+
. Navigate to *Cloudera Data Engineering* and click on *Jobs* from the side panel.
315+
+
316+
image::../images/cde.png[cde, width=300, height=300]
317+
+
318+
. Before creating the job, make sure you open the file in an editor and replace the placeholder `<username>` with the user you are planning to run the script.
319+
+
320+
image::../images/username_spark_job.png[changing username]
321+
+
322+
. Click on *Create Job* and enter the following values:
323+
+
324+
image::../images/create_job.png[creating job]
325+
+
326+
.. Select the job type as *Spark*.
327+
.. Give a name to your Spark job (e.g. `CallCenterSummary`).
328+
.. Under *Select Application Files*, upload the `CallCenterSummary.py` file
329+
(available in the assets folder on GitHub).
330+
+
331+
image::../images/spark_job.png[creating spark job]
332+
+
333+
. From the *Create and Run* dropdown, click *Create* (do not run it yet).
334+
. The script will automatically create the summary table `callcenter_interaction_summary` if it does not exist.
335+
336+
==== 10.2. Run the Job
337+
338+
. Trigger the Spark job once by passing a date argument, for example:
339+
+
340+
----
341+
2025-08-12
342+
----
343+
. Verify that the output is appended to the summary table by running:
344+
345+
[source,sql]
346+
----
347+
SELECT *
348+
FROM callcenter_data.callcenter_interaction_summary
349+
ORDER BY interactiondate DESC;
350+
----
351+
352+
==== 11. Connect DataViz to Impala
290353

291354
To enable DataViz to read data from Hive, you need to create a connection in the DataViz UI.
292355

@@ -320,7 +383,7 @@ image::../images/connection_verify.png[verify connection, width=500, height=450]
320383
- Once successful, click *Save*.
321384
- You can now use this connection to create/import datasets and build/import dashboards from Impala tables.
322385

323-
=== 11. Add Ranger Policy for DataViz Access
386+
=== 12. Add Ranger Policy for DataViz Access
324387

325388
Before importing the dashboard into Cloudera DataViz, you must ensure the `dataviz` user has access to the Impala databases and tables. This is done by updating an existing policy in Apache Ranger.
326389

@@ -334,7 +397,7 @@ image::../images/dataviz_policy.png[dataviz policy]
334397
- In the *Users* section, add `dataviz` to the list.
335398
- Scroll down and click *Save*.
336399

337-
=== 12. Import Dashboard into DataViz
400+
=== 13. Import Dashboard into DataViz
338401

339402
- Go to *Cloudera DataViz*.
340403
You can access the DataViz UI using the default admin credentials:
@@ -353,7 +416,16 @@ image::../images/dashboard_import_verify.png[import success, width=800, height=4
353416
+
354417
image::../images/dashboard.png[dashboard]
355418

356-
=== 13. Accessing DataViz as Individual Users
419+
==== 13.1 Explore the *Callcenter-Summary* Dashboard
420+
421+
- As part of the Spark job we ran earlier, records are written into the `callcenter_interaction_summary` table.
422+
- In the same dashboard, click on the **Callcenter-Summary** tab.
423+
- This dashboard is directly connected to the `callcenter_interaction_summary` table and provides insights into daily call center interactions.
424+
- Whenever the Spark job appends new records to the table, you can refresh the dashboard and use the **Date filter** to view visuals for that day.
425+
+
426+
image::../images/callcenter_dashboard.png[Callcenter Summary Dashboard, width=800, height=450]
427+
428+
=== 14. Accessing DataViz as Individual Users
357429

358430
To allow multiple users to view or interact with dashboards, follow the steps below to create individual user accounts in Cloudera DataViz:
359431

Project-Axon/assets/project_axon_dashboard.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-62.8 KB
Loading

Project-Axon/images/allow_s3.png

-28 KB
Loading

Project-Axon/images/cde.png

69 Bytes
Loading

Project-Axon/images/cm_s3.png

-8.49 KB
Loading

Project-Axon/images/create_job.png

-8.75 KB
Loading
107 KB
Loading
-137 KB
Binary file not shown.

0 commit comments

Comments
 (0)