Skip to main content
March 18, 2025
Solved

Json Data into Excel file

  • March 18, 2025
  • 9 replies
  • 0 views

Hi Everyone,
I have a table with one column type as JSON datatype and using to save the data through write to records. Now I have to export this table data into excel file and share it everyday so I have created a CDT for that table.
In CDT it is defaulted to text even I have given longtext datatype. Now there is an issue with the data as the database table have more than 4000 characters the CDT is not allowing more the 4000 so my data into excel is not exceeding more than 4000 characters.
Please suggest how to handle this or any alternate better approach.

Best answer by mathieud0001

Just created a table and created a data type from the table and this is the XSD that it generated.

Seems like it used LONGTEXT.


  
    
      @Table(name="S_JSON")
    
    
      
        
          @Id @GeneratedValue @Column(name="id", nullable=false, unique=true, columnDefinition="INT")
        
      
      
        
          @Column(name="jsonText", columnDefinition="LONGTEXT")
        
      
    
  

9 replies

mathieud0001
March 19, 2025

You need to manually update the XSD to use @Column(columnDefinition = "TEXT") for the desired column.

March 20, 2025

does this will help to get the data more than 4000 characters ?

mathieud0001
March 20, 2025

Yes.