I have a column in my dataset that contains file paths. I need to extract a folder name from these, the issue is that the index of these folder names could change (either the second or third item when split by ‘/’).
I have a regex pattern that can extract this but im struggling to implement it. The datasource is an RDS running sql server so i cannot use it at that point.
Hello @tomDG, there isn’t a way to implement the regex within QuickSight to dynamically sort through the folder names.
After doing some digging, I definitely see why you are having issues trying to complete this from the RDS SQL server database. I was able to find some possible work-arounds that might allow for some more functionality than LIKE or PATINDEX.
One alternative option that might work would be to utilize a Common Language Runtime function so you can build the function with .NET/C#.
Here is some documentation on integrating that with RDS:
Some other third party options that you might be able to utilize to accomplish this are as followed:
SQL Server Regular Expressions by SQL# (SQLSharp)
T-SQL Regular Expression Functions by Oleg Shilo
SQL Server CLR Library by XSharper
I apologize that there isn’t an easier solution, but let me know if any of these options provided help lead you to your expected output.