0

How to create a empty table using SchemaRDD -sqlcontext in Scala?I need it to be empty during the first load to the table and during subsequent loads the table will have records in it.

In the Below Query table1 is empty during the first load.

select a.c_id,a.m_cd,a.linkid from table1 a leftouterjoin basetab b on
a .c_id=b.c_id and a.m_cd=b.m_cd where b.cid is null ;

Please Help!!

Thanks, Priya

zero323
  • 322,348
  • 103
  • 959
  • 935
priya69
  • 1
  • 1
  • If `table1` is empty output after left outer join will be empty as well. – zero323 Feb 09 '16 at 15:00
  • yes that is true.But how would i be able to refer this table in query without having any data in it .Basically i want to know how to create a table in schemaRDD with no records in it. – priya69 Feb 11 '16 at 10:02
  • This is why it is marked as a duplicate. – zero323 Feb 11 '16 at 15:33

0 Answers0