Week 39 – Basic

Security is a top concern at Frosty Friday, and we need to make sure that not just anyone can see our customer’s contact info.

create or replace table customer_deets (
    id int,
    name string,
    email string

insert into customer_deets values
    (1, 'Jeff Jeffy', 'jeff.jeffy121@gmail.com'),
    (2, 'Kyle Knight', 'kyleisdabest@hotmail.com'),
    (3, 'Spring Hall', 'hall.yay@gmail.com'),
    (4, 'Dr Holly Ray', 'drdr@yahoo.com');

Apply a column level masking policy that shows me the following when I query using my role:

And the following when I query using any other role:

Remember, if you want to participate:

  1. Sign up as a member of Frosty Friday. You can do this by clicking on the sidebar, and then going to β€˜REGISTERβ€˜
  2. Post your code to GitHub and make it publicly available (Check out our guide if you don’t know how to here)
  3. Post the URL in the comments of the challenge

5 responses to “Week 39 – Basic”

  1. ChrisHastie avatar

    I’m a big fan of the recent(ish) addition to the functionality where you can use other fields in the data too

    • Solution URL – https://github.com/ChrisHastieIW/Frosty-Friday
  2. Jamie Laird avatar
    Jamie Laird

    Here’s my solution

    • Solution URL – https://github.com/apd-jlaird/frosty-friday/blob/main/week_39/ff_week_39.sql
  3. mat avatar

    It’s good that ChatGPT can now write a regex πŸ™‚

    • Solution URL – https://github.com/mateusz-kmon/frostyfridaychallenges/blob/main/w39.sql
  4. dsmdavid avatar

    Thanks for the challenge! πŸ™‚

    • Solution URL – https://github.com/dsmdavid/frostyfridays-sf/blob/main/models/challenge_39.sql
  5. Non-deterministicNorman avatar

    masking policies revisited. Enjoyed this one

    • Solution URL – https://github.com/NMangera/frosty_friday/blob/main/week%2039%20-%20basic%20/CLS

Leave a Reply