apache-spark - Spark sql当前时间戳函数

标签 apache-spark apache-spark-sql

spark sql中是否有一个返回当前时间戳的sql函数,例如impala中的NOW()是返回当前时间戳的函数spark sql中有类似的吗?

谢谢

最佳答案

尝试 current_timestamp 函数。

current_timestamp() - Returns the current timestamp at the start of query evaluation. All calls of current_timestamp within the same query return the same value. 

关于apache-spark - Spark sql当前时间戳函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34136193/

相关文章:

java - 在 SparkSession 上设置 maxExecutorRetries

python - 如何将 Pyspark Dataframe header 设置为另一行?

apache-spark - 如何在控制台中创建多个 SparkContext

sql - 如何在 Spark SQL 中格式化日期?

r - 如何在 RStudio 上将 csv 文件加载到 SparkR?

apache-spark - 将 spark 数据框中的两列转换为 Map 类型?

apache-spark - pyspark fillna 不适用于 ArrayType 列

python - 使用 PySpark 在数据框上应用 sklearn 训练模型

java - 从 Apache Spark SQL 中的用户定义聚合函数 (UDAF) 返回多个数组

apache-spark - Spark : graphx api OOM errors after unpersist useless RDDs