Tuesday, April 26, 2022

Data Blending in Tableau

 How the data blending works in Tableau?

When you use data blending to combine data, a query is sent to the database for each data source that is used on the sheet. The results of the queries, including the aggregated data, are sent back to and combined by Tableau. The view uses all rows from the primary data source, the left table, and the aggregated rows from the secondary data source, the right table, based on the dimension of the linking fields.

Data Blending

1-when the dataset is from a different data source

2-Uses only left join.

3-Data can be available at different levels of granularity.

4-Sends separate queries to each dataset, aggregates, and then perform blending


Tableau Public Link:


https://public.tableau.com/app/profile/arabinda.mohapatra/viz/BLENDING_16509621767950/definitation?publish=yes




Relationship in Tableau

 Relationships are a dynamic, flexible way to combine data from multiple tables for analysis. We recommend using relationships as your first approach to combining your data because it makes data preparation and analysis easier and more intuitive. 

-----------------------------------------------------------------------------------

Requirements for using relationships

When relating tables, the fields that define the relationships 
1 must have the same data type.
2-Changing the data type in the Data Source page does not change this requirement.
3- Tableau will still use the data type in the underlying database for queries.
4-You can't define relationships based on geographic fields.
5-Circular relationships aren't supported in the data model.
6-You can't define relationships between published data sources.
7-- Relationships do not allow us to decide on the join type.
8-In the earlier versions of Tableau, in the absence of a relationships, this task would have required data blending with multiple sources and would therefore be slow. Using relationships, we can do this in one datasource. Also, data blending is limited to a worksheet, but relationships are available for the entire workbook. Relationships will increase the performance of your dashboard

--------------------------------------------------------------


Here are some advantages to using relationships to combine tables:


1-Make your data source easier to define, change, and reuse.

2-Make it easier to analyze data across multiple tables at the correct level of detail (LOD).

3-Do not require the use of LOD expressions or LOD calculations for analysis at different levels of detail.

4-Only query data from tables with fields used in the current viz.

5-Are displayed as flexible noodles between logical tables

6-Require you to select matching fields between two logical tables

------------------------------------------------



1-Do not require you to select join types

2-Make all row and column data from related tables potentially available in the data source

3-Maintain each table's level of detail in the data source and during the analysis

4-Create independent domains at multiple levels of detail. 

5-Tables aren't merged together in the data source.

6-During analysis, create the appropriate joins automatically, based on the fields in use.

7-Do not duplicate aggregate values (when Performance Options are set to Many-to-Many)

8-Keep unmatched measure values (when Performance Options are set to Some Records Match)

9-Relationships are a dynamic, flexible way to combine data from multiple tables for analysis. We recommend using relationships as your first approach to combining your data because it makes data preparation and analysis easier and more intuitive. 

10--Do not duplicate aggregate values (when Performance Options are set to Many-to-Many)


11-Keep unmatched measure values (when Performance Options are set to Some Records Match)

12-Make your data source easier to define, change, and reuse.

-----------------------------------------------------------------------------------






Wednesday, April 20, 2022

Coding Challenge Part 2

 

Python program to find l.c.m. of two numbers


num1 = int(input("Enter first number: "))  
num2 = int(input("Enter second number: "))  
if num1 > num2:  
    greater = num1  
else:  
    greater = num2  
while(True):  
    if((greater % num1 == 0) and (greater % num2 == 0)):  
        lcm = greater  
        break  
    greater += 1  
print("LCM of",num1,"and",num2,"=",greater)

Python program to calculate the cube of a number



num=int(input("Enter the number:-"))
import math
cube_n=num*num*num
print("cube  OF {} is {} ".format(num,cube_n) )

Python program to calculate the square root of a number


num=int(input("Enter the number:-"))
if num<0:
    print("Negative numbers can't have square roots")
else:
    import math
    sqrt_n=math.sqrt(num)
    print("SQRT OF {} is {} ".format(num,sqrt_n) )


Python program to find the smallest number among

 three


num1=int(input("Enter the numbers"))
num2=int(input("Enter the numbers"))
num3=int(input("Enter the numbers"))

if num1<=num2 and num1<=num3:
    print("THe smallest number is",num1)
if num2<=num1 and num2<=num3:
    print("THe smallest number is",num2)
if num3<=num1 and num3<=num1:
    print("THe smallest number is",num3)


Python program to check given number is even or odd


num=int(input("Enter the number:"))
if num%2==0:
    print("EVEN NUMBERS",num)
else:
    print("ODD NUMBERS",num)




Wednesday, April 13, 2022

Python Coding Intreview question

 #Coding challenge 

Python program to reverse a number


n = int(input("please give a number : "))
print("before reverse your numeber is : ",n)
reverse = 0
while n!=0:
    reverse = reverse*10 + n%10       
    n = (n//10)
print("After reverse : %d" %reverse) 


Python program for palindrome using an iterative method


n=int(input("Enter a number: "))

reverse,temp=0,n

while temp!=0:
    reverse=reverse*10+temp%10
    temp=temp//10


if reverse==n:
    print("number is palindrom")
else:
    print("number is not palindrom")

Program to check a number is Armstrong or not in


num = int(input("please give a number : "))
if num!=0:
    input_number=[]
    res = [int(x) for x in str(num)]
    print(res)
    for i in res:
        input_number.append(i**3)
        result = 0
        for ele in range(0, len(input_number)):
            result = result + input_number[ele]
    if num==result:
        print("number is armstrong")
    else:
        print("number is not armstrong") 
            


    
else:
    print("Please enter a Number > 1")

check given number is prime or not


num = int(input("please give a number : "))

# define a flag variable
flag = False

# prime numbers are greater than 1
if num > 1:
    # check for factors
    for i in range(2, num):
        if (num % i) == 0:
            # if factor is found, set flag to True
            flag = True
            # break out of loop
            break

# check if flag is True
if flag:
    print(num, "is not a prime number")
else:
    print(num, "is a prime number")

Fibonacci series program in python using iterative method


first,second=0,1
n = int(input("please give a number for fibonacci series : "))
print("fibonacci series are : ")
for i in range(0,n):
    if i<=1:
        result=i
    else:
      result = first + second;
      first = second;
      second = result;
    print(result)


 

"🚀 Delta Lake's Vectorized Delete: The Secret to 10x Faster Data Operations!"

"🚀 Delta Lake's Vectorized Delete: The Secret to 10x Faster Data Operations!" Big news for data engineers! Delta Lake 2.0+ in...