спасибо @Ashraful, это сработало.

приведен блок кода и получена ошибка

> creating a temporary views 
sqlcontext.sql("""CREATE TEMPORARY VIEW temp_pay_txn_stage
     USING org.apache.spark.sql.cassandra
     OPTIONS (
       table "t_pay_txn_stage",
       keyspace "ks_pay",
       cluster "Test Cluster",
       pushdown "true"
     )""".stripMargin)

sqlcontext.sql("""CREATE TEMPORARY VIEW temp_pay_txn_source
     USING org.apache.spark.sql.cassandra
     OPTIONS (
       table "t_pay_txn_source",
       keyspace "ks_pay",
       cluster "Test Cluster",
       pushdown "true"
     )""".stripMargin)

запрос представлений, как показано ниже, чтобы иметь возможность получать новые записи со стадии, отсутствующей в источнике.

Scala> val df_newrecords = sqlcontext.sql("""Select UUID(),
 | |stage.order_id,
 | |stage.order_description,
 | |stage.transaction_id,
 | |stage.pre_transaction_freeze_balance,
 | |stage.post_transaction_freeze_balance,
 | |toTimestamp(now()),
 | |NULL,
 | |1 from temp_pay_txn_stage  stage left join temp_pay_txn_source source on stage.order_id=source.order_id and stage.transaction_id=source.transaction_id where
 | |source.order_id is null and source.transaction_id is null""")`



org.apache.spark.sql.AnalysisException: Undefined function: 'uuid()'. This function is neither a registered temporary function nor a permanent function registered in the database 'default'.; line 1 pos 7  

я пытаюсь получить сгенерированные UUID, но получаю эту ошибку.

Ответы на вопрос(1)

Ваш ответ на вопрос