cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

how we can use config file to change pysparks dataframe names without hardcoding

SailajaB
Valued Contributor III

Hi,

Can we use config file to change pyspark dataframe attribute names (root, nested of both struct and array type) .

Actually in input we are getting attributes in lowercase we need to convert them into camel case(please note we don't have any separators in attribute name to use or build camel functions or libraries.

We are trying to implement it in pyspark.

Please add your suggestions over here

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions

SailajaB
Valued Contributor III

We have created config file in csv format and converted that into dict key value pairs to chanage the dataframe attribute names.

View solution in original post

5 REPLIES 5

Kaniz
Community Manager
Community Manager

Hi @Sailaja B​ ! Great to meet you, and thanks for your question! Let's see if your peers in the community have an answer to your question first. Or else I will get back to you soon. Thanks.

Kaniz
Community Manager
Community Manager

Hi @Sailaja B​ , Can you show your input file if you're comfortable with it?

Anonymous
Not applicable

Hi @Sailaja B​ 

Hope you are well.

Just wanted to see if you were able to find an answer to your question and would you be happy to share it with us? It would be really helpful for the other members too.

Thanks!

SailajaB
Valued Contributor III

We have created config file in csv format and converted that into dict key value pairs to chanage the dataframe attribute names.

Anonymous
Not applicable

Hi @Sailaja B​ 

This is awesome!

Thanks for coming in and posting the solution. We really appreciate it.

Cheers!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.