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

Python: Here are 3 Brilliant Methods to Execute

You can run python commands in three methods. Those are at CLI, Python interface, and as a Script.


3 Methods you need to run python commands

How to Run Script at CLI?


The script extension should be .py. Here is an example xyz.py. When the script is ready, the next step is to run it. How to run it from CLI? 


Here is a command to run at CLI. Suppose you have installed Python in Linux OS. Then you need to give:


$ python -m xyz.py


Here, m means module. That means you are running a script with Python code.



How to Run Commands at Script?


The Other way, you can execute Python statements directly at CLI. Here's a command for your quick reference.


$ python -c "print('Hello world')"


Here, the print statement displays "Hello World" on the screen.


How to Run commands at Python Interface?

You know that the Python interface needs an operating system - Windows or Linux. 


$ Python3

>>> 10 + 20

30


References

  1. Python Programming: Using Problem Solving Approach

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