Coding: Long number divisible by 8

Starting a new series here. When applying to a Software Engineer or Data Engineer role it's a standard to have a live or asynchronous coding interview. Most of the challenges you will need to crack don't reflect the day to day work you will do but are a great way to assess you problem solving skills and coding style.

As I believe most of these exercises are great puzzles and fun to solve I will start bringing my own version of some of these. Who knows if one of these days you won't be asked to solve it.

This time I am bringing you the classic divisible by 8 problem.

In this exercise you are asked to check if a long number can de divisible without using the division remainder of a number (Eg: IF number % 8 == 0 THEN True ELSE False ) and if by permuting any number you can obtain a number that is divisible by 8.

Continue reading “Coding: Long number divisible by 8”

Apply SHA-3 to MySQL Dataset with pysha3

SHA-3, a subset of the cryptographic primitive family Keccak is a cryptographic hash function, designed to be very efficient in hardware but is relatively slow in software. SHA-3 takes about double the time compared to SHA-2 to run in software and about a quarter of the time to run in hardware.

Continue reading “Apply SHA-3 to MySQL Dataset with pysha3”

Star Schema 101

For all of you joining the world of analytic’s, I would like to share a small tutorial on star schema that you can use to optimize your analytic queries and data storage in databases. Although its one of the most used dimensional modelling techniques I would like to reenforce that this data organization architecture is not just for data warehousing as you can use it as a reference model to create for example powerpivot models based in excel files, that will be this way faster and more optimized.

Continue reading “Star Schema 101”

BI Concepts and Topics to Explore

“The beginning of wisdom is a definition of terms” 

There are days in which I decide to surf the web on a quest for new knowledge, typically I start by “googling” for some topic and let my will guide me trough the articles/books I find interesting. Of course this can be useful sometimes but others I end up depressed with the amount of new topics, concepts and architectures I find in the Business intelligence field.

This way I would like to share with you guys some of my latest finds and invite to research more on these as they can most probably affect the way we see and build a Data warehouse:

Continue reading “BI Concepts and Topics to Explore”

Download My SSIS eBook for Free [US-EN]

I have been the author of this book which was written for Syncfusion, to increase their offer on the Succinctly series.

Capture

SSIS Succinctly

SQL Server Integration Services is part of Microsoft’s business intelligence suite and an ETL (extract, transform, and load) tool. It does more than just move data between databases. It can be used to clean and transform data so that it can be used by data warehouses or even OLAP-based systems. With SSIS Succinctly by Rui Machado, you will learn how to build and deploy your own ETL solution in a drag-and-drop development environment by using SSIS packages, control flows, data flows, tasks, and more.

Continue reading “Download My SSIS eBook for Free [US-EN]”

Download My PowerShell eBook for Free [US-EN]

I have been the author of this book which was written for Syncfusion, to increase their offer on the Succinctly series. Two more books are on stack to be released so wait for more news in the following weeks.

Capture

PowerShell Succinctly highlights some of the PowerShell programming model’s many benefits, specifically for .NET developers and system administrators. Author Rui Machado guides readers through time-saving methods that simplify code testing by eliminating the need to create a new application in Visual Studio. Also included are tips for using additional services, such as PowerGui, WMI, and SQL Server, to get the most out of PowerShell. Even if you don’t already use scripting languages to manage your machines, PowerShell Succinctly will show you just how easy it is to automate activities, work with databases, and interact with a variety of file types with this useful model.

Continue reading “Download My PowerShell eBook for Free [US-EN]”

DW TIP: Get next or previous value with SQL Analytic Function [EN-US; PLSQL]

While querying our databases we might face a typical problema which is getting the next or the previous value of an atribute according to some rule applyed to a certain dataset. This happens more if you deal with datawarehouses and need to retrieve this kind of analytical information. The typical solutions involve several “group by” and sub queries to achieve the same result. This way SQL has a powerful feature  which are the Analytical functions.

Analytic functions compute an aggregate value based on a group of rows. They differ from aggregate functions in that they return multiple rows for each group. The group of rows is called a window and is defined by the analytic_clause. For each row, a sliding window of rows is defined. The window determines the range of rows used to perform the calculations for the current row. Window sizes can be based on either a physical number of rows or a logical interval such as time.

Continue reading “DW TIP: Get next or previous value with SQL Analytic Function [EN-US; PLSQL]”

Social Media Marketing KPI’s

As you know companies use Key Performance Indicators (KPIs) to monitor its performance according to the objectives they define. If the value expected for a period is lower that the current one your KPI for that value is going well, otherwise you should take actions to correct whatever is going wrong.

Although commonly used in Business Intelligence, these same KPIs can be used to analyze the performance of you company in many different contexts. Lets take a look for instance ate the Social Media Marketing or as I have been hearing more often Marketing Intelligence. In this context you want to analyze how is your company performing in social media channels and compare your results with the ones of your competitors. To do so I have been investigating how can you gather data regarding your competitors and how you can analyze it.

Continue reading “Social Media Marketing KPI’s”

Why do managers need data analysis?

Nowadays I often see managers talking about Business Intelligence, Data mining and big data like the best thing in the world, and when they open their laptops, they still manage companies in their excel sheets and refer to big data as an excel file with 10MB and Business Intelligence as being creating charts with lots of colors. When I look at them and hear their strategies for information management in their companies I imagine a blind person trying to solve the rubiks cube. 

Continue reading “Why do managers need data analysis?”

Enable Change Data Capture (SQL Server 2008+)

Along with Slow Changing Dimensions, the Change Data Capture is one of the most important mechanisms to handle changes. While Slow Changing Dimensions define how you want to treat changes in you Dimensions attributes, Change Data Capture allows you to define how you want to handle the extraction of changed records from the source systems.

As you can imagine, the extraction of data from operational sources is very important in Extract, Transform and Load operations using Integration Services or any other provider and this is because you do not want to process all the data again when you run your packages, you just want to process the records that had suffered changes (inserted, Updated and Deleted). If you schedule the execution of you ETL process every day at 2 in the morning for the processing of a four year operational system database, you don´t want to process the data from those four years, you just want to process the records that have changed since the last night, this way your ETL process will be faster and much more efficient.

Continue reading “Enable Change Data Capture (SQL Server 2008+)”