SlideShare a Scribd company logo
Wanny Morellato, SAP Concur

Director of Engineering

October 16, 2018
Breaking Down A SQL Monolith

with Change Tracking, Kafka and KStreams / KSQL
NOTE: Delete the yellow stickers when finished.
Samples of a title slide with a pictogram are also
available in this template.
See SAP Image Library for other available images
you can sort using the drop down menu and
selecting illustration options.
Wanny Morellato

Director of Engineering @ SAP Concur
@mrwanny
Wanny.Morellato@sap.com
#I am Hiring
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "3
Agenda
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "4
The Why
MTTRHealth Scale
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "5
The What
ReadsReads + Writes
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "6
The What
Reads + WritesReads
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "7
The How
Change
Tracking
Kafka
Connect
Kafka
Topic
Kafka
Streams
Micro
Service
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "8
MSSQL Change Tracking
SELECT CT.user_id,
U.uuid user_uuid,

U.is_active is_active,
CT.SYS_CHANGE_VERSION,
CASE CT.SYS_CHANGE_OPERATION
WHEN 'I' THEN 'UserCreated'
WHEN 'U' THEN 'UserUpdated'
WHEN 'D' THEN 'UserDeleted'
END
CT.SYS_CHANGE_COLUMNS
FROM CHANGETABLE( CHANGES [dbo]. [users], @last_version )
AS CT
LEFT OUTER JOIN [dbo].[users] AS U WITH (NOLOCK)
ON CT.user_id = U.user_id
WHERE CT.SYS_CHANGE_VERSION < @max_version
ORDER BY CT.SYS_CHANGE_VERSION
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "9
Kafka Connect
public class MssqlSourceTask extends SourceTask {
@Override
public List<SourceRecord> poll() {
ResultSet result = stmt.executeQuery();
return convert(result);
}
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "10
Kafka Topic
• One Topic per Table
• Partition Size aligns to the Table change rate
• Consistent Hashing partitioning based on a Table unique key
• Replication Factor : 3
• Min InSync Replica : 2
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "11
Kafka KSQL
CREATE TABLE users
(user_id VARCHAR,
user_uuid VARCHAR,
is_active BOOLEAN,
. . . )
WITH (KAFKA_TOPIC='users',
VALUE_FORMAT='JSON',
KEY = ‘user_uuid')
WHERE is_active = 'true' ;
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "12
Kafka Stream
Topology topology = new Topology();
topologyBuilder
.addSource("SOURCE", stringDeserializer, deserializer, getTopic())
.addProcessor("FILTER",getFilter(),"SOURCE")
.addProcessor("PROCESSOR", getWebhookProcessor(), "FILTER")
.addSink(“SINK",getDeadLetterTopic(),serializer,"PROCESSOR");
StreamsConfig config = new StreamsConfig(env.getStreamProperties());
KafkaStreams streaming = new KafkaStreams(topology, config);
streaming.start();
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "13
Summary
Change
Tracking
Kafka
Connect
Kafka
Topic
Kafka
Streams
Micro
Service
Thank You.
Contact information:
Wanny Morellato
Director of Engineering
SAP Concur
@mrwanny
Wanny.Morellato@sap.com
© 2018 SAP SE or an SAP affiliate company. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP
SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or
any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation,
and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason
without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.
Learn more at concur.com
Follow all of SAP Concur

More Related Content

PDF
Using Kafka in Your Organization with Real-Time User Insights for a Customer ...
PDF
Stopping the Lake from becoming a Swamp
PDF
Life is a Stream of Events
PPTX
Big Data as Competitive Advantage in Financial Services
PPTX
Lessons From Integrating Machine Learning into Data Products | Wrangle Confer...
PPTX
The role of Big Data and Modern Data Management in Driving a Customer 360 fro...
PPTX
Become an IT Service Broker
PPTX
Analyst Webinar: Doing a 180 on Customer 360
Using Kafka in Your Organization with Real-Time User Insights for a Customer ...
Stopping the Lake from becoming a Swamp
Life is a Stream of Events
Big Data as Competitive Advantage in Financial Services
Lessons From Integrating Machine Learning into Data Products | Wrangle Confer...
The role of Big Data and Modern Data Management in Driving a Customer 360 fro...
Become an IT Service Broker
Analyst Webinar: Doing a 180 on Customer 360

What's hot (20)

PPTX
Turning Petabytes of Data into Profit with Hadoop for the World’s Biggest Ret...
PPTX
MicroStrategy on Amazon Web Services (AWS) Cloud
 
PDF
Flash session -goldengate--lht1053-lon
PDF
Bank Struggles Along the Way for the Holy Grail of Personalization: Customer 360
PDF
How a Media Data Platform Drives Real-time Insights & Analytics using Apache ...
PPTX
Foundational Strategies for Trusted Data: Getting Your Data to the Cloud
PDF
Big Data Paris - A Modern Enterprise Architecture
PPTX
Big Data Analytics: Reference Architectures and Case Studies by Serhiy Haziye...
PDF
The Manulife Journey
PDF
Big Data, Big Thinking: Untapped Opportunities
PDF
Customer Event Hub – a modern Customer 360° view with DataStax Enterprise (DSE)
PPTX
2020 Cloudera Data Impact Awards Finalists
PDF
Fast Data for Competitive Advantage: 4 Steps to Expand your Window of Opportu...
PPTX
How to get Real-Time Value from your IoT Data - Datastax
PDF
The Power Of Snowflake for SAP BusinessObjects
PPTX
ML Infra @ Spotify: Lessons Learned - Romain Yon - NYC ML Meetup
PDF
Big Data Governance in Hadoop Environments with Cloudera Navigatorfeb2017meetu
PDF
Making the most of your Snowflake Investment
PDF
#GeodeSummit: Architecting Data-Driven, Smarter Cloud Native Apps with Real-T...
PDF
#GeodeSummit - Using Geode as Operational Data Services for Real Time Mobile ...
Turning Petabytes of Data into Profit with Hadoop for the World’s Biggest Ret...
MicroStrategy on Amazon Web Services (AWS) Cloud
 
Flash session -goldengate--lht1053-lon
Bank Struggles Along the Way for the Holy Grail of Personalization: Customer 360
How a Media Data Platform Drives Real-time Insights & Analytics using Apache ...
Foundational Strategies for Trusted Data: Getting Your Data to the Cloud
Big Data Paris - A Modern Enterprise Architecture
Big Data Analytics: Reference Architectures and Case Studies by Serhiy Haziye...
The Manulife Journey
Big Data, Big Thinking: Untapped Opportunities
Customer Event Hub – a modern Customer 360° view with DataStax Enterprise (DSE)
2020 Cloudera Data Impact Awards Finalists
Fast Data for Competitive Advantage: 4 Steps to Expand your Window of Opportu...
How to get Real-Time Value from your IoT Data - Datastax
The Power Of Snowflake for SAP BusinessObjects
ML Infra @ Spotify: Lessons Learned - Romain Yon - NYC ML Meetup
Big Data Governance in Hadoop Environments with Cloudera Navigatorfeb2017meetu
Making the most of your Snowflake Investment
#GeodeSummit: Architecting Data-Driven, Smarter Cloud Native Apps with Real-T...
#GeodeSummit - Using Geode as Operational Data Services for Real Time Mobile ...
Ad

Similar to Breaking Down a SQL Monolith with Change Tracking, Kafka and KStreams/KSQL (20)

PDF
データベースMeetup Vol3
PDF
SAP HANA SPS09 - Full-text Search
PDF
SAP Analytics Overview and Strategy
PDF
SAP analytics as enabler for the intelligent enterprise (Iver van de Zand)
PDF
SAP HANA SPS09 - SQLScript
PDF
SAP Cloud Platform x Microsoft Graph
PDF
SAP HANA SPS09 - SAP River
PDF
Dmm212 – Sap Hana Graph Processing
PPTX
HANA SPS07 Smart Data Access
PDF
#askSAP Analytics Innovations Community Call: Reimagine Analytics for the Dig...
PDF
SAP Lambda Architecture Point of View
PDF
02_SAP_S4HANA_Value_Roadmap_Next_Generation_Suite2.pdf
PDF
SAP HANA Cloud Platform - The big picture
PDF
Unleash_PA_on_HANA
PPTX
SAP HANA Adoption Press Briefing Japan (Paul Marriott @pmmarriott, Paul Young)
PDF
#asksap Analytics Innovations Community Call: SAP BW/4HANA - the Big Data War...
PDF
C13,C33,A35 アプリケーション開発プラットフォームとしてのSAP HANA by Makoto Sugishita
PPTX
Microservices without PaaS is like Bavaria without Beer
PDF
Supplier Integration to Ariba Network: Cloud Integration Gateway
PDF
Dmm300 – mixed scenarios for sap hana data warehousing and BW: overview and e...
データベースMeetup Vol3
SAP HANA SPS09 - Full-text Search
SAP Analytics Overview and Strategy
SAP analytics as enabler for the intelligent enterprise (Iver van de Zand)
SAP HANA SPS09 - SQLScript
SAP Cloud Platform x Microsoft Graph
SAP HANA SPS09 - SAP River
Dmm212 – Sap Hana Graph Processing
HANA SPS07 Smart Data Access
#askSAP Analytics Innovations Community Call: Reimagine Analytics for the Dig...
SAP Lambda Architecture Point of View
02_SAP_S4HANA_Value_Roadmap_Next_Generation_Suite2.pdf
SAP HANA Cloud Platform - The big picture
Unleash_PA_on_HANA
SAP HANA Adoption Press Briefing Japan (Paul Marriott @pmmarriott, Paul Young)
#asksap Analytics Innovations Community Call: SAP BW/4HANA - the Big Data War...
C13,C33,A35 アプリケーション開発プラットフォームとしてのSAP HANA by Makoto Sugishita
Microservices without PaaS is like Bavaria without Beer
Supplier Integration to Ariba Network: Cloud Integration Gateway
Dmm300 – mixed scenarios for sap hana data warehousing and BW: overview and e...
Ad

More from confluent (20)

PDF
Stream Processing Handson Workshop - Flink SQL Hands-on Workshop (Korean)
PPTX
Webinar Think Right - Shift Left - 19-03-2025.pptx
PDF
Migration, backup and restore made easy using Kannika
PDF
Five Things You Need to Know About Data Streaming in 2025
PDF
Data in Motion Tour Seoul 2024 - Keynote
PDF
Data in Motion Tour Seoul 2024 - Roadmap Demo
PDF
From Stream to Screen: Real-Time Data Streaming to Web Frontends with Conflue...
PDF
Confluent per il settore FSI: Accelerare l'Innovazione con il Data Streaming...
PDF
Data in Motion Tour 2024 Riyadh, Saudi Arabia
PDF
Build a Real-Time Decision Support Application for Financial Market Traders w...
PDF
Strumenti e Strategie di Stream Governance con Confluent Platform
PDF
Compose Gen-AI Apps With Real-Time Data - In Minutes, Not Weeks
PDF
Building Real-Time Gen AI Applications with SingleStore and Confluent
PDF
Unlocking value with event-driven architecture by Confluent
PDF
Il Data Streaming per un’AI real-time di nuova generazione
PDF
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
PDF
Break data silos with real-time connectivity using Confluent Cloud Connectors
PDF
Building API data products on top of your real-time data infrastructure
PDF
Speed Wins: From Kafka to APIs in Minutes
PDF
Evolving Data Governance for the Real-time Streaming and AI Era
Stream Processing Handson Workshop - Flink SQL Hands-on Workshop (Korean)
Webinar Think Right - Shift Left - 19-03-2025.pptx
Migration, backup and restore made easy using Kannika
Five Things You Need to Know About Data Streaming in 2025
Data in Motion Tour Seoul 2024 - Keynote
Data in Motion Tour Seoul 2024 - Roadmap Demo
From Stream to Screen: Real-Time Data Streaming to Web Frontends with Conflue...
Confluent per il settore FSI: Accelerare l'Innovazione con il Data Streaming...
Data in Motion Tour 2024 Riyadh, Saudi Arabia
Build a Real-Time Decision Support Application for Financial Market Traders w...
Strumenti e Strategie di Stream Governance con Confluent Platform
Compose Gen-AI Apps With Real-Time Data - In Minutes, Not Weeks
Building Real-Time Gen AI Applications with SingleStore and Confluent
Unlocking value with event-driven architecture by Confluent
Il Data Streaming per un’AI real-time di nuova generazione
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
Break data silos with real-time connectivity using Confluent Cloud Connectors
Building API data products on top of your real-time data infrastructure
Speed Wins: From Kafka to APIs in Minutes
Evolving Data Governance for the Real-time Streaming and AI Era

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Cloud computing and distributed systems.
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Machine learning based COVID-19 study performance prediction
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Empathic Computing: Creating Shared Understanding
PDF
cuic standard and advanced reporting.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Review of recent advances in non-invasive hemoglobin estimation
Cloud computing and distributed systems.
Network Security Unit 5.pdf for BCA BBA.
NewMind AI Weekly Chronicles - August'25 Week I
Dropbox Q2 2025 Financial Results & Investor Presentation
Machine learning based COVID-19 study performance prediction
The Rise and Fall of 3GPP – Time for a Sabbatical?
Reach Out and Touch Someone: Haptics and Empathic Computing
Chapter 3 Spatial Domain Image Processing.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Encapsulation_ Review paper, used for researhc scholars
Programs and apps: productivity, graphics, security and other tools
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Empathic Computing: Creating Shared Understanding
cuic standard and advanced reporting.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

Breaking Down a SQL Monolith with Change Tracking, Kafka and KStreams/KSQL

  • 1. Wanny Morellato, SAP Concur
 Director of Engineering
 October 16, 2018 Breaking Down A SQL Monolith
 with Change Tracking, Kafka and KStreams / KSQL
  • 2. NOTE: Delete the yellow stickers when finished. Samples of a title slide with a pictogram are also available in this template. See SAP Image Library for other available images you can sort using the drop down menu and selecting illustration options. Wanny Morellato
 Director of Engineering @ SAP Concur @mrwanny Wanny.Morellato@sap.com #I am Hiring
  • 3. © 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "3 Agenda
  • 4. © 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "4 The Why MTTRHealth Scale
  • 5. © 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "5 The What ReadsReads + Writes
  • 6. © 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "6 The What Reads + WritesReads
  • 7. © 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "7 The How Change Tracking Kafka Connect Kafka Topic Kafka Streams Micro Service
  • 8. © 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "8 MSSQL Change Tracking SELECT CT.user_id, U.uuid user_uuid,
 U.is_active is_active, CT.SYS_CHANGE_VERSION, CASE CT.SYS_CHANGE_OPERATION WHEN 'I' THEN 'UserCreated' WHEN 'U' THEN 'UserUpdated' WHEN 'D' THEN 'UserDeleted' END CT.SYS_CHANGE_COLUMNS FROM CHANGETABLE( CHANGES [dbo]. [users], @last_version ) AS CT LEFT OUTER JOIN [dbo].[users] AS U WITH (NOLOCK) ON CT.user_id = U.user_id WHERE CT.SYS_CHANGE_VERSION < @max_version ORDER BY CT.SYS_CHANGE_VERSION
  • 9. © 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "9 Kafka Connect public class MssqlSourceTask extends SourceTask { @Override public List<SourceRecord> poll() { ResultSet result = stmt.executeQuery(); return convert(result); }
  • 10. © 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "10 Kafka Topic • One Topic per Table • Partition Size aligns to the Table change rate • Consistent Hashing partitioning based on a Table unique key • Replication Factor : 3 • Min InSync Replica : 2
  • 11. © 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "11 Kafka KSQL CREATE TABLE users (user_id VARCHAR, user_uuid VARCHAR, is_active BOOLEAN, . . . ) WITH (KAFKA_TOPIC='users', VALUE_FORMAT='JSON', KEY = ‘user_uuid') WHERE is_active = 'true' ;
  • 12. © 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "12 Kafka Stream Topology topology = new Topology(); topologyBuilder .addSource("SOURCE", stringDeserializer, deserializer, getTopic()) .addProcessor("FILTER",getFilter(),"SOURCE") .addProcessor("PROCESSOR", getWebhookProcessor(), "FILTER") .addSink(“SINK",getDeadLetterTopic(),serializer,"PROCESSOR"); StreamsConfig config = new StreamsConfig(env.getStreamProperties()); KafkaStreams streaming = new KafkaStreams(topology, config); streaming.start();
  • 13. © 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ "13 Summary Change Tracking Kafka Connect Kafka Topic Kafka Streams Micro Service
  • 14. Thank You. Contact information: Wanny Morellato Director of Engineering SAP Concur @mrwanny Wanny.Morellato@sap.com
  • 15. © 2018 SAP SE or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they should not be relied upon in making purchasing decisions. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names mentioned are the trademarks of their respective companies. See www.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices. Learn more at concur.com Follow all of SAP Concur