'Load different data into different datasets in Apache Jena Fuseki

I am creating two different datasets in Jena, the default dataset and an additional dataset. To load data to the first dataset I am doing the following:

RDFConnectionRemoteBuilder builder = RDFConnectionFuseki.create()
            .destination(dataHost);

    try (RDFConnectionFuseki conn = (RDFConnectionFuseki) builder.build()) {
        // load datasets
        for (String fileName : fileNames) {
            System.out.println(fileName);
            conn.load(fileName);
        }
    }

But this data also appears when I query the second dataset. What can I do to correct this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source