Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here, there are four fields that the user must set up before enabling the controller service:

Input name

Value

Database Connection URL

Connection URI for the database. Example: jdbc:postgresql://host:port/database_name

Database Driver Class Name

Database driver according to the database manager to use.

Database Driver Location(s)

NiFi path where the database driver is located.

Database User

Database user.

Database Password

Database password.

This fields are already set up for a postgresql database connection, in case there is a need to change the database instance, this fields may change accordingly.

...

Make sure that either the DBCPConnectionPool and JsonTreeReader controllers are enabled, otherwise there will be components with the warning icona the warning icon. Also make sure that the parameter context from https://psi.atlassian.net/wiki/spaces/ZMO/pages/edit-v2/583630850#3.-Create-context-parameters is configured for all the processes.

5. Creating database and views

After going through all the previous steps to configure the NiFi flow, the final step is now to create the database and its views. This will allow NiFi to refresh the data accordingly.

First, it is needed to download the database file called tables.sql from the following repository: https://github.com/KnowTechTure/ZWE_NiFi. This file contains the definition for 17 tables:

  • mdl_certificates

  • mdl_cohorts

  • mdl_cohorts_x_users

  • mdl_course_categories

  • mdl_course_completion

  • mdl_course_modules_completion

  • mdl_courses

  • mdl_enrolments

  • mdl_feedback_answers

  • mdl_feedback_metadata

  • mdl_feedback_questions

  • mdl_grade_grade

  • mdl_grade_items

  • mdl_scorm_scoes_track

  • mdl_user_roles

  • mdl_users

  • mdl_course_modules

Make sure that every table is created.

Second, download the database file called views from the following repository: https://github.com/KnowTechTure/ZWE_NiFi. The file contains the definition for X views:

  • zwe_course_grades

  • zwe_elearning_certificates_view_dev

  • zwe_elearning_enrolmentscourseunifiedview_dev

  • zwe_elearning_feebacksview_dev

Finally, execute both definitions into a desired database to create the tables and views. This will require to configure NiFi DBCPConnectionPool (see https://psi.atlassian.net/wiki/spaces/ZMO/pages/edit-v2/583630850#4.-Adding-controllers to configure the controller properly).