Search
 
SCRIPT & CODE EXAMPLE
 

SQL

get current date in pyspark sql

%pyspark

from pyspark.sql.functions import current_date
df1 = df.withColumn("current_date",current_date())

#Where df1 is that dataset you want to add the current date to.
Comment

PREVIOUS NEXT
Code Example
Sql :: show max_allowed_packet mysql 
Sql :: log queries postgre 
Sql :: mysql update part of string 
Sql :: mysql users and privileges list 
Sql :: postgres regex remove special characters 
Sql :: sql add date hour 
Sql :: how to check username in mysql command line 
Sql :: drop view in mysql 
Sql :: mysql 1 day ago 
Sql :: ms sql rename database 
Sql :: delete database mysql 
Sql :: sql server get timezone 
Sql :: not today mysql 
Sql :: linux command line import mysql database 
Sql :: find a column in all tables postgres 
Sql :: cast to date bigquery 
Sql :: convert int to string in sql server 
Sql :: ORA-01950 
Sql :: how to import database in mysql by cmd 
Sql :: mysql count lines 
Sql :: mysql remove ubuntu 
Sql :: reset auto increment sql server 
Sql :: mysql create database charset utf8mb4 
Sql :: sql get tables from current database you working with 
Sql :: execution plan oracle 
Sql :: Disabling foreign key checks while performing Sqlalchemy Upgrade 
Sql :: insert postgres 
Sql :: delete all rows from table mysql 
Sql :: mysql extract month 
Sql :: how to truncate a table in databse 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =