Well you can't "weld" it but you may be able to repair it. Alternatively you can replace the compass module. In what way is the compass disconnected. Can you post clear closeup photos of the issue?
we have seen that a few times now. I am thinking about taking the top off and adding hot glue to the connector so it will have a better chance to stay put in a crash.