Hi Nandini,
Thanks for sharing the above solution. To be sure my understanding is correct, could you confirm below please ?
hive> create table test.UK ( a decimal(10,2)) ;
hive> create table test.IN ( a decimal(10,5)) ;
hive> create view test.T as select a from UK union all select a from IN ;
from pyspark.sql import SparkSession,SQLContext
from pyspark import SparkContext, SparkConf
from pyspark.storagelevel import StorageLevel
spark = SparkSession.builder.appName('ABC').config('spark.ui.port','3124').master("yarn").enableHiveSupport().getOrCreate()
spark.conf.set("spark.sql.ansi.enabled", "false")
df4 = spark.sql(' select * from test.T ')