Azure Data Warehouse String Splitters?

  • xsevensinzx

    One Orange Chip

    Points: 25531

    Do these exist? Looks like Azure Data Warehouse has some pretty big limitations with not being able to use SELECTS. Grant, hoping you see this buddy and have some good suggestions! 😀

  • Grant Fritchey

    SSC Guru

    Points: 395510

    Ha! I don't. Have you tried using a tally table and Jeff's queries? I haven't tested that, but it'd be my go-to.

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
    Theodore Roosevelt

    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

  • xsevensinzx

    One Orange Chip

    Points: 25531

    Grant Fritchey - Wednesday, May 17, 2017 11:07 AM

    Ha! I don't. Have you tried using a tally table and Jeff's queries? I haven't tested that, but it'd be my go-to.

    Yeah, it's my next to try outside of splitting outside of Azure.

  • Grant Fritchey

    SSC Guru

    Points: 395510

    Following Microsoft's ELT, as opposed to ETL, approach to Data Warehouse, you sure should be able to make that work. I'd offer to test it for you, but I'm a little slammed at the moment. I might be able to get to it next week.

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
    Theodore Roosevelt

    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

  • xsevensinzx

    One Orange Chip

    Points: 25531

    Shouldn't be a problem. I use a lot of Python in cases like these. As the splitting needs to happen on a smaller dimension file, it shouldn't be an issue outside of Azure to address it. The issue, is I really don't want to split the file outside because the delimiters are dynamic depending on business unit and can be multiple positions that may or may not be to split. This is why I liked using functions because it allowed me to apply functions to columns to split on a SELECT statement as needed. This was one of the very cool options that Azure seems to lack at the moment. Hopefully in time.

  • xsevensinzx

    One Orange Chip

    Points: 25531

    Found a working example for Azure Data Warehouse (credited to wBob). Going to clean it up more before posting it up.

  • andrew_dale

    Ten Centuries

    Points: 1201

    xsevensinzx - Wednesday, August 30, 2017 7:31 PM

    Found a working example for Azure Data Warehouse (credited to wBob). Going to clean it up more before posting it up.

    did you ever clean this up?

  • xsevensinzx

    One Orange Chip

    Points: 25531

    Totally forgot about this thread, then I got this email. Seems we have one in production.

    https://feedback.azure.com/forums/307516-sql-data-warehouse/suggestions/20215162-add-split-part-function-to-sql-dw?tracking_code=24791f8a92428eec662f8cd98d2fd222

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply