I checked multiple Informatica Support videos but can't come to an appropriate solution.

Need to call an SQLServer Scalar function from my java code and use the returned value in my code. I am concerned about hardcoding credentials in the code + how to use different DB connection properties based on the deployed environment? Will Informatica internally handles DB connection properties?

Note: Restrictions informed to me to do above change: Have to provide a single jar file with above functionalities. My personal gut to an optimized solution that provides more scalability.