โ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