{"id":91,"date":"2023-01-31T12:45:34","date_gmt":"2023-01-31T05:45:34","guid":{"rendered":"https:\/\/thoaicoder.com\/?p=91"},"modified":"2024-01-07T22:55:38","modified_gmt":"2024-01-07T15:55:38","slug":"etl-using-spring-batch","status":"publish","type":"post","link":"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/","title":{"rendered":"ETL using Spring batch"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>1. Data Warehouse basic concept<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A data warehouse is a system that aggregates data from different sources into a single, central, consistent data store to support data analysis, data mining, artificial intelligence (AI), and machine learning. <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"892\" height=\"501\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/04\/data-warehouse-16526930738282040535659-0-0-501-892-crop-1652693129709611691454.webp\" alt=\"\" class=\"wp-image-303\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/04\/data-warehouse-16526930738282040535659-0-0-501-892-crop-1652693129709611691454.webp 892w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/04\/data-warehouse-16526930738282040535659-0-0-501-892-crop-1652693129709611691454-300x168.webp 300w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/04\/data-warehouse-16526930738282040535659-0-0-501-892-crop-1652693129709611691454-768x431.webp 768w\" sizes=\"auto, (max-width: 892px) 100vw, 892px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Imagine an E-commerce platform such as Amazon, which can perform approximately one million transactions a day or 30 million transactions a month. As a business operator, you may need to know how many items of each product have been sold in a month. We will quickly think about using SQL queries to implement this report something like:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-tangaroa-background-color has-text-color has-background\" style=\"padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)\"><code>select p.name, count(1) \nfrom transaction t\njoin product p on t.product_id = p.id\nwhere t.month = 'April' \ngroup by t.product_id;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">But with the increase in the data size and individuals using the data to perform various analyses, this query becomes extremely slow in query processing even if we create an index for the <strong>&#8220;<em>transaction.month<\/em>&#8220;<\/strong> column.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Additionally, the result of this query is historical data that will not be changed or very very rarely changed (unless there was a mistake when creating a transaction, hence we have to update it). Consequently, why do we need to execute the above query every time the business operator requests the report? Instead of doing this, we can execute this query once and store the result in a data source named data warehouse, this technique is ETL.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. ETL introduction<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">ETL stands for <strong>Extract, Transform, Load<\/strong>. It is a data integration process that involves retrieving data from multiple sources, transforming that data to fit the target system&#8217;s requirements, and loading the data into a data warehouse. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"832\" height=\"268\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/04\/image.png\" alt=\"\" class=\"wp-image-312\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/04\/image.png 832w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/04\/image-300x97.png 300w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/04\/image-768x247.png 768w\" sizes=\"auto, (max-width: 832px) 100vw, 832px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The goal of ETL is to consolidate data from different sources into a single, central location for analysis and reporting. This process typically involves the use of ETL tools that can automate the extraction, transformation, and loading of data, and ensure the accuracy and consistency of the final result. ETL is crucial in data warehousing, business intelligence, and analytics.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some popular Python ETL frameworks are Apache Airflow, Apache Beam, Bonobo, Luigi, Bubbles, PySpark, and Spring Batch. These frameworks provide a way to build workflows and pipelines that move and transform data, while also providing monitoring, scheduling, and error-handling capabilities.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. <strong>Implementation<\/strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We will create a sample project (which can be found&nbsp;<a href=\"https:\/\/github.com\/ThoaiNguyenHuu842\/etl-with-springbatch\">over on Github<\/a>) to demonstrate how ETL works with Spring Batch. &nbsp;Spring Batch is designed specifically for automating and simplifying batch processing and can handle data processing, mapping, conversion, and aggregation. It can work with various data sources, including databases, flat files, and XML files, and provides built-in support for parallel and distributed processing. Additionally, Spring Batch provides monitoring, and scheduling to make ETL processes more robust and maintainable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This project is about demonstrating a basic concept of ETL so I try to reduce the complexity as much as possible. In reality, the ETL process is more complicated for example we may need a staging database &#8211; an intermediate storage area used for data processing during ETL or extracting data from multiple databases (even from 3rd systems via API calls).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3.1. <strong>Prerequisites<\/strong><\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Docker<\/li>\n\n\n\n<li>Java 11<\/li>\n\n\n\n<li>Gradle<\/li>\n\n\n\n<li>Spring boot<\/li>\n\n\n\n<li>Flyway<\/li>\n\n\n\n<li>Spring batch<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3.2. <strong>Database design<\/strong><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this same project, we will create two very simple databases: <strong>nht_transactional<\/strong> &#8211; a transaction database storing product transactions, and <strong>nht_datawarehouse<\/strong> a warehouse storing ETL results:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>nht_transaction.product<\/strong>: store product data with 18 sample records<\/li>\n\n\n\n<li><strong>nht_transaction.transaction<\/strong>: store transaction of products with 1000 sample records<\/li>\n\n\n\n<li><strong>nht_warehouse.fact_transaction_product_monthly<\/strong>: store the total quantity of each product monthly which will be used to generate the report.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"677\" height=\"232\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/05\/image-1.png\" alt=\"\" class=\"wp-image-318\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/05\/image-1.png 677w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/05\/image-1-300x103.png 300w\" sizes=\"auto, (max-width: 677px) 100vw, 677px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Flyway will be used to create these tables and sample data when starting the Spring boot application.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3.3. ETL process<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We use a Rest API to trigger the ETL process for a specific month for example:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-tangaroa-background-color has-text-color has-background\" style=\"padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\"><code>curl --location --request POST 'localhost:8080\/etl?year=2022&amp;month=4'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The ETL process requires the&nbsp;<strong>year<\/strong>&nbsp;and&nbsp;<strong>month<\/strong>&nbsp;parameters inputted from the above Rest API and includes three steps: extract, transform, and load. Each step is implemented as a corresponding service in <strong>src.main.service<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"449\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/05\/image-3-1024x449.png\" alt=\"\" class=\"wp-image-326\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/05\/image-3-1024x449.png 1024w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/05\/image-3-300x132.png 300w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/05\/image-3-768x337.png 768w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/05\/image-3-1536x674.png 1536w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/05\/image-3.png 1579w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">3.3.1. Extract<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">This stage extracts all products that need to be reported by extending <strong>org.springframework.batch.item.data.RepositoryItemReader<\/strong> and use the &#8220;ProductRepository&#8221; with &#8220;findAll&#8221; supported by Spring Data. <\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-tangaroa-background-color has-text-color has-background\" style=\"padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)\"><code>@Component\n@Slf4j\npublic class TransactionProductMonthlyExtractor extends RepositoryItemReader&lt;Product&gt; {\n\n  public TransactionProductMonthlyExtractor(@Autowired ProductRepository productRepository) {\n    this.setRepository(productRepository);\n    this.setMethodName(\"findAll\");\n    Map&lt;String, Direction&gt; sorts = new HashMap&lt;&gt;();\n    sorts.put(\"id\", Direction.ASC);\n    this.setSort(sorts);\n  }\n\n  @Override\n  protected Product doRead() throws Exception {\n    log.info(\"TransactionProductMonthlyExtractor::doRead\");\n    return super.doRead();\n  }\n}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3.3.2. Transform<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">In this stage, the product data is transformed and consolidated for creating fact_transaction_product_monthly. We get &#8220;year&#8221; and &#8220;month&#8221; from the ETL parameters and then load the total quantity by month of each product via a native SQL query.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-tangaroa-background-color has-text-color has-background\" style=\"padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)\"><code>public interface TransactionRepository extends JpaRepository&lt;Transaction, BigInteger&gt; {\n  @Query(nativeQuery = true, value = \"SELECT COALESCE(SUM(t.quantity),0) \" +\n                                     \"FROM transaction t \" +\n                                     \"WHERE t.product_id = :productId AND YEAR(t.created_date) = :year AND MONTH(t.created_date) = :month\")\n  Integer getTotalQuantity(@Param(\"productId\") Integer productId, @Param(\"year\") Integer year, @Param(\"month\") Integer month);\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-white-color has-tangaroa-background-color has-text-color has-background\" style=\"padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)\"><code>public class TransactionProductMonthlyTransformer implements ItemProcessor&lt;Product, FactTransactionProductMonthly&gt; {\n\n  @Value(\"#{jobParameters&#91;'year']}\")\n  private int year;\n\n  @Value(\"#{jobParameters&#91;'month']}\")\n  private int month;\n\n  private final TransactionRepository transactionRepository;\n\n  @Override\n  public FactTransactionProductMonthly process(Product product) {\n    log.info(\"TransactionProductMonthlyTransformer::process\");\n    return FactTransactionProductMonthly.builder()\n      .productId(product.getId())\n      .productName(product.getName())\n      .month(month)\n      .year(year)\n      .totalQuantity(transactionRepository.getTotalQuantity(product.getId(), year, month))\n      .build();\n  }\n}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3.3.3. Load<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, we will move the transformed data into the data warehouse.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-tangaroa-background-color has-text-color has-background\" style=\"padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)\"><code>public class TransactionProductMonthlyLoader implements ItemWriter&lt;FactTransactionProductMonthly&gt; {\n\n  private final FactTransactionProductMonthlyRepository factTransactionProductMonthlyRepository;\n\n  @Override\n  public void write(List&lt;? extends FactTransactionProductMonthly&gt; items) throws Exception {\n    log.info(\"TransactionProductMonthlyLoader::write\");\n    factTransactionProductMonthlyRepository.saveAll(items);\n  }\n}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3.3.4. ETL configuration<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<code>@EnableBatchProcessing<\/code>&nbsp;annotation enables Spring Batch features and provides a base configuration for setting up batch jobs with the defined ETL services above.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-tangaroa-background-color has-text-color has-background\" style=\"padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)\"><code>@Configuration\n@EnableBatchProcessing\npublic class BatchConfig {\n  @Value(\"${spring.batch.chunk-size}\")\n  private Integer chunkSize;\n\n  @Bean(\"transactionProductMonthlyJob\")\n  public Job transactionProductMonthlyJob(JobBuilderFactory jobBuilderFactory, Step transactionProductMonthlySteps,\n    TransactionProductCompletionListener transactionProductCompletionListener) {\n    return jobBuilderFactory\n      .get(\"transactionProductMonthlyJob\")\n      .incrementer(new RunIdIncrementer())\n      .listener(transactionProductCompletionListener)\n      .flow(transactionProductMonthlySteps)\n      .end()\n      .build();\n  }\n\n\n  @Bean(\"transactionProductMonthlySteps\")\n  public Step transactionProductMonthlySteps(StepBuilderFactory stepBuilderFactory, TransactionProductMonthlyExtractor reader,\n    TransactionProductMonthlyTransformer transformer, TransactionProductMonthlyLoader loader) {\n    return stepBuilderFactory\n      .get(\"transactionProductMonthlySteps\").&lt;Product, FactTransactionProductMonthly>chunk(chunkSize)\n      .reader(reader)\n      .processor(transformer)\n      .writer(loader)\n      .build();\n  }\n}\n\npublic class TransactionProductMonthlyLoader implements ItemWriter&lt;FactTransactionProductMonthly> {\n\n  private final FactTransactionProductMonthlyRepository factTransactionProductMonthlyRepository;\n\n  @Override\n  public void write(List&lt;? extends FactTransactionProductMonthly> items) throws Exception {\n    log.info(\"TransactionProductMonthlyLoader::write\");\n    factTransactionProductMonthlyRepository.saveAll(items);\n  }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Since we are using Spring batch with <strong>chunk-oriented processing<\/strong> approach (the other approach is <strong>tasklet-based<\/strong>). This approach reads the data sequentially and creates \u201cchunks\u201d that will be written out within a transaction boundary. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each individual product is read by <code><strong>ItemReader<\/strong><\/code>, then handed to an&nbsp;<code><strong>ItemProcessor<\/strong><\/code>, and aggregated. Once the number of items read equals the commit interval, the entire chunk is written out via <code><strong>ItemWriter<\/strong><\/code>, and finally, the transaction is committed. A chunk-oriented step can be configured via <strong>spring.batch.chunk-size<\/strong>, the process of each chunk is as below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"907\" height=\"541\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/05\/image-4.png\" alt=\"\" class=\"wp-image-332\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/05\/image-4.png 907w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/05\/image-4-300x179.png 300w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/05\/image-4-768x458.png 768w\" sizes=\"auto, (max-width: 907px) 100vw, 907px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can refer to <a href=\"https:\/\/docs.spring.io\/spring-batch\/docs\/current\/reference\/html\/step.html\">Spring official document<\/a> to understand more about Spring Batch configuration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this article, we&#8217;ve seen a basic example of an ETL data pipeline using Spring Batch.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Most noteworthy, we saw the configurations of an application starter, created an ETL stream pipeline using the Spring Batch, and implemented services to get data from MySQL for our reading, transforming, and writing data to the warehouse. The example code can be found on <a href=\"https:\/\/github.com\/ThoaiNguyenHuu842\/etl-with-springbatch\">GitHub<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Data Warehouse basic concept A data warehouse is a system that aggregates data from [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":142,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[42,30,40,41],"class_list":["post-91","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-big-data","tag-data-warehouse","tag-docker","tag-etl","tag-spring-batch"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.14 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>ETL using Spring batch - I \u2764 Code<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ETL using Spring batch - I \u2764 Code\" \/>\n<meta property=\"og:description\" content=\"1. Data Warehouse basic concept A data warehouse is a system that aggregates data from [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/\" \/>\n<meta property=\"og:site_name\" content=\"I \u2764 Code\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-31T05:45:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-07T15:55:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/01\/2023-02-08-23_27_33-ETL-vs-ELT_-Key-Differences-Side-by-Side-Comparisons-Use-Cases.png\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"385\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Thoai\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Thoai\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/\"},\"author\":{\"name\":\"Thoai\",\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720\"},\"headline\":\"ETL using Spring batch\",\"datePublished\":\"2023-01-31T05:45:34+00:00\",\"dateModified\":\"2024-01-07T15:55:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/\"},\"wordCount\":914,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720\"},\"keywords\":[\"Data warehouse\",\"Docker\",\"ETL\",\"Spring Batch\"],\"articleSection\":[\"Big data\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/\",\"url\":\"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/\",\"name\":\"ETL using Spring batch - I \u2764 Code\",\"isPartOf\":{\"@id\":\"https:\/\/thoaicoder.com\/#website\"},\"datePublished\":\"2023-01-31T05:45:34+00:00\",\"dateModified\":\"2024-01-07T15:55:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/thoaicoder.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ETL using Spring batch\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/thoaicoder.com\/#website\",\"url\":\"https:\/\/thoaicoder.com\/\",\"name\":\"I \u2764 Code\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/thoaicoder.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720\",\"name\":\"Thoai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/03\/photo_2023-01-05_22-53-32.jpg\",\"contentUrl\":\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/03\/photo_2023-01-05_22-53-32.jpg\",\"width\":640,\"height\":640,\"caption\":\"Thoai\"},\"logo\":{\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/thoaicoder.com\",\"https:\/\/www.linkedin.com\/in\/huu-thoai-nguyen\/\"],\"url\":\"https:\/\/thoaicoder.com\/index.php\/author\/admin_cvyxq4b8\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ETL using Spring batch - I \u2764 Code","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/","og_locale":"en_US","og_type":"article","og_title":"ETL using Spring batch - I \u2764 Code","og_description":"1. Data Warehouse basic concept A data warehouse is a system that aggregates data from [&hellip;]","og_url":"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/","og_site_name":"I \u2764 Code","article_published_time":"2023-01-31T05:45:34+00:00","article_modified_time":"2024-01-07T15:55:38+00:00","og_image":[{"width":750,"height":385,"url":"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/01\/2023-02-08-23_27_33-ETL-vs-ELT_-Key-Differences-Side-by-Side-Comparisons-Use-Cases.png","type":"image\/png"}],"author":"Thoai","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Thoai"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/#article","isPartOf":{"@id":"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/"},"author":{"name":"Thoai","@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720"},"headline":"ETL using Spring batch","datePublished":"2023-01-31T05:45:34+00:00","dateModified":"2024-01-07T15:55:38+00:00","mainEntityOfPage":{"@id":"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/"},"wordCount":914,"commentCount":0,"publisher":{"@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720"},"keywords":["Data warehouse","Docker","ETL","Spring Batch"],"articleSection":["Big data"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/","url":"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/","name":"ETL using Spring batch - I \u2764 Code","isPartOf":{"@id":"https:\/\/thoaicoder.com\/#website"},"datePublished":"2023-01-31T05:45:34+00:00","dateModified":"2024-01-07T15:55:38+00:00","breadcrumb":{"@id":"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/thoaicoder.com\/index.php\/2023\/01\/31\/etl-using-spring-batch\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thoaicoder.com\/"},{"@type":"ListItem","position":2,"name":"ETL using Spring batch"}]},{"@type":"WebSite","@id":"https:\/\/thoaicoder.com\/#website","url":"https:\/\/thoaicoder.com\/","name":"I \u2764 Code","description":"","publisher":{"@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thoaicoder.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720","name":"Thoai","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/image\/","url":"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/03\/photo_2023-01-05_22-53-32.jpg","contentUrl":"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/03\/photo_2023-01-05_22-53-32.jpg","width":640,"height":640,"caption":"Thoai"},"logo":{"@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/thoaicoder.com","https:\/\/www.linkedin.com\/in\/huu-thoai-nguyen\/"],"url":"https:\/\/thoaicoder.com\/index.php\/author\/admin_cvyxq4b8\/"}]}},"_links":{"self":[{"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/posts\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/comments?post=91"}],"version-history":[{"count":17,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/posts\/91\/revisions"}],"predecessor-version":[{"id":369,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/posts\/91\/revisions\/369"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/media\/142"}],"wp:attachment":[{"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/media?parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/categories?post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/tags?post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}