At the [countable set](/page/Countable%20Set) of points where this formula gives $0$, choose any value in $(0,1)$. Then $G$ is $\mu_G$-preserving and the measure-preserving system $((0,1),\mathcal B((0,1)),\mu_G,G)$ is ergodic: if $A\in\mathcal B((0,1))$ satisfies $\mu_G(G^{-1}(A)\triangle A)=0$, then $\mu_G(A)\in\{0,1\}$.