03-28-2023 03:53 AM
When querying a json data , the values are getting trimmed. I need to see the full data for that field, is there any way to do so ?
03-28-2023 09:24 AM
@Raj Sethi Hi, I believe you are using display option. Try to use show with truncate as False so that your entire contents can be displayed
Ex. df.show(truncate = False)
03-30-2023 02:38 AM
Thanks for the response @Vigneshraja Palaniraj ! While executing in python it works, but if I run it as sql ,do I have this option? Please let me know if you have come across any solution for this .
03-30-2023 06:28 AM
Hi @Raj Sethi , If you are expecting something like below
%sql
select * from tbl -> This internally uses .display API to display your results. So you can't really control truncation there.
But if you can try the same above command like below, it could help to solve your issue.
spark.sql("select * from tbl").show(truncate = False)
Please let me know if this helps.
03-28-2023 11:41 AM
Hi @Raj Sethi , I think if you use "df.show(truncate=False)" , this should display the complete result. But, a better option would be to write the data to a table or file to see the complete value
03-30-2023 02:38 AM
Thanks for the response @Lakshay Goel ! While executing in python it works, but if I run it as sql ,do I have this option? Please let me know if you have come across any solution for this .
03-29-2023 08:35 PM
Hi @Raj Sethi
We haven't heard from you since the last response from @Lakshay Goel and @Vigneshraja Palaniraj , and I was checking back to see if her suggestions helped you.
Or else, If you have any solution, please share it with the community, as it can be helpful to others.
Also, Please don't forget to click on the "Select As Best" button whenever the information provided helps resolve your question.
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.
If there isn’t a group near you, start one and help create a community that brings people together.
Request a New Group