Now I am using Spark to connect my oracle database. However, there is a column type named "TIMESTAMP WITH TIMEZONE",which is a specific column in Oracle. When I load data from the table than contain this type column, it will throw a error "java.sql.SQLException: Unsupported type -101".
Does anybody know how to load specific columns from a table? Then I can avoid to select the "TIMESTAMP WITH TIMEZONE" column. It will be better if someone can figure out the "java.sql.SQLException: Unsupported type -101" error. But I think it might be a bug of Spark.
My code is following, thanks a lot.
spark = SparkSession\
.builder\
.appName("TestSQL")\
.getOrCreate()
orc = spark.read \
.format("jdbc") \
.option("url", "jdbc:oracle:thin:xxx/xxx@IP:1521/database") \
.option("dbtable", "xxx.xxx") \
.load()