The equations of compressible ideal fluids analogous to those of electromagnetism are reformulated in terms of hyperbolic octonions. Furthermore, the wave equations with source terms are generalized in a compact and elegant form. The analogy between fluid mechanics and electromagnetism is also argued by considering the previous octonionic formulations in relevant literature.