Skip to content

Commit

Permalink
C2C-207: Ozone Analytics to flatten Odoo data (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruhanga authored Feb 26, 2024
1 parent 5afc247 commit 24b88f5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions development/.env
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ ANALYTICS_SOURCE_TABLES_PATH=
ANALYTICS_QUERIES_PATH=
ANALYTICS_DESTINATION_TABLES_MIGRATIONS_PATH=
CHANGELOG_FILE=db.changelog-master.xml
ODOO_ANALYTICS_TABLES='databasechangelog,account_account,product_category,sale_order'
ODOO_ANALYTICS_TABLES='databasechangelog,account_account,product_category,sale_order,sale_order_line,res_partner,product_product,product_template'

#Kafka
CREATE_TOPICS=openmrs.openmrs.appointment_service,openmrs.openmrs.appointment_service_type,openmrs.openmrs.care_setting,openmrs.openmrs.concept,openmrs.openmrs.concept_name,openmrs.openmrs.concept_reference_map,openmrs.openmrs.concept_reference_source,openmrs.openmrs.concept_reference_term,openmrs.openmrs.conditions,openmrs.openmrs.encounter,openmrs.openmrs.encounter_diagnosis,openmrs.openmrs.encounter_type,openmrs.openmrs.location,openmrs.openmrs.form,openmrs.openmrs.obs,openmrs.openmrs.order_type,openmrs.openmrs.orders,openmrs.openmrs.patient,openmrs.openmrs.patient_appointment,openmrs.openmrs.patient_appointment_provider,openmrs.openmrs.patient_identifier,openmrs.openmrs.patient_identifier_type,openmrs.openmrs.patient_program,openmrs.openmrs.program,openmrs.openmrs.person,openmrs.openmrs.person_attribute,openmrs.openmrs.person_attribute_type,openmrs.openmrs.person_name,openmrs.openmrs.person_address,openmrs.openmrs.visit_type,openmrs.openmrs.visit,openmrs.openmrs.visit_attribute,openmrs.openmrs.visit_attribute_type,odoo.public.sale_order
CREATE_TOPICS=openmrs.openmrs.appointment_service,openmrs.openmrs.appointment_service_type,openmrs.openmrs.care_setting,openmrs.openmrs.concept,openmrs.openmrs.concept_name,openmrs.openmrs.concept_reference_map,openmrs.openmrs.concept_reference_source,openmrs.openmrs.concept_reference_term,openmrs.openmrs.conditions,openmrs.openmrs.encounter,openmrs.openmrs.encounter_diagnosis,openmrs.openmrs.encounter_type,openmrs.openmrs.location,openmrs.openmrs.form,openmrs.openmrs.obs,openmrs.openmrs.order_type,openmrs.openmrs.orders,openmrs.openmrs.patient,openmrs.openmrs.patient_appointment,openmrs.openmrs.patient_appointment_provider,openmrs.openmrs.patient_identifier,openmrs.openmrs.patient_identifier_type,openmrs.openmrs.patient_program,openmrs.openmrs.program,openmrs.openmrs.person,openmrs.openmrs.person_attribute,openmrs.openmrs.person_attribute_type,openmrs.openmrs.person_name,openmrs.openmrs.person_address,openmrs.openmrs.visit_type,openmrs.openmrs.visit,openmrs.openmrs.visit_attribute,openmrs.openmrs.visit_attribute_type,odoo.public.sale_order,odoo.public.sale_order_line,odoo.public.res_partner,odoo.public.product_product,odoo.public.product_template

# Postgresql
POSTGRES_USER=postgres
Expand Down
1 change: 1 addition & 0 deletions development/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ services:
- 8383:8083
volumes:
- ./debezium-connect/jars/TimestampConverter-1.2.4-SNAPSHOT.jar:/kafka/connect/debezium-connector-mysql/TimestampConverter-1.2.4-SNAPSHOT.jar
- ./debezium-connect/jars/TimestampConverter-1.2.4-SNAPSHOT.jar:/kafka/connect/debezium-connector-postgres/TimestampConverter-1.2.4-SNAPSHOT.jar
environment:
- BOOTSTRAP_SERVERS=kafka:9092
- GROUP_ID=1
Expand Down
8 changes: 7 additions & 1 deletion development/setup-connect/setup-connect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,16 @@ curl --fail -i -X PUT -H "Accept:application/json" -H "Content-Type:application/
"plugin.name": "pgoutput",
"database.server.name": "odoo",
"table.include.list": "public.(.*)",
"converters": "timestampConverter",
"timestampConverter.type": "oryanmoshe.kafka.connect.util.TimestampConverter",
"timestampConverter.format.time": "HH:mm:ss",
"timestampConverter.format.date": "YYYY-MM-dd",
"timestampConverter.format.datetime": "yyyy-MM-dd HH:mm:ss",
"timestampConverter.debug": "false",
"key.converter": "org.apache.kafka.connect.json.JsonConverter",
"key.converter.schemas.enable": "true",
"heartbeat.interval.ms": "5000",
"slot.name": "odoo_debezium",
"publication.name": "odoo_publication",
"decimal.handling.mode": "double"
}'
}'

0 comments on commit 24b88f5

Please sign in to comment.