Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
My query connected to a .txt file, which has the following line:
elections_to_vest_changes = {'119WEST BUFFALO': '119000210WEST BUFFALO', '119UNION': '119000200UNION', '119NEW BERLIN': '119000190NEW BERLIN'}
The single quotation marks enclose text. The colon is a delimiter for a column. The comma is a delimiter for a row.
(I've shortened this line for readability.) How can I split this line by delimiter into rows? Thanks.
Solved! Go to Solution.
Hi,
if something like this is what you need
you have first to split by delimiter in rows
then split by delimiter in columns
If this post is useful to help you to solve your issue consider giving the post a thumbs up
and accepting it as a solution !
Save your text in a json file, transforming '(single quote) into "(double quote) and use the following script to transform it into a table with two columns and many rows
let
Source = Json.Document(File.Contents("C:\Users\sprmn\OneDrive\Documents\Power BI Desktop\test.json")),
tfc=Table.FromColumns({Record.FieldNames(Source{0}),Record.FieldValues(Source{0})})
in
tfc
Hi,
if something like this is what you need
you have first to split by delimiter in rows
then split by delimiter in columns
If this post is useful to help you to solve your issue consider giving the post a thumbs up
and accepting it as a solution !
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 5 | |
| 4 |