Is CQRS using OLTP and OLAP databases?

I have several OLTP databases with the APIs they are talking to. I also have ETL jobs that push data to the OLAP database every few hours.

I was tasked with creating a custom dashboard that displays elevation level data from an OLAP database. I want to create several APIs that point to an OLAP database. Should I:

  • Add to my existing API and call the OLAP database and use a template like CQRS, so the reads come from OLAP and the records come from OLTP. My concern is that there may be a data mismatch between reading and writing. How the data mismatch depends on how often you run ETL jobs (hours in my case).
  • Add to the existing API and call the OLAP databases, then ask the client to choose whether they want OLAP or OLTP data, where the API overlaps. My concern is that the client does not need to know about the implementation details of where the data comes from.
  • Write a new API that points only to the OLAP database. This is a lot of extra work.
+5
source share
1 answer

Do not use # 1: when talking to management about analyzed reports, this does not interfere with data inconsistency between the ETL process - obviously, you will create a CEO report after the end of the ETL per day

Do not use # 2: this way you load the transnational system with analytical overhead and dissolve the isolation between the goals of the two systems (not suitable for operation and maintenance)

Use # 3 as the best way to get processed results . Use modern tools such as Excel, PowerQuery, PowerBI, so you can create a rich panel with speed instead of going to tables and writing APIs.

0
source

Source: https://habr.com/ru/post/1264780/


All Articles