<?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 DataFive on Medium]]></title>
        <description><![CDATA[Stories by DataFive on Medium]]></description>
        <link>https://medium.com/@datafive?source=rss-542a785e0be9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QofBiAU9BOFMtPuIiLMdog.png</url>
            <title>Stories by DataFive on Medium</title>
            <link>https://medium.com/@datafive?source=rss-542a785e0be9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 07:30:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@datafive/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[Hey, Coders — What’s your side project?]]></title>
            <link>https://medium.com/@datafive/hey-coders-whats-your-side-project-b879c66baa27?source=rss-542a785e0be9------2</link>
            <guid isPermaLink="false">https://medium.com/p/b879c66baa27</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[side-hustle]]></category>
            <category><![CDATA[side-project]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[DataFive]]></dc:creator>
            <pubDate>Tue, 18 Aug 2020 15:27:04 GMT</pubDate>
            <atom:updated>2020-08-20T19:59:20.572Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hey, Coders — What’s your side project?</h3><p>Why side projects can make you stand out from the crowd</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xzusfNy7onjX3_x-.jpg" /><figcaption>Learn. Something.</figcaption></figure><h3>Seriously — what’s your side project?</h3><p>What are you working on to better your craft? What are you working on that’s going to better your skills in the future. There’s 2 things that will open the most doors during your career. Your skill set. And your relationships. Building relationships can be hard enough for us tech nerds, so we’ll save that for another time. Today, focus on building your skill set.</p><h4>The ability to learn is your single most important skill</h4><p>The last couple years I’ve gotten to be on the interviewer side of quite a few interviews in an technical advisory capacity. My favorite question to ask is ‘What’s your side project? What are you learning at the moment?’ I’m amazed by the number of “I’d like to learn python, but no side projects at the moment.” or .. “I stay current by reading tech blogs.” That’s when I stop listening. Throw in the towel to that interview — they’re done.</p><h4>News flash — skimming tech blogs is not LEARNING!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*zbbX96BT2_Cmyse040RiXg.png" /></figure><p>Let’s be real, you’re not actually READING those tech blogs. Your skimming for some high level nuggets to stay up to date with the conversations at work. This is not learning. You may pick up a few nuggets or new features coming to your favorite product. But you are not bettering yourself as a professional.</p><p>The best way to learn is to simply start coding.</p><p>And the best way to simply start coding, is to get a side project.</p><h4>Learn for your future.</h4><p>Tech changes fast. This is not news. But in truth, the tech is becoming the easy part. There’s a gazillion dollars being poured into making technology easier and faster to code. The hard part is in the learning to stay relevant with the ever evolving technology.</p><p>The best skill that you can have is the ability to learn. Learning is a skill that needs to be practiced. And chances are you’re not practicing nearly enough at your day job. The vast majority of your time at your steady paycheck is probably spent on maintenance work and projects that you’ve done a million times and can code in your sleep. If you’re at a place long enough, you’ve either built the code yourself, or fixed enough bugs that make you wish you would have just re-written it from scratch. Either way you know where all the bodies are buried and will inevitability spend most of your day on maintenance work and status updates telling your PM why you haven’t completed your Jira story because last night’s batch process failed again for the 3rd time this week!</p><h4>The skills you need vs the skills your current employer needs.</h4><p>That story probably gives us a few laughs as it hits home to more than a few of us. But it also brings up a larger issue with your career arc.</p><p>The longer you stay at a company, the more skills you acquire that aren’t relevant in the market.</p><p>Do you think your next employer gives a crap that you know that you have to run this batch script before 3pm else you’ll create data issues in the expense log? Of course not.</p><p>Yes, you have a job to do. It’s your job to know all the goofy workings of the system you were hired to build/support. But don’t loose sight of your future either. Make sure your skill set is both relevant now and in 3 years from now.</p><p>And if you’re not improving those skills at your current job (key word, improving), then get a side project!</p><h4>OK, I get it — How do I get started</h4><p>There’s only one rule. It’s gotta be interesting to you. That’s it. That’s all that matters. Pick something that inspires you. Pick something that will get you showing off what you did to your peers. Pick something that will keep you wanting to work on it. It’s really that simple.</p><p>For my day job, I build a lot of demos and POC’s. We used to build these with “real world scenarios.” Sales forecasting. Supply chain analytics. It was boring as hell and engineers dreaded having to build these. So we made it more interesting and came up with projects that we actually wanted to work on. Now we play with sports data, board game data and beer consumption. There’s messages flying back and forth at 11pm on these projects. It’s a lot of fun.</p><p>Point is, find something fun. The learning is easy when you’re building something fun.</p><h4>Shortage of Skilled Engineers</h4><p>Finding applicants is often not hard. Finding <em>skilled</em> applicants is another story. This is not unique to data engineering, data science, business intelligence, cloud analytics, fill-in-the-blank job title. Don’t worry about the market. Figure out how to learn, invest the time in actually learning and coding, and you <em>will</em> be one of the few skilled applicants. The formula works.</p><h4>Find the time.</h4><p>Think of your learning in the same way as you think of funding your 401k. Should you investing be putting 30%? Sounds great, but you also have that mortgage payment, groceries to by and 2 kids in daycare and settle for 15%. But more importantly, you take it off the top before you see your check.</p><p>Same rule applies to your learning and side projects. You’re investing in your future. This should come off the top. Make it a priority. Schedule time during your day. Block your calendar. Get up early. Stay up late. Spend 3–5 on Friday’s when nobody is getting work done anyways. How you find the time doesn’t matter. It’s up to you. There’s enough blog posts on this topic to help with ideas. The key is to make this a priority during your normal weekly schedule and stick to it.</p><h4>Show off your work — have a story to tell.</h4><p>It’s easy to start projects. It’s really really hard to finish projects. Make “showing off your project” part of your goals of the side project and make it a goal from the beginning. Now you don’t need to create a phone app to polish the results, but at least keep your code in a state where you can log in and show it off.</p><p>Having the skill set is critical. But there is also a story telling aspect to your skill set. You need to be able to craft a story around the knowledge you hold. This should be part of your skill set building. How do convey the knowledge you’ve gained to others to establish yourself as an expert?</p><p>Keep dev notes on what the heck your are building.</p><p>Create a quick architecture diagram as a refresher or better yet to be able to refresh when you show it to others (check out excalidraw.com).</p><p>Create a visualization to show off your results (check out public.tableau.com).</p><p>Write up a blog post.</p><p>Whatever the method, just make sure you have a narrative ready to share. The best way to make a name for yourself is to be able to tell the story of the knowledge you hold.</p><h4>Have the answer.</h4><p>Now don’t leave this article thinking your have to write the next great javascript library and get 200 forks on github, or start the next Alteryx. But when the question inevitably is asked, “what’s your side project,” you better have an answer. Or better yet, something ready to show off.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b879c66baa27" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Snowflake Database — Time Travel is a Data Engineer’s Best Friend!]]></title>
            <link>https://medium.com/@datafive/snowflake-database-time-travel-is-a-data-engineers-best-friend-4378581e3517?source=rss-542a785e0be9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4378581e3517</guid>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[time-travel]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[DataFive]]></dc:creator>
            <pubDate>Wed, 12 Aug 2020 16:59:31 GMT</pubDate>
            <atom:updated>2020-08-12T16:59:31.887Z</atom:updated>
            <content:encoded><![CDATA[<h3>Snowflake Database — Time Travel is a Data Engineer’s Best Friend!</h3><p>Ya’ll ever screw something up in prod?</p><p>Probably a lot of swearing and many hours of getting your DBA to restore a point in time database to get you back up and running. We’ve all been there at some point.</p><p>Enter Snowflake Time Travel. Querying point in time data is easy and built in. Saves. So. Many. Headaches.</p><p>Snowflake is getting a lot of buzz in the data world right now. Rightfully so. Their technology has become the clear cloud data platform leader. Time Travel is one of the coolest and most useful features. Let’s dive in to see how this works.</p><p>First, some key Snowflake features that make this happen.</p><h3><strong><em>Storage Layer</em></strong></h3><p>Scale-able columnar, compressed &amp; encrypted micro data files stored in elastic &amp; scale-able cloud storage (AWS S3, Azure Blob Storage or GCP Cloud Storage). All data is immutable, meaning each change will result in new physical storage.</p><h3>Database Layer</h3><p>Logical representation of the storage layer. Gives the feel and functionality of a database while maintaining cloud scale. Even let’s us query with regular ‘ol SQL!</p><h3><strong>Meta Data Pointers</strong></h3><p>The link between the physical cloud storage and logical database layer. It’s a repository of meta data the captures point-in-time info of what a database object is. Think of this as behind the scenes “Type II” history on all data.</p><p>Clear as mud?</p><p>Let’s look at an visual to see how these pieces fit together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GXs2imsCtLFVKz5LGqm6PA.png" /><figcaption>Time Travel Plumbing</figcaption></figure><p>As various CRUD actions happen against the database, each new change becomes a new immutable block of data in the storage layer. The meta data pointers are updated to reflect the action so the logical database is represented corrected. The previous physical data is still stored and the timestamped record of what that data looked like historically is maintained in the meta data pointers repository.</p><p>These meta data pointers are really the secret sauce that brings this all together and allows for the platform to rebuild data objects at various points in time. Hopefully it’s becoming easy to picture what’s going on under the hood and how easy it is to go back in time is using these building blocks. NOTE: this also enables another great feature in “Zero Copy Cloning” — more on that in a future post.</p><h3>OK, enough theory — let’s dive into some code.</h3><h4>3 ways to query objects using Time Travel.</h4><ul><li>Time stamp — before a given point in time</li><li>Time offset — what it look like 5 minute ago</li><li>Specific Query — What it looked like before running query X (from History tab)</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/039e9fea01fca3f0725d600b125c370a/href">https://medium.com/media/039e9fea01fca3f0725d600b125c370a/href</a></iframe><h4>UNDROP</h4><p>This architecture also allows for UNDROP of objects!!</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/abb7222eab01c4de459db67b0046e653/href">https://medium.com/media/abb7222eab01c4de459db67b0046e653/href</a></iframe><h4>Point-in-time Database Clone</h4><p>Restore a objects at a certain point in time. Same 3 query methods available as described above (point-in-time, time offset, Query ID)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c2392217a2f0280f58a20183c74693d1/href">https://medium.com/media/c2392217a2f0280f58a20183c74693d1/href</a></iframe><h4>JOIN Current and Historical Data</h4><p>Because Time Travel is built right into normal SQL statements, it’s easy to join current and historical data within a single SQL statement.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9c7a267c6289bc1f39b8739128611f03/href">https://medium.com/media/9c7a267c6289bc1f39b8739128611f03/href</a></iframe><h3>Gotcha’s To Watch Out For</h3><p>OK — this is pretty cool! But there are a few things to watch for.</p><h4>DATA_RETENTION_TIME_IN_DAYS</h4><p>First thing to note is the data retention policy for Time Travel. Snowflake stores those immutable data blocks used for Time Travel based on the parameter “DATA_RETENTION_TIME_IN_DAYS”. Below is how to check that parameter as well as update it at various levels. The default value is only 1 day. So this parameter will need to be updated if more than 1 day of Time Travel is needed. Currently this can be set up to 90 days.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0bb5a2f7d29827b3ed19f6f67585499b/href">https://medium.com/media/0bb5a2f7d29827b3ed19f6f67585499b/href</a></iframe><h4>Storage Costs</h4><p>Of course nothing is free, so it is worth pointing out the additional storage costs. The higher the DATA_RETENTION_TIME_IN_DAYS parameter, the higher the storage costs. Especially in highly changing tables, there will be a noticable difference in storage as all the underlying deltas are stored.</p><p>With Snowflake, storage is generally the least expensive aspect and primarily a pass through from the underlying cloud provider. It’s also heavily compress meaning you get more for your money.</p><h4>View Definitions</h4><p>Time travel is for the underlying tables — it does not account for changes to view definitions. For example, if you query a view at a specific point-in-time, Snowflake will return historical data for all tables that make up the view. But if the view definition itself is changed, it will return <em>HISTORICAL</em> data for the <em>CURRENT</em> view definition.</p><h4>Dropping, Re-creating, and Re-naming Tables</h4><p>Be careful when dropping, re-creating and re-naming tables. The lineage of the time travel starts to get mercy when performing a lot of these tasks. The easiest way to navigate this is to CLONE the entire database at a given point and time and then use specific objects you need. Cloning the entire database will give what the entire database looked like at that point in time.</p><p>If more complex solutions are needed, check out the “Dropping and Restoring a Table Multiple Times” examples in the <a href="https://docs.snowflake.com/en/user-guide/data-time-travel.html">Snowflake docs</a>.</p><h4>Fail Safe</h4><p>In addition to Time Travel, “Fail Safe” is available for up to 7 days in which the data is not available for Time Travel queries, but it has not yet been deleted. This gives a buffer period. Snowflake support must be contacted to restore.</p><h4>Availability Across Table Types</h4><p>Important call out that the availability of Time Travel and Fail Safe. See table below and to understand what is possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XwXL4008_19Z3wDqRCFzKQ.png" /></figure><h3>Conclusion</h3><p>Hopefully the wheels are spinning with the possibilities around Time Travel. Definitely one of the most innovate features that puts Snowflake above the rest.</p><p>Data Five!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4378581e3517" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Snowflake — Resetting Identity Column Seed]]></title>
            <link>https://medium.com/@datafive/snowflake-resetting-identity-column-seed-4a332612b56b?source=rss-542a785e0be9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a332612b56b</guid>
            <category><![CDATA[auto-increment]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[DataFive]]></dc:creator>
            <pubDate>Thu, 28 May 2020 04:21:41 GMT</pubDate>
            <atom:updated>2020-07-01T18:28:56.071Z</atom:updated>
            <content:encoded><![CDATA[<h3>Snowflake — Resetting Identity Column Seed</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*BFYiceFkHHesadV4nmJqlQ.png" /></figure><h3><strong>What’s the prob, here?</strong></h3><p>Resetting or “reseeding” an identity column should be a trivial task for data engineers. You’ll most likely be wanting to reset your identity columns after a truncate (you know, to avoid the PK of 18758392758 after only day 27 of your nightly trunc and reloads) … and discover that Snowflake doesn’t actually reset that $%&amp;@ seed.</p><p>It’s worth calling out that Snowflake creates Autoincrement / Identity columns as sequences behind the scenes. However, they do not provide a way to modify or re-create that sequence to reseed it. So we’re left with some work arounds.</p><p>Hopefully this saves you a few hours of research.</p><h3><strong>What’s my options?</strong></h3><p>1.) <em>TRUNCATE your identity column. Live with your giant Snowflake identity surrogate key. Move on.</em></p><p>The snowflake equivalent to an integer column is a NUMBER(38,0). So 38 decimal places should allow plenty of growth. Just not ideal.</p><p>2.) <em>Use a </em><a href="https://docs.snowflake.com/en/sql-reference/sql/create-sequence.html"><em>sequence</em></a><em>.</em></p><p>Since an Identity column is just a sequence, the natural solution is to just create your own sequence with a naming convention of the table. Unlike the sequence that the Identity column creates, a user defined identity can (kinda) be reset .. with a little help of drop and recreate logic.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0547b1c0c20bb1a580655f1936685464/href">https://medium.com/media/0547b1c0c20bb1a580655f1936685464/href</a></iframe><p>There’s a big problem with this approach, however. The sequence that is tied to the table is hard coded to the database that it was created in. The problem this creates is when you clone your database to create other environments (ie. DEV_DEMO, TEST_DEMO, etc), the sequence is still tied to your original source database. Not ideal for maintaining multiple environments within your account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Er_4ZUv_4oP8vlO10xvIHw.png" /></figure><p>3.) <em>Recreate the table.</em></p><p>The best option is to ultimately recreate the table. Because foreign keys aren’t enforced in Snowflake, recreating your tables won’t cause annoying dependency issues.</p><p>What’s the catch?</p><p>Maintaining DDL scripts to create your tables after each truncate just isn’t realistic. And dynamic SQL isn’t yet available in Snowflake.</p><p>The solution is to create a generic “execute SQL” stored proc, and dynamically pass in the current DDL from the get_ddl function. This mimics dynamic SQL. Here’s the code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b32d57b5e909f492d8732e6d40acc7f7/href">https://medium.com/media/b32d57b5e909f492d8732e6d40acc7f7/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/999f91a12c8ea2935a0226ba4d91c8b7/href">https://medium.com/media/999f91a12c8ea2935a0226ba4d91c8b7/href</a></iframe><p>End code is easy and allows for safely cloning tables &amp; databases without dependencies on sequences across objects.</p><p>The one downside to this approach is re-creating a table requires you to re-create permissions associated with that table. You can generally get around this with using “ON FUTURE” for setting permissions. That way your permissions will automatically be re-mapping on a drop and re-create.</p><h3>Conclusion</h3><p>This was way too long for something that should be an easy task. Hopefully Snowflake fixes this soon.</p><p>Data Five!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a332612b56b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>