# Commands to add  Jar file to postgres
nano ~/.bashrc

# Add PostgreSQL JDBC JAR to Spark
export SPARK_CLASSPATH=$SPARK_CLASSPATH:/home/youruser/jars/postgresql-42.7.3.jar
export PYSPARK_SUBMIT_ARGS="--jars /home/youruser/jars/postgresql-42.7.3.jar pyspark-shell"

source ~/.bashrc

# Restart your terminal or Jupyter Notebook server to apply the changes.