Commands to add Jar file to Postgres

PHOTO EMBED

Tue Sep 23 2025 13:06:42 GMT+0000 (Coordinated Universal Time)

Saved by @Saravana_Kumar #bash

# 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.
content_copyCOPY