cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Why am I getting NameError name _all_timezones_unchecked' is not defined

AgusBudianto
New Contributor III

I defined the following local time function get datetime:

 
def get_sysdate():
    jkt_tz = pytz.timezone('Asia/Jakarta')
    sysdate = datetime.now(jkt_tz).strftime('%Y-%m-%d %H:%M:%S')
    return sysdate

spark.udf.register("get_sysdate", get_sysdate)

But sometimes I get the error "_all_timezones_unchecked' is not defined," and the next run works fine.

0 REPLIES 0

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now