====== OSA-Report-Engine ======
{{/dokuwiki/lib/images/smileys/icon_exclaim.gif|:!:}} needs to be updated (2021-12-07) {{/dokuwiki/lib/images/smileys/icon_exclaim.gif|:!:}}
GIT: https://git.picalike.corpex-kunden.de/v5/v5-osa-report-api
==== relevant tables ====
* reports_new
* shops (maps shop_ids to shop_ints)
* brands
* picalike_products (contains a list of all products)
* reports_imports
==== relevant views ====
views are used by the dashboard apis for performance reasons. the view is refreshed daily via cronjob. the view can be updated manually via [[http://report-engine.picalike.corpex-kunden.de:4545/docs#/maintenance/update_pg_materialized_views_update_pg_materialized_views_put|update_pg_materialized_views]] . the update of the view can take 10-20 minutes. during that time the performance of queries can be impacted
* reports_new_most_recent
* reductions
==== change date of feed import ====
we need to change the report date in reports_new
update reports_new set
report_date='2020-11-02'
from
shops
where
reports_new.shop_int=shops.shop_int
and report_date='2020-11-09'
and shop_id='atelier_goldner_schnitt_de_feed'
after that we need to update the materialized views or wait one night:
curl -X PUT "http://report-engine.picalike.corpex-kunden.de:4545/update_pg_materialized_views" -H "accept: application/json"