Welcome to NYX Modules’s documentation!¶
Modules¶
NYX REPORT SCHEDULER MODULE¶
Trigger periodic jobs that are executed by the Report Runner Module. Jobs are push in the queue /queue/NYX_REPORT_STEP1.
VERSION HISTORY¶
19 Jun 2019 0.0.3 AMA Fix an UTC issue
09 Jul 2019 0.0.4 AMA Mail subjects and attachments can be customized
01 Apr 2020 1.0.1 AMA Use cron to compute next runs
-
nyx_reportscheduler.
checkTasks
()¶ Called periodically in order to check if a task must be executed.
-
nyx_reportscheduler.
computeDefaultValue
(duetime, formula)¶ Computes a time formula based on the given date.
- Parameters
duetime – The generation date that must be used by the formual.
message – The formulas as a string. Example: (now-1d)
-
nyx_reportscheduler.
execute_report
(duetime, task)¶ Executes a task for the given time.
- Parameters
duetime – The generation date that must be used by the report.
message – The task that describesthe job.
-
nyx_reportscheduler.
resolveDateString
(name, adate)¶ Resolves a string formatted as follows: “Myfile-${DATE:%d%B%Y:now-30d}-biac” Into: Myfile-09July2019-biac
NYX REPORT RUNNER MODULE¶
Generates reports and store them in a local directory. The jobs are received via the NYX_REPORT_STEP2 queue from the node red workflow. Jobs sent by the report scheduler are forwarded to /queue/NYX_REPORT_STEP3 and captured by the report scheduler workflow of node red. PDE
Sends:¶
/queue/NYX_REPORT_STEP3
Listens to:¶
/queue/NYX_REPORT_STEP2
VERSION HISTORY¶
06 Aug 2019 1.1.0 AMA Build with version 1.1.0.0 of opendistro JDBC
03 Sep 2019 1.2.0 AMA elastic-helper dependency added
22 Nov 2019 1.3.1 AMA Compatible with ES 7. Added notebook reporting.
28 Nov 2019 1.4.0 AMA Packaged with libre office 6.3
02 Dec 2019 1.5.0 AMA Pandas updated to 0.24.1
13 Jan 2020 1.5.1 AMA Notebook builder updated
22 Jan 2020 1.6.0 AMA Simple notebook mode added
04 Feb 2020 1.6.4 AMA Better nyx_build_report file
11 Feb 2020 1.6.5 AMA Built with latest eshelper 1.2.0
05 Mar 2020 1.7.1 AMA Includes demo reports
09 Mar 2020 1.7.2 AMA Chmod added after each copy of a demo file
20 Mar 2020 1.8.0 AMA Jasper JDBC mode added
26 Mar 2020 1.8.6 AMA Better localization of date parameters
26 Mar 2020 1.9.0 AMA datetime imported by default
29 Apr 2020 1.9.1 AMA Linked with jasper 6.12
-
nyx_reportrunner.
messageReceivedReport
(destination, message, headers)¶ Generates a report and store it locally on the drive. There are two types of report:
JASPER
The report is generated via a jasper creator java executable. Parameters are pushed to the report.
PYTHON
The report is generated via a python command line.
- Parameters
destination – The incoming message queue or topic.
message – A json formatted text that represent the job.
headers – The message headers.
NYX FORMAT CONVERTER¶
Convert a file into another format using open office. The file to convert must be sent to the queue: /queue/NYX_CONVERTER encoded in base 64.
Warning
Converting docx complex document to pdf can be tricky for open office and can give poor results.
Payload¶
1 2 3 4 5 | {
"originalformat":"xls",
"targetformat":"csv",
"destination":"/queue/CONVERTED",
"data":"msg.payload"}
|
NYX XLS IMPORTER¶
Listens to the queue FILE_UPLOAD_XLS for an base64 encoded XLS file and saves it as an elasticsearch collection. If the column _index is no specified, the name of the inded is extracted from the Excel file name. (without the extension) A field mapping is created if it does not already exists. (Using the Excel column types)
Sends:¶
/topic/NYX_LOG
Listens to:¶
/queue/FILE_UPLOAD_XLS
VERSION HISTORY¶
25 Oct 2019 0.0.4 AMA First version
NYX LAMBDA¶
Runs code stored in notebooks using two triggers:
Interval
Message received
Optionaly a lambda can be executed via a COMMAND using the following message on the topic: NYX_LAMBDA_COMMAND
- {
“runner”:5, “action”:”execute”, “restapi”:”myrestapi”, “body”:{“a”:1,”b”:2}
}
VERSION HISTORY¶
27 Nov 2019 1.0.16 AMA First version
30 Nov 2019 1.0.17 AMA Common Section added
11 Feb 2020 1.1.0 AMA Linked with elastic helper that destroys scroll ids
20 Feb 2020 1.2.7 AMA Better logs
21 Feb 2020 1.3.0 AMA Result_icon and type_icon added
24 Feb 2020 1.3.3 AMA Better compile error log
25 Feb 2020 1.3.4 AMA Success green icon changed to green
26 Feb 2020 1.3.23 AMA Input saved + lambda commands
02 Mar 2020 1.3.27 AMA Fixed outputs
03 Mar 2020 1.3.30 AMA Fixed restart issues
09 Mar 2020 1.3.31 AMA CRON keyword added
18 Mar 2020 1.3.33 AMA Better lambda supervision
18 Mar 2020 1.3.34 AMA Added ODBC drivers
19 Mar 2020 1.4.0 AMA Fix startup sequence when requirements are changed.
Function name added to input folder. Fix a bug that created ghost functions if there is a syntax error in the lambda. * 24 Mar 2020 1.4.1 AMA SAVEINPUT parameter added * 24 Mar 2020 1.4.2 AMA Better error logs * 03 Apr 2020 1.4.3 AMA Fix cron localization * 20 Apr 2020 1.4.4 AMA Locales added in Dcke rfile * 12 May 2020 1.5.1 AMA Rest API allowed * 20 May 2020 1.5.2 AMA Use new elastic_helper * 22 Jun 2020 1.5.3 AMA Fix a bug that could prevent the cron jobs from being executed after an Elastic Search failure