<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by saracus consulting on Medium]]></title>
        <description><![CDATA[Stories by saracus consulting on Medium]]></description>
        <link>https://medium.com/@saracusblog?source=rss-fa1a37d01220------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UJhWao7hDMNgM-smc46KPA.jpeg</url>
            <title>Stories by saracus consulting on Medium</title>
            <link>https://medium.com/@saracusblog?source=rss-fa1a37d01220------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 20:14:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@saracusblog/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Choosing a Cloud Data Platform]]></title>
            <link>https://medium.com/@saracusblog/choosing-a-cloud-data-platform-71f426934550?source=rss-fa1a37d01220------2</link>
            <guid isPermaLink="false">https://medium.com/p/71f426934550</guid>
            <category><![CDATA[cloud-technology]]></category>
            <category><![CDATA[data-management]]></category>
            <category><![CDATA[data-integration]]></category>
            <dc:creator><![CDATA[saracus consulting]]></dc:creator>
            <pubDate>Thu, 16 Feb 2023 16:08:14 GMT</pubDate>
            <atom:updated>2023-02-16T16:08:14.175Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why move to the cloud at all?</h3><p>There are many valid reasons to move your current data storage to the cloud or to start working directly in the cloud for a new venture. This may be due to lower costs, better performance, more security, etc. However, today each of these aspects is advertised in superlatives by the various cloud providers, making it difficult to differentiate on paper. In addition, these are complex products, which means that selecting a cloud data platform is not a simple matter.</p><h3>Assumptions</h3><p>In this article, we assume that you have already made the decision that an on-premises solution is not right for your business (anymore) and that you now want to migrate to the cloud or move database operations to the cloud from scratch.</p><p>Furthermore, we assume that you have chosen an RDBMS (Relational Database Management System) and not another type of database system (NoSQL), which again brings its own special challenges.</p><h3>What types of cloud databases?</h3><p>A cloud database is not just a cloud database. There are different variants that involve different trade-offs in terms of cost, complexity, effort, performance, and so on. These need to be weighed against each other and a decision has to be made based on your own needs.</p><p>Cloud data management tools generally come in three different variants: self-managed, semi-managed and fully-managed.</p><p><strong>Self-managed</strong>: This variant of a cloud database usually runs in a virtual machine at a cloud provider and includes the installation of a known database provider. The virtual machine can be scaled according to the user’s own requirements and offers a great deal of flexibility. However, this also means that the administrative effort is high and the responsibility lies for the very most part with you. It is primarily abstracted from the underlying hardware.</p><p><strong>Semi-managed</strong>: A semi-managed cloud database still largely runs in a virtual machine at a cloud provider. However, this is to a large extent already managed by the provider. The provider also takes care of the installation of the database itself. However, the sizing of the cluster and the cost optimization are still up to you. The administrative effort is somewhat reduced.</p><p><strong>Fully-managed</strong>: A fully-managed DBaaS (Database as a Service) is a database that is completely managed by the provider. You as the customer no longer have any influence on sizing, scaling, etc.. As a result, you are also the least flexible, but also have the least effort in terms of administration. This is often reflected in the price, but this must always be considered holistically.</p><h3><strong>Defining the most important criteria for your company</strong></h3><p>First, answer the most important questions in the three categories below that will guide the selection of a suitable solution further down the line. The questions are not exhaustive and are intended primarily as food for thought. Your organization may have other individual criteria.</p><ol><li><strong>Who</strong> accesses the data?</li></ol><p>Is it primarily external or internal users?</p><p>Is access direct or via an application (website, app, etc.)?</p><p>Which functions are used by the users?</p><p>Is access at peak times all at once or spread throughout the day?</p><p>Is access primarily read, write, or both?</p><p>What does the behavior look like in the future? Will it change?</p><p>Will many more users be added or will the user base remain relatively stable?</p><p>2. What are the<strong> loads</strong>?</p><p>How large is the initial load?</p><p>How large are the regular deltas?</p><p>In what period of time does the delta load occur?</p><p>What is the maximum number of requests in parallel?</p><p>How are the requests distributed geographically?</p><p>How are the requests distributed in time?</p><p>How will the load change in the future?</p><p>3. What are the<strong> regulatory requirements</strong>?</p><p>What are the regulatory requirements?</p><p>What are the technical requirements?</p><p>What are the accessibility/scalability requirements?</p><p>What are the performance requirements?</p><p>What budget is available for initial migration?</p><p>What budget is available for operation?</p><p>What budget is available for customizations?</p><p>What other requirements are there from within the organization?</p><h3><strong>Comparison of different solutions</strong></h3><p>Based on the above questions and the various dimensions, the next step is to compare the various providers. First, a longlist of all potential providers should be drawn up, and then a shortlist of possible solutions should be created using the exclusion procedure.</p><p>Comparison services such as <strong>G2.com</strong> provide a good starting point for determining which platforms are suitable and how they should be classified at first glance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Qk_mqIEtpckX9PWB" /><figcaption>Example comparison of data warehouse systems — Source: <a href="https://www.g2.com/categories/data-warehouse">https://www.g2.com/categories/data-warehouse</a></figcaption></figure><p>The corresponding shortlist should then be used to coordinate discussions and demos in collaboration with the respective manufacturers. It is important to develop test cases based on the previously developed criteria and to benchmark them directly on the demo systems. This is the only way to ensure an objective comparison in the real world and with the actual relevant use cases.</p><p>The questions and weightings of the individual aspects must be determined by each company itself and applied to the respective providers.</p><p>The following points illustrate what differences there may be in detail among the providers:</p><ul><li>Exactly what kind of workloads are to take place? Are they analytical workloads with many aggregations or single row queries? This is where the offerings from different vendors differ greatly.</li><li>Does the vendor offer clusters / warehouses that can be shut down when not needed and can major costs be saved? If so, how realistic is it that the workloads can really be scaled back?</li><li>What are the costs of inbound and outbound network traffic? How much data is planned to be transferred and in what direction?</li><li>How fast can a provider really scale under different workloads? Experience has shown that there are big differences depending on the type of workload and the provider in question.</li></ul><h3><strong>Make decision</strong></h3><p>The results in terms of performance, costs, cluster size, etc. can then be evaluated in tabular form and weighted with points in terms of importance in your organization.</p><p>The decision as to which system will be used in the end can be made on the basis of the distribution of points. Particularly with regard to costs, it is always important to take a holistic view in terms of total cost of ownership.</p><h3><strong>Conclusion</strong></h3><p>The selection of a cloud data platform is a complex process with multiple dependencies and dimensions that need to be considered.</p><p>On the one hand, the behavior and quantity of future users must be estimated. On the other hand, it must be determined what the current and future loads will be in order to be able to provide solutions with adequate scalability. Finally, various constraints of a legal, organizational, technical, etc. nature must be considered. nature have to be included. Once all requirements have been used to create a shortlist, a benchmarking of the solutions under previously defined test cases follows. A decision can then be made based on the results and the total cost of ownership.</p><p>Author: Nils Tschampel</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71f426934550" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spark dataframe creation from semi-structured log data]]></title>
            <link>https://medium.com/@saracusblog/spark-dataframe-creation-from-semi-structured-log-data-50aae739d7fa?source=rss-fa1a37d01220------2</link>
            <guid isPermaLink="false">https://medium.com/p/50aae739d7fa</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[dataintegrationservices]]></category>
            <dc:creator><![CDATA[saracus consulting]]></dc:creator>
            <pubDate>Wed, 15 Feb 2023 14:48:19 GMT</pubDate>
            <atom:updated>2023-02-15T14:48:19.239Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Motivation</strong></h3><p>For most companies, log data (or log files) represent a significant data base for analysis, optimization and information gathering. They are ubiquitous because their generation is associated with the most fundamental operations of IT. Although this data is generated by almost all user actions and system actions, many companies still use log data almost exclusively for developing new code or correcting code on production systems.</p><p>Data from system processes, user actions or the monitoring of automations are often neglected and reduced to success messages. Yet it is precisely at these points that there is often potential for optimization.</p><p>As an example for interesting data one can consider log data of user interactions in a web service. From source data, user IDs, URLs, and times to various other identifiers, almost any amount of data can be extracted from each entry.</p><p>To make this data available to SQL databases, the biggest hurdle is often structuring the data, as log data often contains a number of different pieces of information, which can vary from entry to entry. It is precisely this problem that this paper aims to highlight, presenting a classic method for building a Spark dataframe.</p><p>The classic approach here is to first analyze the log data, i.e. its text structure, and then extract the data using the information obtained.</p><h3><strong>Prerequisites</strong></h3><p>First, it should be briefly described which prerequisites must be met in advance in order to be able to imitate this approach in its basic features. In addition to a functional Spark instance, the PySpark and RegExp libraries from Python are used.</p><p>As soon as the delivery route of the files and/or the storage directory were merged into the environment, the files can be made usable with classical Read commands (Spark.Read.Load(…)).</p><p>At this point, an analysis of the structure of the log data must first be performed in order to prepare the data for further processing. The structure of the data as well as its complexity can vary greatly — depending on the application reference. This information is needed to filter and clean the data with appropriate regular expressions.</p><p>The code that is to be used for extracting the data must also be distributed to the nodes (working units of Spark instances). To do this, the package must be included in the corresponding Spark instance.</p><p>It should also be said at this point that a corresponding amount of computing power is required for parallel processing of log files on different environments. In order to save memory, as few data frames as necessary should be set up.</p><h3>Methodology</h3><h4><strong>Delivery of the data</strong></h4><p>For the processing of the data, we assume at this point that the input data is passed in the form of a single-line entry in a Spark dataframe. This dataframe (DF) will serve as a placeholder for further processing.</p><p>At the beginning, a type check of the input data is performed, which is required for reading the data. After that check, the data is read out. This step can change depending on the form of the data and can be of different complexity. In the example below, the data is read row by row as a string in JSON format. Subsequently, it must be checked again whether the data frame is now filled or empty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*mMYJlsH6BoFHY3Jpw76wCQ.jpeg" /><figcaption>1. structure of the CSV file in the example (Single-Line JSON column, semistructured)</figcaption></figure><p>To avoid duplicates, a correction of the columns is now made and a mapping list is created in parallel. The goal is to turn [“usr”, “use”, “use”] into an object of the form [“usr”, “use_0”, “use_1”]. The corresponding mapping structure of the changed rows has the form {“use”: [“use_0”, “use_1”]}. New columns are now appended to the dataframe and the mapping table can be used to preserve the structure and remove multiple entries.</p><p>At this point, the times and dates can now be stored in specific formats. PySpark brings with the to_timestamp() and to_date() functions the possibility to pass predefined formats as strings.</p><h4><strong>Dataframe processing</strong></h4><p>Now, to further smooth the structure, the various columns must be checked for their data types. All columns that have the type array can be split using the explode-outer function of PySpark. For this, a list of array-valued columns can be created and for each element that is removed, a new select is done on the dataframe, selecting the scalar, remaining array-valued and new exploded columns.</p><p>After this step, the column names that contain a dot must be adjusted, since they use a notation (“ ‘a.B’”) that should not be output. For this purpose, only the non-nested rows are adjusted at first.</p><p>The penultimate step is to finally smooth the dataframe. For this, one can use a recursive function in a select, where a result list is either supplemented by the schema key if the element is not a StructType and does not belong to the keys of the mapping list defined above, or otherwise supplemented by a recursive function call.</p><p>Before the final output, all column names are now checked again for names with the dot notation and changed if necessary. This prevents that column names, which could not yet be changed due to their previously nested structure, are overlooked.</p><p>The result of the output is now the newly structured dataframe.</p><h3>Example analysis</h3><p>As described once above, log data from online users is used at this point. The application context of this example is a customer journey analysis, with which it is possible to find weak points in customer conversion for certain company campaigns. To do this, customers must first be clearly assigned to specific campaigns, which is possible via the call URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M4mMJsdHmk1xTzQnePB9Rg.jpeg" /><figcaption>2. real sample file of log data</figcaption></figure><p>This is done on the basis of log data, which is delivered via a data link in CSV format. In this CSV there is only one column of entries in JSON format.</p><p>So first, a dataframe is created as described above, loaded with the extracted data, and then customized with the rest of the code. The extraction part in this case consisted of:</p><blockquote>df_out = rdd.withColumn(column, _udf_logparse(col(column))) df_out = self._spark.read.json(df_out.rdd.map(lambda _: _[column]))</blockquote><p>After outputting the provisional dataframe, row-based filters must be applied to extract information from the stored URL entries.</p><p>For this purpose, a series of RegExp based expressions are written, using</p><blockquote>getvalue_udf = udf ( lambda column, url: get_value(column, url) )</blockquote><p>become functions that can be executed in the PySpark context at the row level. These functions can then examine the URL on each line for substrings and write them to a separate column. As before, care is taken to extend the old dataframe.</p><p>Before storing the data, a final select is then applied to the dataframe to extract the data relevant to each extraction, and the filtered data from the dataframe is written to the client’s analytical database using JDBC connector.</p><p>The code can be run in parallel for different sub-areas of the business.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hjRVp7Bq0gZPcukaedmMKw.jpeg" /><figcaption>3. example output of a create Spark dataframe</figcaption></figure><h3>What to remember</h3><p>So let’s briefly recap here what things we should keep in mind in the context of log data preparation. Extracting information from log data has long-term value for optimizing business processes and the customer experience. Simply put, the problems that arise consist of the interplay of two issues: The complexity of the strings and the mass of data. These result in high demands on resources and long runtimes, which can only be avoided through efficient programming. Explicit attention should be paid to the fact that data frames should be reused as far as possible, i.e. restructured or supplemented, in order to save RAM. Furthermore, the string search commands should be based exclusively on RegExp, since e.g. the classic find command is not sufficiently optimized to be suitable for larger data sets or line operations.</p><p>Author: Reiner Stubbemann</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50aae739d7fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Metadata: The Invisible Driver of Successful Data Warehouse Projects]]></title>
            <link>https://medium.com/@saracusblog/metadata-the-invisible-driver-of-successful-data-warehouse-projects-254429f02959?source=rss-fa1a37d01220------2</link>
            <guid isPermaLink="false">https://medium.com/p/254429f02959</guid>
            <category><![CDATA[data-management]]></category>
            <category><![CDATA[cloud-telephony-services]]></category>
            <dc:creator><![CDATA[saracus consulting]]></dc:creator>
            <pubDate>Wed, 15 Feb 2023 14:05:05 GMT</pubDate>
            <atom:updated>2023-02-15T14:05:05.418Z</atom:updated>
            <content:encoded><![CDATA[<p>Metadata is an often overlooked but indispensable component of data warehouses. They serve as a description of the structure and meaning of the data stored in the data warehouse and enable it to be better understood and used. In this blog post, we will take a closer look at the benefits and potential drawbacks of metadata in the data warehouse context and present an example of a minimally designed metadata construct that can be incrementally evolved. We will also discuss the role of metadata in the management of data warehouses and show how it can become an essential factor in the success of data warehouse projects.</p><h3><strong>Data warehouse metadata</strong></h3><p>In this article we will distinguish two different types of metadata: Static metadata and dynamic metadata. Static metadata describes the structure and meaning of data in the data warehouse and usually remains unchanged over time. Examples of static metadata are the names and data types of fields in a table or parameters of a generic process. Dynamic metadata, on the other hand, describes the current status or usage of data and can change more frequently. Examples of dynamic metadata include data that records when certain data was last processed or when a process was last executed.</p><h3><strong>Advantages of static metadata</strong></h3><p>To explain the various advantages of metadata in a bit more detail, let’s take another look at a few examples of static metadata and what advantages they bring:</p><ul><li><strong>Parameterization of processes</strong></li></ul><p>Parameterizing generic processes through metadata has several advantages. The biggest advantage is the reusability of these processes. For example, you can use one process for multiple source systems by passing source and target tables as parameters, instead of having to create a new process for each source system. Another advantage is the adaptability of the process, since one does not have to adapt the entire process, but only the metadata that controls the process. Also, future customizations that need to be made to the process or metadata are less costly because the code and parameters are kept separate.</p><ul><li><strong>Data element names</strong></li></ul><p>This metadata allows users to easily identify relationships between data in the data warehouse. This can contribute to a better understanding of the data. Another benefit is that by having a list of all the objects in a database, you can identify outliers. These outliers could indicate possible errors in the structure.</p><ul><li><strong>Metadata as reference data</strong></li></ul><p>Using metadata as reference data, such as a table that contains all the possible errors that could occur in that data warehouse, ensures consistency of the data and allows for centralized management of the data. This makes it easier to expand or update. The use of metadata can also improve data governance, as it is possible to track changes to the reference data using the metadata.</p><h3><strong>Advantages of dynamic metadata</strong></h3><p>Again, we’ll go over a few examples.</p><ul><li><strong>Logging of processes</strong></li></ul><p>There are several advantages to using metadata when logging processes. First, it can improve the traceability of processes by recording important information such as start and end times, durations, and results. In the event of problems, metadata can also help quickly identify and resolve the root cause by providing input parameters, error messages and logs. They can also help improve performance by providing process execution times that help optimize processes. Finally, metadata can help meet compliance requirements by providing a record of processes that can be used in audits.</p><ul><li><strong>Data quality metadata</strong></li></ul><p>Data quality metadata helps improve the quality of data by making it easier to identify and fix errors or problems. They help make better-informed decisions based on data, especially in industries where data quality is critical. They can also help improve efficiency by preventing time and resources from being wasted in processes based on flawed data.</p><ul><li><strong>Data Lineage Metadata</strong></li></ul><p>Data lineage metadata makes it possible to trace the origin of data over time. As such, they facilitate the quality and traceability of data and help identify errors or data quality issues. Depending on the organization, it may be required that the origin and use of data be tracked. This can also be guaranteed by data lineage metadata. Furthermore, data lineage metadata can help improve data governance and ensure that data is used consistently and correctly across the enterprise.</p><h3><strong>Metadata framework for a DWH</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/311/1*dLfVA5f3WwqJp5S0BE6Jhg.png" /><figcaption>Figure 1: Minimal example of a DWH metadata framework</figcaption></figure><p>A minimal example of a metadata framework, as shown in <strong>Figure 1</strong>, could include only the structural metadata for now. Such a framework is very easy to implement and may be suitable for smaller projects. With this metadata it is easier to keep an overview of the structure. In addition, the cooperation between different users and systems is simplified by a common basis for the naming of the objects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/311/1*gEozutY9ZMAJuwbgAdEzHA.jpeg" /><figcaption>Figure 2: Extended metadata framework</figcaption></figure><p>This framework can be well extended by requiring process and reference metadata in addition to structural metadata (<strong>Figure 2</strong>). The reference metadata helps to improve the quality of the data as well as the data governance by providing a centralized source for the reference data. Further, reference metadata can help improve decision making based on data by providing traceability of where data comes from and how it is used.</p><p>Process metadata can help improve the efficiency of data warehouse processes. They enable the use of generic processes that are driven by metadata. This reduces development effort and enables easy monitoring of performance indicators by logging information about when and how the data was processed. Finally, like structural metadata, both process and reference metadata can highlight the structure and meaning of the data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/311/1*-F-roxE9AMZJRb2K5JT53w.jpeg" /><figcaption>Figure 3: Metadata framework with all core metadata.</figcaption></figure><p>We can further extend the metadata construct (<strong>Figure 3)</strong> by, for example, adding more structural metadata related to infrastructure and data lineage. These would again lead to improved data governance and better traceability of the data.</p><p>There are many more metadata which we have not looked at in our example. However, it is important to be aware in advance of which metadata is relevant to your use case, as it can also introduce certain problems.</p><h3><strong>Potential disadvantages of metadata</strong></h3><p>As we saw in our example above, the complexity of metadata can grow quickly. Another major drawback is the effort required to create, manage, and maintain metadata. This can be especially burdensome when there are many different systems and data sources that need to be integrated. If this is not done consistently, there is a risk that when changes occur in the data, the metadata will become inconsistent or outdated. Finally, there is the issue of permissions on the metadata. On the one hand, permissions should be as limited as possible so that users and systems don’t have to deal with metadata from other systems. On the other hand, permissions must always be loose enough that no user is restricted in their work.</p><h3><strong>Conclusion</strong></h3><p>A well-implemented metadata framework can add tremendous value. It improves the usability and quality of the data, makes it easier to understand the system, and can save a lot of work by making processes reusable. However, one should also be aware of the potential risks caused by a poorly designed metadata framework or one that is not tailored to the specific data warehouse.</p><p>Author: Gioel Amalfitano</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=254429f02959" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>