Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Matched captures statistic #73

Merged
merged 7 commits into from
Jul 25, 2023
Merged

Conversation

pranavkparti
Copy link
Contributor

Description

A new reporting card statistic for matched captures is implemented.

Issue(s) addressed

What kind of change(s) does this PR introduce?

  • Enhancement
  • Bug fix
  • Refactor

Please check if the PR fulfils these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Issue

What is the current behavior?
There is no matched captures statistic.

What is the new behavior?
image
The capture/statistics and capture/statistics/card?card_title=matched_captures endpoints return matched_captures statistic.

Breaking change

Does this PR introduce a breaking change?
No.

Other useful information

The image for new behavior is based on test data. The capture_denormalized table needs to be populated using an Airflow task, which is not yet updated.

@@ -2,8 +2,8 @@ const BaseRepository = require('./BaseRepository');

class CaptureRepository extends BaseRepository {
constructor(session) {
super('capture_denormalized', session);
this._tableName = 'capture_denormalized';
super('reporting.capture_denormalized', session);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should remove the 'reporting.'. In the cloud, the DATABASE_URL is already configured only to access the reporting schema, so this is unnecessary. This might also be the reason for the failed tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, my bad. I thought I committed the code without the reporting. prefix.

@@ -55,6 +55,7 @@ class CaptureRepository extends BaseRepository {
const whereBuilder = function (object, builder) {
const result = builder;
const filterObject = { ...object };
console.log('FILTEROBJ', filterObject)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove the console.log

@Kpoke Kpoke merged commit b5ecfd1 into Greenstand:main Jul 25, 2023
@github-actions
Copy link

🎉 This PR is included in version 1.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

complete implementation of the new data sturcture tree <-> capture throughout the reporting API
2 participants