MassProspecting / docs

Public documentation, roadmap and issue tracker of MassProspecting
http://doc.massprospecting.com/
1 stars 0 forks source link

glitch: rule instances incongruencies #188

Open leandrosardi opened 2 months ago

leandrosardi commented 2 months ago

This issue is happening for account dcd47d5c-9b88-4690-93a8-246bd4da59cb in the node s01.

select count(i.id), count(distinct i.id_event), count(distinct i.id_company)
from "rule" r
join rule_instance i on r.id=i.id_rule
where r.id='6418c14d-3b6b-4a43-897f-810960762992'
count|count|count|
-----+-----+-----+
  346|  346|  339|

image

image

leandrosardi commented 2 months ago

Problems

  1. rule doesn't create instances for 2 companies.
  2. It creates replicated rules when 2 events have the same company.
leandrosardi commented 2 months ago
  1. rule doesn't create instances for 2 companies.

There are 341 companies. But only 339 are linked to the source.

select count(distinct e.id), count(distinct c.id)
from company c
join "event" e on c.id=e.id_company
join event_job x on e.id=x.id_event 
join "job" j on j.id=x.id_job 
where j.id_source='c1623458-0954-47c1-953a-234f689f6edc'

2 companies have not been linked to the event:

select id, name from "company" 
where id_account='dcd47d5c-9b88-4690-93a8-246bd4da59cb' 
and id not in (select id_company from "event" where id_company is not null)
id                                  |name                          |
------------------------------------+------------------------------+
faa44ce5-914c-44b7-b573-7c04d555d7cb|Martinez Street Women's Center|
5fd715f0-af58-498f-9192-ba7aa9b6684a|Equus Workforce Solutions     |