One of the things you should remember is that nothing in life is free, especially not data. I have seen instances of inexperienced students/postdocs reaching out to companies asking for their data (without informing their advisors). These requests go either ignored, or politely refused. The company needs to know that there is some real benefit in working with you, whether it is an improvement to their current processes or a monetary incentive. In either case, it often involves the university's lawyers making sure that the transaction is
- Legal/ethical - the data you're getting doesn't require someone's consent and is indeed owned by the company. You may need to get IRB involved too.
- Transparent for both sides - what are you going to do with your analysis? Will the data be published? Will it be anonymized? Can you patent the results? If so - what part of the patent is owned by the university/company/yourself?
- Modes of compensation for the company, if any.
(this is a partial list, I'm not a lawyer)
This is even less fun when one works on data provided by a government agency. This is why often enough researchers either work on public datasets (e.g. those on Kaggle/Github), collect their own, run simulations, or just go on research visits to Amazon/Uber/Google/Facebook to get access to actual data, see that their models make sense, and get a nice paycheck while doing so.