How to configure the export of a report for integration with a BI system?

Tabla de contenidos

If a form report is going to be consumed from a Business Intelligence (BI) system, the following configuration is recommended to facilitate the export of reports to BI in Athento.

Export command

Use the command:

export_doctype_report_native

You can see how to configure its execution in How to schedule automatic tasks?.

Command configuration parameters

The export command must be configured in differential or delta mode. That is, it must export only new or updated information. This is important, as improper use can cause performance issues.

--name

In the name parameter you must indicate the internal name of the form from which the data will be exported.

--max 10000

The max parameter takes an integer and indicates the maximum number of lines the report will contain. 10,000 is a reasonable number of rows, but you must adjust it according to the approximate volume of documents from that form that are created or modified each day. Records are included in the report based on their last modification date.

--days_ago 2

The days_ago parameter expects an integer and indicates how many days will be included in the report, counted from the current date. 2 or 3 days is usually a reasonable configuration, although it depends on how frequently you need updated data in the BI. If you only require information with monthly updates, you can specify 30 days.

--created_days_ago 30

The created_days_ago parameter works the same as days_ago, but filters by the document’s creation date instead of the last modification date. Use it when you want to limit the report to documents created in the last N days. Previously only days_ago existed, which could cause confusion: when specifying, for example, --days_ago 400, documents with an old creation date could appear, because in fact those modified in that period were included.

In summary, the command should look like this:

export_doctype_report_native --name mi_formulario --max 10000 --days_ago 3

Execution frequency

It depends on when updated information is needed (for example, daily). It is recommended to run the command outside working hours or at times when the system has a lower workload.

BI configuration

With the command configured as shown, the report will be generated only with new records or those that have been modified. Therefore, you must configure the BI taking this behavior into account.

Also note that, the first time you configure the BI, you will have to perform an export with all records.

In your BI system, you will need to update the data based on a key, which will be the documents’ UUID.

In Zoho Analytics, for example, this would be the configuration:

importacion-zoho-analytics.png