Refer this video https://youtu.be/3m5aEQFGr6U for the implementation details of this repo.
Sample datasource configuration that's used in this sample can be found here - https://gist.githubusercontent.com/bbalakriz/974def1b0d286ae5ba8e0c3fca507a80/raw/b41e3c6b878dd5ec72af5fdefcd19110d8905488/keycloak-standalone.xml.