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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

I can't get full content of my table using python script.

I have fields in my table in query editor which contains 1024+ characters. As a result in preview I see only 1024 characters and everything more is cut. There is no problem for queries, because full content is available by powerBI but there is problem if I try run python script. It looks like "dataset" contains only preview of table. Any Ideas how to solve it? Or maybe it's issue of PB?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@v-yuta-msft 

I have reproduced my issue, maybe now You can say what is going on before I create a ticket.

This is json to read:

{
  "startAt": 0,
  "maxResults": 5000,
  "maxResultsLimit": 5000,
  "total": 409,
  "values": [
    {
      "Id": "some-code-12321",
      "title": "Some Title",
      "some messages": [
        "something\nsomething",
        "something\nsomething"
      ],
     }
			]
}

This is Query:

let
    Source = Json.Document(File.Contents("path_to_json")),
    #"Converted to Table" = Record.ToTable(Source),
    Value = #"Converted to Table"{4}[Value],
    #"Converted to Table1" = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column2" = Table.ExpandRecordColumn(#"Converted to Table1", "Column1", {"Id", "title", "some messages"}, {"Id", "title", "some messages"}),
    #"Extracted Values1" = Table.TransformColumns(#"Expanded Column2", {"some messages", each try Text.Combine(List.Transform(_, Text.From), " ") otherwise _, type text}),
    #"Run Python script" = Python.Execute("# 'dataset' holds the input data for this script#(lf)",[dataset=#"Extracted Values1"]),
    dataset = #"Run Python script"{[Name="dataset"]}[Value]
in
    dataset

And here is output:

image.png

View solution in original post

5 REPLIES 5
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 


@Anonymous wrote:

I have fields in my table in query editor which contains 1024+ characters. As a result in preview I see only 1024 characters and everything more is cut. There is no problem for queries, because full content is available by powerBI but there is problem if I try run python script. It looks like "dataset" contains only preview of table. Any Ideas how to solve it? Or maybe it's issue of PB?


Could you please share the python code you are using?

 

Regards,

Jimmy Tao

Anonymous
Not applicable

@v-yuta-msft 

Actualy I can't show you script, and also my data. I'm trying to reproduce bug on diffrent data but it's hard. However now I see that this problem is slightly different. I'll show You:

This is my data:

image.png

Python Script is nothing, just to convert table to dataset:

image.png

Later dataset looks like:

image.png

I have no idea why output is so weird. Why cells are split by end of lines?

@Anonymous ,

 

It's wierd. I would suggest you create a support ticket here.

 

Regards,

Jimmy Tao

Anonymous
Not applicable

@v-yuta-msft 

I have reproduced my issue, maybe now You can say what is going on before I create a ticket.

This is json to read:

{
  "startAt": 0,
  "maxResults": 5000,
  "maxResultsLimit": 5000,
  "total": 409,
  "values": [
    {
      "Id": "some-code-12321",
      "title": "Some Title",
      "some messages": [
        "something\nsomething",
        "something\nsomething"
      ],
     }
			]
}

This is Query:

let
    Source = Json.Document(File.Contents("path_to_json")),
    #"Converted to Table" = Record.ToTable(Source),
    Value = #"Converted to Table"{4}[Value],
    #"Converted to Table1" = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column2" = Table.ExpandRecordColumn(#"Converted to Table1", "Column1", {"Id", "title", "some messages"}, {"Id", "title", "some messages"}),
    #"Extracted Values1" = Table.TransformColumns(#"Expanded Column2", {"some messages", each try Text.Combine(List.Transform(_, Text.From), " ") otherwise _, type text}),
    #"Run Python script" = Python.Execute("# 'dataset' holds the input data for this script#(lf)",[dataset=#"Extracted Values1"]),
    dataset = #"Run Python script"{[Name="dataset"]}[Value]
in
    dataset

And here is output:

image.png

@Anonymous 

 

I could reproduce your issue. This issue should be caused by '\n'. I will report this issue internally and update here when I get any info.

 

Regards,

Jimmy Tao

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.