Hi,
For the first dataset, try to load the data in chunks with Dataset.from_pandas if you can somehow convert the data to be pandas-compatible, or with Dataset.from_dict if you can load the data into a dict. Then, store each chunk to disk (Dataset.save_to_disk) and reload the chunk (datasets.load_from_disk). Next, concatenate the loaded chunks with datasets.concatenate_datasets (set the axis param to 0). Feel free to follow my snippet from the above because the idea is the same.
For the second dataset, load the JSON strings with Dataset.from_json. This dataset will already be on disk, so you don’t have to worry about RAM usage.
Finally, concatenate these two datasets as follows:
datasets.concatenate_dataset([windows_dataset, metadata_dataset], axis=1)