Forum Discussion

Chris1300's avatar
Chris1300
Icon for Helper II rankHelper II
3 years ago
Solved

Can you create a column during SQL query connector?

I am doing a query to get data using the Azure Synapse Analytics SQL connector. The database is in Azure Synapse. My current query: 

 

SELECT TOP (100) [SESSION_REQUEST] ,[INSERT_TIME] ,[REQUEST_ID] ,[SESSION_ID] ,[COMMAND] FROM [abc].[SessionRequests]

 

I would also like to have a new column created that will do a RegEx on [COMMAND].

This is my RegEx code: [Ff][Rr][Oo][Mm]\s[\s]+

 

Does SQL query in PowerBI allow this type of query where you can create a new column during the query code? How can I do this? 

 

I have seen other posts about using R or Python Scripts to do the RegEx, but this is NOT an option for me. 

  • I ended up using the power query builtin function for splitting and extracting text columns. It involved multiple steps and different functions but got it close to using RegEx like.

3 Replies