One hot encoding large dataset
Apparently, you need an implementation of the a priori algorithm (or whatever algorithm you want to use) that supports sparse feature vectors.  If one doesn't already exist, you might need to implement it yourself.

Alternatively, you can use the feature hashing trick.  However, beware that it can cause loss of accuracy and loss of interpretability; nothing comes for free.