<?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 Jaziel Flores on Medium]]></title>
        <description><![CDATA[Stories by Jaziel Flores on Medium]]></description>
        <link>https://medium.com/@jazzesfm?source=rss-ae77b3d06717------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*iktp0g_J-rWi8QYisqERng@2x.jpeg</url>
            <title>Stories by Jaziel Flores on Medium</title>
            <link>https://medium.com/@jazzesfm?source=rss-ae77b3d06717------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 17:03:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jazzesfm/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[From Data Hell to Data Heaven: How I Built an App That Actually Works.]]></title>
            <link>https://medium.com/@jazzesfm/from-data-hell-to-data-heaven-how-i-built-an-app-that-actually-works-0e16cac48877?source=rss-ae77b3d06717------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e16cac48877</guid>
            <category><![CDATA[dataiku]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[dash]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Jaziel Flores]]></dc:creator>
            <pubDate>Fri, 09 Aug 2024 04:59:20 GMT</pubDate>
            <atom:updated>2024-08-09T20:14:37.005Z</atom:updated>
            <content:encoded><![CDATA[<p>So, our organization just got its hands on this shiny new tool called Dataiku. It’s supposed to be the ultimate solution for data management, machine learning, and everything in between. Naturally, the first question was: “What the heck are we going to do with it?” That’s where I come in. My mission? To find a use case for Dataiku that would make everyone wonder how we ever survived without it.</p><p>But I wasn’t going to settle for just any old project. Nope. I decided to tackle one of the biggest data nightmares in our organization: rows upon rows of messy data, buried in Excel sheets so ugly they could be considered a form of digital torture. My goal? To turn this chaos into a sleek, secure, and user-friendly app that would make our lives easier — and, of course, make Dataiku look like the hero it is.</p><h4>The Problem: Data, Excel Sheets, and Nightmares</h4><p>Let’s be real for a second. Data is messy. Like, “trying to untangle your headphones after they’ve been in your pocket” messy. And what was I working with? Excel sheets. Yes, those godforsaken Excel sheets that haunt the dreams of anyone who’s ever had to deal with them. Broken formulas, version control by email chains, and manual data entry that made me question every life choice that led me to this moment.</p><p>But the real kicker? I had to make this data not just accessible, but also secure, automated, and ready for some serious analysis. No pressure, right?</p><h4>The Solution: Building an App with Dash, Dataiku, and a Dash of Sanity</h4><p>Enter Dash, the Python framework that promised to rescue me from the data abyss. If you’ve never heard of Dash, just imagine IKEA but for apps. You get a bunch of pieces, you follow the instructions, and if you’re lucky, you end up with something that doesn’t collapse when you use it.</p><p>But wait, there’s more! I also brought Dataiku into the mix. Dataiku is like that friend who always has the best shortcuts. It handles data processing, automates ETL, and even dabbles in Machine Learning. Basically, it’s the MVP of this whole operation.</p><p>So, I built the frontend with Dash — because, let’s be honest, who doesn’t love a good interactive interface? Meanwhile, Dataiku took care of the backend, making sure all the data was processed, cleaned, and ready to go. And the best part? No more ugly Excel sheets or manual copy-pasting.</p><h4>Why Dataiku? Because Sometimes You Need a Superhero</h4><p>So why did I decide to use Dataiku? Well, let’s put it this way: if Dataiku were a person, it’d be the superhero of data management. We’re talking about a tool that can handle everything from basic data wrangling to complex machine learning workflows — all without breaking a sweat. But before I start sounding like an infomercial, let’s break down the pros and cons.</p><h4>Pros of Using Dataiku</h4><ul><li><strong>All-in-One Platform</strong>: Dataiku is like that Swiss Army knife you always wished you had. It handles data integration, preparation, analysis, machine learning, and even deployment — all in one place. No more juggling five different tools to get the job done.</li><li><strong>Automation Galore</strong>: Remember those tedious, repetitive tasks that made you want to scream? Dataiku automates them. From ETL processes to model training, once it’s set up, you can just sit back and watch the magic happen. It’s like having a robot butler for your data.</li><li><strong>Scalability</strong>: Whether you’re working with a small dataset or terabytes of data, Dataiku scales like a champ. You don’t have to worry about the platform crashing just because you decided to analyze a few billion rows.</li><li><strong>User-Friendly Interface</strong>: For all its power, Dataiku’s interface is surprisingly easy to use. Drag-and-drop functionality, pre-built recipes, and a visual workflow designer mean you don’t have to be a coding wizard to get things done. (But if you are, there’s plenty of room for custom code too.)</li><li><strong>Collaboration</strong>: Dataiku is like that friend who always brings people together. It allows teams to collaborate easily, share insights, and work on projects simultaneously without stepping on each other’s toes. No more emailing Excel files back and forth!</li></ul><h4>Cons of Using Dataiku</h4><p>But hey, nothing’s perfect. Even Dataiku has its downsides.</p><ul><li><strong>Cost</strong>: Let’s face it, Dataiku isn’t cheap. It’s the Ferrari of data platforms, and it comes with a price tag to match. If you’re working on a tight budget, this might be a dealbreaker.</li><li><strong>Learning Curve</strong>: While Dataiku is user-friendly, there’s still a learning curve, especially if you’re new to data science or machine learning. It’s like getting a new video game — you’ll need to spend some time figuring out the controls before you can start crushing it.</li><li><strong>Overkill for Simple Projects</strong>: If you’re just cleaning up a small dataset or doing some basic analysis, Dataiku might be overkill. It’s like bringing a bazooka to a knife fight — sure, it gets the job done, but it’s probably more than you need.</li><li><strong>Dependence on the Platform</strong>: Once you start using Dataiku, you might find yourself getting a little too comfortable. It’s easy to become dependent on the platform’s features and workflows, which could be a problem if you ever need to switch to a different tool.</li></ul><h4>Why I Went with Dataiku Anyway</h4><p>So, with all that in mind, why did I still choose Dataiku? Simple: because it made my life a lot easier. When you’re dealing with massive amounts of data, complex ETL processes, and machine learning models, you need a tool that can handle it all without giving you a headache. Dataiku did that for me — and more.</p><p>Sure, it’s not the cheapest option out there, but the time and frustration it saved me made it worth every penny. Plus, the scalability means I can reuse this app for other projects down the line, so I’m really getting my money’s worth.</p><p>And let’s not forget the automation. I mean, who doesn’t love setting something up once and then letting it run on autopilot? It’s like having a personal assistant who never needs coffee breaks and never complains about overtime.</p><h4>The Architecture: Turning Chaos into Calm</h4><p>The architecture of this app is like a swan: it looks calm and collected on the surface, but underneath, there’s a lot of frantic paddling going on. The backend, powered by Dataiku, did all the heavy lifting — automating ETL processes, running Machine Learning models, and generally making sure the data was as clean as my grandma’s kitchen. Meanwhile, the frontend, built with Dash, made it all look effortless.</p><p>And here’s the kicker: I didn’t just build this app for one-off use. Nope. This baby is designed to be modular and reusable, so the next time someone hands me a mess of data and says, “Fix it,” I can just smile and say, “I got this.”</p><h4>Automating the ETL Process: Bye-Bye Excel, Hello Automation</h4><p>Remember those Excel sheets I mentioned? The ones that made me question my life choices? Yeah, they’re gone now, thanks to this app.</p><p><strong><em>Here’s How We Did It:</em></strong></p><p><strong>Extract</strong>: The app pulls in data from various sources automatically. No more downloading files, no more copy-pasting. Just pure, automated bliss.</p><p><strong>Transform</strong>: Dataiku handles all the transformations — cleaning, normalizing, joining data — you name it. And guess what? Not a single broken Excel formula in sight.</p><p><strong>Load</strong>: Finally, the data is loaded wherever it needs to go. Whether it’s a database, a data warehouse, or even the cloud, it’s all handled automatically.</p><p>So, while everyone else is still wrangling with Excel, I’m sitting back and letting the app do the work. It’s like having a personal assistant who doesn’t need coffee breaks.</p><h4>Integrating with Machine Learning: Because Why Not?</h4><p>But wait, it gets better. This app isn’t just about data processing. It’s also set up to handle Machine Learning. That’s right — while you’re still figuring out why your Excel pivot table won’t update, this app is running predictions, analyzing data, and maybe even taking over the world (just kidding… I hope).</p><p><strong>How It Works:</strong></p><ul><li><strong>Model Training</strong>: The app automatically kicks off training processes in Dataiku. It’s like having a personal trainer for your data, whipping it into shape without you lifting a finger.</li><li><strong>Prediction and Analysis</strong>: Once the model is trained, it’s applied to new data in real-time. Need a prediction? Done. Need analysis? Done. And all without a single Excel macro.</li><li><strong>Continuous Learning</strong>: The app keeps learning and improving over time. Unlike those Excel sheets that just keep breaking, this app actually gets better the more you use it.</li></ul><p><strong>The Classes Behind the Magic</strong></p><p>Now, let’s talk about the code — because, let’s be honest, that’s where the real magic happens.</p><p><strong>The AppCallbacks Class</strong></p><p>This class is like the ringleader of a circus, keeping all the parts of the app working together without dropping a single ball.</p><pre>from dataclasses import dataclass<br>from dash import Input, Output, State<br>from dash.exceptions import PreventUpdate<br><br>@dataclass<br>class AppCallbacks:<br>. app: dash.Dash<br>. layout_manager: &#39;LayoutManager&#39;<br>. dataiku_manager: &#39;DataikuManager&#39;<br>. def register_callbacks(self) -&gt; None:<br>. @self.app.callback(<br>. Output(&#39;root-url&#39;, &#39;data&#39;),<br>. Input(&#39;url&#39;, &#39;pathname&#39;)<br>. )<br>. def update_root_url(/service/url: str) -&gt; str:<br>. # Here&#39;s where the root URL gets set dynamically<br>. return url</pre><ul><li>**`__init__`** (handled by `dataclass`): This is where the magic begins, setting up the app with everything it needs to work.</li><li>- **`register_callbacks`**: This is the ringmaster, telling the app when to do what, like updating the URL when the user navigates.</li></ul><p>What’s really cool about using `<strong>dataclasses</strong>` is that they streamline the whole process of setting up classes in Python. They automatically generate special methods like `__init__`, `__repr__`, and `__eq__`, which means less boilerplate code for me and more time to focus on the fun stuff — like making sure the app doesn’t crash five minutes before the big demo.</p><h4>The LayoutManager Class</h4><p>This class makes sure everything looks good — like the set designer for a movie, ensuring that everything is exactly where it needs to be.</p><p>```python</p><p>from dataclasses import dataclass</p><p>from dash import html, dcc</p><p>@dataclass</p><p>class LayoutManager:</p><p>. def make_home_layout(self) -&gt; html.Div:</p><p>. return html.Div([</p><p>. html.H1(“Welcome to the Data Management App”),</p><p>. dcc.Link(“Go to Data Page”, href=’/data’)</p><p>. ])</p><p>. def create_nav_bar(self) -&gt; html.Nav:</p><p>. return html.Nav([</p><p>. dcc.Link(“Home”, href=’/’),</p><p>. dcc.Link(“Data”, href=’/data’)</p><p>. ])</p><p>```</p><ul><li><strong>make_home_layout</strong>: This method makes sure the home page looks good. It’s like the welcome mat for your data.</li><li><strong>create_nav_bar</strong>: This method builds a navigation bar, making sure you don’t get lost in the app.</li></ul><p>With <strong>dataclasses</strong>, the LayoutManager class becomes easier to maintain and more readable. Plus, it’s reusable! If someone asks me to whip up another app, I can just plug in this layout manager and be halfway done.</p><h4><strong>The DataikuManager Class</strong></h4><p>Finally, let’s talk about the <strong>DataikuManager</strong> class — the unsung hero of this app. It handles all the heavy lifting with Dataiku, from managing variables to running scenarios, and it does it all without breaking a sweat.</p><ul><li><strong>Scalability</strong>: This class can handle large datasets and complex workflows without breaking a sweat.</li><li><strong>Reusability</strong>: Designed to be modular, so you can reuse it for different projects without tearing your hair out.</li><li><strong>Flexibility</strong>: Centralizes data management in Dataiku, making it easy to extend or integrate with other systems.</li></ul><p>```python</p><p>from dataclasses import dataclass</p><p>import dataiku</p><p>@dataclass</p><p>class DataikuManager:</p><p>. project_key: str</p><p>. def get_project_variables(self) -&gt; dict:</p><p>. project = dataiku.api_client().get_project(self.project_key)</p><p>. return project.get_variables()</p><p>. def update_project_variables(self, variables: dict) -&gt; None:</p><p>. project = dataiku.api_client().get_project(self.project_key)</p><p>. project.set_variables(variables)</p><p>. def get_managed_folder_list(self) -&gt; list:</p><p>. project = dataiku.api_client().get_project(self.project_key)</p><p>. return project.list_managed_folders()</p><p>. def upload_files_to_folder(self, folder_id: str, files: list) -&gt; None:</p><p>. folder = dataiku.Folder(folder_id)</p><p>. for file in files:</p><p>. with folder.get_writer(file[‘filename’]) as writer:</p><p>. writer.write(file[‘contents’])</p><p>. def run_ml_scenario(self, scenario_name: str) -&gt; None:</p><p>. project = dataiku.api_client().get_project(self.project_key)</p><p>. scenario = project.get_scenario(scenario_name)</p><p>. scenario.run_and_wait()</p><p>```</p><h4>Best Practices in My Code: Keeping It Clean and Reusable</h4><p>So, what makes this code tick? Let’s talk best practices — because if you’re going to dive into code, you might as well do it right.</p><ol><li>*Modularity**: Each class in this app has a specific responsibility. `AppCallbacks` manages the app’s callbacks, `LayoutManager` handles the layout, and `DataikuManager` deals with all things Dataiku. This separation of concerns makes the code easier to maintain and extend. If something breaks (and let’s be real, something always breaks), you know exactly where to look.</li></ol><p>2. **Reusability**: By keeping the code modular and using `dataclasses`, I’ve made sure that this app isn’t a one-trick pony. Need to build another app with similar functionality? Just tweak a few parameters, and you’re good to go. This isn’t just a data management app — it’s a framework you can build on.</p><p>3. **Static Typing**: Notice how the functions have type annotations like `str`, `list`, and `None`? Static typing isn’t just for show — it helps catch bugs early by making sure you’re passing the right kinds of data around. It’s like having a safety net that catches you before you fall into a pit of runtime errors.</p><p>4. **Use of `dataclasses`**: `dataclasses` are a Pythonic way to reduce boilerplate code and keep things clean. By using `dataclasses`, I’ve eliminated the need for manually writing the `__init__` method in every class, which keeps the codebase lean and readable. Plus, it adds that extra bit of elegance — because who doesn’t want elegant code?</p><p>5. **Design Patterns**: The Observer pattern used in this app is key to keeping the UI responsive. Whenever data changes or a user interacts with the app, the Observer pattern ensures that the necessary updates happen automatically. This means users get real-time feedback, which is crucial in a data-driven application.</p><p>### Why the Observer Pattern?</p><p>The Observer pattern is like having a friend who’s always watching your back. Whenever something important happens, they let you know right away. In the context of this app, it’s used to keep the user interface responsive and in sync with the underlying data.</p><h4>Advantages of the Observer Pattern:</h4><ul><li>**Reactiveness**: Ensures that the UI is always up-to-date, providing a smooth and intuitive user experience.</li><li>- **Decoupling**: The pattern promotes loose coupling between the components, making the system easier to maintain and extend.</li><li>- **Scalability**: It can handle a growing number of observers without significantly increasing the complexity of the code.</li></ul><p>In this app, the Observer pattern works alongside the Polling pattern (which checks for updates at regular intervals) to ensure that users are always in the loop, whether they’re uploading files, running a machine learning scenario, or just navigating through the app.</p><h4>Final Thoughts: Dataiku — Friend or Foe?</h4><p>At the end of the day, Dataiku is a powerful tool that can make your data management life a whole lot easier — if you’re willing to invest the time and money. It’s not for everyone, but if you’re dealing with complex projects and need a platform that can handle everything from ETL to machine learning, it’s definitely worth considering.</p><p>Would I recommend it? Absolutely. But just be prepared for a bit of a learning curve, and maybe a few late nights figuring out how to get the most out of it. Trust me, it’ll be worth it.</p><h4>Conclusion: Lessons Learned (And Why I’m Never Going Back to Excel)</h4><p>So, what did I learn from this whole experience? First off, that there’s no going back to Excel. Once you’ve automated your ETL processes and integrated machine learning into your workflow, manually updating spreadsheets feels like trying to drive a car with square wheels.</p><p>But more than that, I learned that with the right tools — like Dash and Dataiku — you can turn even the messiest, most overwhelming data projects into something streamlined and manageable. It might take a little time, a little patience, and a lot of coffee, but in the end, it’s totally worth it.</p><p>And hey, if you ever find yourself staring down a pile of messy data, just remember: there’s an app for that. And if there isn’t, well, now you know how to build one.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e16cac48877" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>