Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
JosueMolina
Helper I
Helper I

Fabric Notebook Locale Setting

I was able to run this code:

 

locale.setlocale(locale.LC_TIME,"es_ES") before. But now the locale string is unsupported. Is there any way I can change the locale for a Notebook session. This helps with multiple formats we use across Notebooks.
7 REPLIES 7
HimanshuS-msft
Community Support
Community Support

Hello @JosueMolina ,
Thanks for the ask and using the Microsoft Q&A platform.\nAt this time, we are reaching out to the internal team to get some help on this .
We will update you once we hear back from them.
Thanks Himanshu

@HimanshuS-msft do you have an update on this ? I would like to test it out with some Notebooks we depend on, now that we are nearing the end of the year.

Hello @JosueMolina
Sorry for the late reply .
If the requirement is to set locale to handle local timezone then yes. You can set timezone at session level by changing the Spark Config "
spark.sql.session.timeZone" or using SparkSQL SET command -
SET TIME ZONE - Spark 3.4.0 Documentation (apache.org)
Thanks 
Himanshu 


Hi @HimanshuS-msft 

Sadly, this doesn't work as the purpose of changing the locale is to use pandas or pandas on Spark to create a Calendar with the proper Weekday names and Month names in Spanish without resorting to a replace as we add more variations of these names.

df['date'].dt.strftime("%a")
will not output the desired weekday abbreviated name



Hi @JosueMolina 

 

Apologies for the delay in response.

Could you please go ahead and raise a support ticket to reach our support team:

https://support.fabric.microsoft.com/support

After creating a Support ticket please provide the ticket number as it would help us to track for more information.

 

Thanks

 

 

I managed to do this entirely using a locale format with Spark, foregoing Pandas usage. While the workaround was functional, the issue of not being able to set my own locale outside of Spark configs is not ideal.

This is not a solution as the main issue of setting a custom locale within the notebook has not been addressed.

Helpful resources

Announcements
Expanding the Synapse Forums

New forum boards available in Synapse

Ask questions in Data Engineering, Data Science, Data Warehouse and General Discussion.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.