Persistent Systems
10+ Interview Questions and Answers
Q1. What is the best approach to finding whether the data frame is empty or not?
Use the len() function to check the length of the data frame.
Use len() function to get the number of rows in the data frame.
If the length is 0, then the data frame is empty.
Example: if len(df) == 0: print('Data frame is empty')
Q2. What is the difference between repartition and Coelsce?
Repartition increases or decreases the number of partitions in a DataFrame, while Coalesce only decreases the number of partitions.
Repartition can increase or decrease the number of partitions in a DataFrame, leading to a shuffle of data across the cluster.
Coalesce only decreases the number of partitions in a DataFrame without performing a full shuffle, making it more efficient than repartition.
Repartition is typically used when there is a need to increase the number of parti...read more
Q3. Two SQL Codes and Two Python codes like reverse a string ?
Reverse a string using SQL and Python codes.
In SQL, use the REVERSE function to reverse a string.
In Python, use slicing with a step of -1 to reverse a string.
Q4. How do you decide on cores and worker nodes?
Cores and worker nodes are decided based on the workload requirements and scalability needs of the data processing system.
Consider the size and complexity of the data being processed
Evaluate the processing speed and memory requirements of the tasks
Take into account the parallelism and concurrency needed for efficient data processing
Monitor the system performance and adjust cores and worker nodes as needed
Q5. Find top 5 countries with highest population in Spark and SQL
Use Spark and SQL to find the top 5 countries with the highest population.
Use Spark to load the data and perform data processing.
Use SQL queries to group by country and sum the population.
Order the results in descending order and limit to top 5.
Example: SELECT country, SUM(population) AS total_population FROM table_name GROUP BY country ORDER BY total_population DESC LIMIT 5
Q6. What is shuffling? How to Handle Shuffling?
Shuffling is the process of redistributing data across partitions in a distributed computing environment.
Shuffling is necessary when data needs to be grouped or aggregated across different partitions.
It can be handled efficiently by minimizing the amount of data being shuffled and optimizing the partitioning strategy.
Techniques like partitioning, combiners, and reducers can help reduce the amount of shuffling in MapReduce jobs.
Q7. What is a catalyst optimiser? How it works?
A catalyst optimizer is a query optimization tool used in Apache Spark to improve performance by generating an optimal query plan.
Catalyst optimizer is a rule-based query optimization framework in Apache Spark.
It leverages rules to transform the logical query plan into a more optimized physical plan.
The optimizer applies various optimization techniques like predicate pushdown, constant folding, and join reordering.
By optimizing the query plan, it reduces the overall execution...read more
Q8. How do you handle Incremental data?
Incremental data is handled by identifying new data since the last update and merging it with existing data.
Identify new data since last update
Merge new data with existing data
Update data warehouse or database with incremental changes
Q9. Using two tables find the different records for different joins
To find different records for different joins using two tables
Use the SQL query to perform different joins like INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN
Identify the key columns in both tables to join on
Select the columns from both tables and use WHERE clause to filter out the different records
Q10. What happens when we enforce schema ?
Enforcing schema ensures that data conforms to a predefined structure and rules.
Ensures data integrity by validating incoming data against predefined schema
Helps in maintaining consistency and accuracy of data
Prevents data corruption and errors in data processing
Can lead to rejection of data that does not adhere to the schema
Q11. How DAG handle Fault tolerance?
DAGs handle fault tolerance by rerunning failed tasks and maintaining task dependencies.
DAGs rerun failed tasks automatically to ensure completion.
DAGs maintain task dependencies to ensure proper sequencing.
DAGs can be configured to retry failed tasks a certain number of times before marking them as failed.
Q12. When we use ssis packages? Difference between union merge
SSIS packages are used for ETL processes in SQL Server. Union combines datasets vertically, while merge combines them horizontally.
SSIS packages are used for Extract, Transform, Load (ETL) processes in SQL Server.
Union in SSIS combines datasets vertically, stacking rows on top of each other.
Merge in SSIS combines datasets horizontally, matching rows based on specified columns.
Union All in SSIS combines datasets vertically without removing duplicates.
Merge Join in SSIS combine...read more
Q13. What is SCD ??
SCD stands for Slowly Changing Dimension, a concept in data warehousing to track changes in data over time.
SCD is used to maintain historical data in a data warehouse.
There are three types of SCD - Type 1, Type 2, and Type 3.
Type 1 SCD overwrites old data with new data.
Type 2 SCD creates a new record for each change, preserving history.
Type 3 SCD maintains both old and new values in the same record.
SCD is important for tracking changes in dimensions like customer information ...read more
Q14. What is ssis? How we use
SSIS stands for SQL Server Integration Services, a tool provided by Microsoft for data integration and workflow applications.
SSIS is a platform for building high-performance data integration and workflow solutions.
It allows you to create packages that move data from various sources to destinations.
SSIS includes a visual design interface for creating, monitoring, and managing data integration processes.
You can use SSIS to automate tasks such as data extraction, transformation,...read more
Top Senior Data Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month