Featured Post

8 Ways to Optimize AWS Glue Jobs in a Nutshell

Image
  Improving the performance of AWS Glue jobs involves several strategies that target different aspects of the ETL (Extract, Transform, Load) process. Here are some key practices. 1. Optimize Job Scripts Partitioning : Ensure your data is properly partitioned. Partitioning divides your data into manageable chunks, allowing parallel processing and reducing the amount of data scanned. Filtering : Apply pushdown predicates to filter data early in the ETL process, reducing the amount of data processed downstream. Compression : Use compressed file formats (e.g., Parquet, ORC) for your data sources and sinks. These formats not only reduce storage costs but also improve I/O performance. Optimize Transformations : Minimize the number of transformations and actions in your script. Combine transformations where possible and use DataFrame APIs which are optimized for performance. 2. Use Appropriate Data Formats Parquet and ORC : These columnar formats are efficient for storage and querying, signif

Print Dictionary Values Simplified Logic


Here's for loop logic that says how to use Dictionary to get its data. I will present here how to use it as input In for loop. You can also call Dictionary as Map, Hash, or Associative array.


Print dictionary values

Here is way to print dictionary values using for loop

Below is my example. I have created a simple Dictionary called 'store.' Then, I will get its data using for-loop. Here's my previous post Python -  How to Lookup Dictionary By Key.


Dictionary example

Store = { "rao" : 1, "srini' : 2}


For-loop logic

for key in store:
     print(key, store[key])


Laptop batteries can last longer if you charge them up to only 80% instead of the full 100%. - By Lifehack.org

Real-time result

The execution of for loop showed here. It's much simple. Just use the code as I did. You'll get the desired result quickly.


How to use for loop on Dictionary Useful Example


References

Comments

Popular posts from this blog

How to Fix datetime Import Error in Python Quickly

How to Check Kafka Available Brokers

SQL Query: 3 Methods for Calculating Cumulative SUM