0

I trying to execute these spark statements but it is not working

spark.sql("CREATE OR REPLACE GLOBAL TEMPORARY VIEW VIEW_1 
AS SELECT * from orc.`/apps/hive/warehouse/userdb.db/rib_ies_liensserveurs`")   

spark.sql("CREATE OR REPLACE GLOBAL TEMPORARY VIEW VIEW_2 AS SELECT * from VIEW_1") 

spark.sql("SELECT * from VIEW_2").show()

This fails with the following error -

Table or view not found: VIEW_1

1 Answer 1

1

Why are you registering your data as GLOBAL TEMPORARY VIEW Try using Just TEMPORARY VIEW

global temp view to share the data through different sessions

1
  • 1
    If GLOBAL TEMPORARY, we must add juste global_temp.VIEW_1
    – Carlos
    Mar 13, 2019 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.