Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 1.34 KB

README.md

File metadata and controls

49 lines (30 loc) · 1.34 KB

matomo-to-pg GitHub Release

Sync some matomo tables from MySQL to PostgreSQL.

For example to create custom metabase dashboards:

The tables currently synced are:

  • matomo_log_conversion
  • matomo_log_visit
  • matomo_log_link_visit_action
  • matomo_log_action

Usage

Adjust your .env from the .env.example then run :

docker run --env-file .env ghcr.io/betagouv/matomo-to-pg/sync

You first need to create your PostgreSQL database structure:

Example with docker:

docker cp ./pg-init.sql [id]:/tmp/pg-init.sql
docker exec -ti [id] psql --dbname matomo -U matomo -f /tmp/pg-init.sql

Dev

Run from source with node --env-file=.env src/index.mjs

To update the source or target database typings, run yarn kysely-codegen --print with the DATABASE_URL of your choice.

references

related