March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello, I am trying to use Web.Page() to perform regular expression pattern matching. It is successful in the desktop environment, but not providing results when published to the service. I am not a gateway or capacity admin, and am on premium per capacity. This dataset requires no gateway, and I am unable to select one.
This M-lang works in desktop, but fails in service. What is wrong here?
let
fx_re = (text as text, pattern as text) as list => Web.Page("<script>document.write(new RegExp('"& pattern &"').exec('"& text &"'))</script>")[Data]{0}[Children]{0}[Children]{1}[Text],
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("TYw7DsIwEAWv8mIakCIk/tDScIF0UQoTNsTC9lpeB5TbcBZOhqFASK+Y4s3UtVosV+vNdrc/qFKdmC9wHL3x1wJVbwR5HUdMKtLuaAdCyuB0IikRLGkhRJLA/oLESB+lZX9naEGIuk2mpXlOaX/DyEOB6Tf7MNbinGs9gb0df18EloQussMgf+Ls9VRN8wY=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [id = _t, body.content = _t]),
ct = Table.TransformColumnTypes(Source,{{"id", Int64.Type}, {"body.content", type text}}),
#"do RegEx_extract" = Table.AddColumn(Table.Buffer(ct), "hashtag", each fx_re([body.content], "#[^\\s\\d]+[\\d\\w]+")),
#"Removed Errors" = Table.RemoveRowsWithErrors(#"do RegEx_extract", {"hashtag"}),
#"Expanded hashtag" = Table.ExpandListColumn(#"Removed Errors", "hashtag"),
#"Filtered Rows" = Table.SelectRows(#"Expanded hashtag", each ([hashtag] <> "null") and not Text.StartsWith([hashtag], "#WO0") and Text.Length(Text.Trim([hashtag]))>3),
#"Renamed Columns" = Table.RenameColumns(#"Filtered Rows",{{"id", "ht_conversation_id"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"hashtag", type text}})
in
#"Changed Type"
Point of clarification - when I say it 'fails,' that is: It returns an empty dataset. There is no error and refresh succeeds normally.
Hi @cmeu
What you might need is to put in a table that actually can be refreshed. Without something to refresh it wont actually do any updates.
hey @GilbertQ - The embedded source table included above is meant to be representative of something else, for performing tests in relation to this thread. The actual source data is coming from a set of json files hosted in the same tenant on sharepoint.
Switching between the included table from binary and the sharepoint folder does not change the outcome
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
39 | |
26 | |
15 | |
11 | |
10 |
User | Count |
---|---|
58 | |
52 | |
23 | |
14 | |
11 |