This is a project we did to get a raised patio to pass code and contain a guard rail. This is a cedar rail attached to the surface of the brick An aluminum rail could be used as well.
Ground Level Deck, Cedar, Wood Rail