Inrupt POD BlankNodes Problem

сreate dataset like Thing list

private _heartRateToRDF(webId: string, data: OuraHeartRate): {time: Date, thingList: Thing} {
const time = new Date(data.timestamp);
const id = #heart_rate_${time.getTime()};
return {
time: time,
thingList: getThingAll(fromRdfJsDataset(Dataset.dataset([
Dataset.quad(
Dataset.blankNode(),
Dataset.namedNode(‘DCMI: DCMI Metadata Terms’),
Dataset.namedNode(id)
),

Dataset.quad(
Dataset.blankNode(_b43),
Dataset.namedNode(‘http://hl7.org/fhir/value’),
Dataset.literal(‘min’)
),
]))),
};
then

dataset = createSolidDataset();
for (const thing of data) {
dataset = setThing(dataset, thing);
}
await saveSolidDatasetAt(url, dataset, accessGrant, { fetch: this._session.fetch });

and have the problem - when i create dataset in backend it contain all blankNodes, when i store it in Inrupt POD and load file like .ttl all blanckNodes stored. But when i use import { getSolidDatase } from ‘@inrupt/solid-client-access-grants’; all blankNodes is empty

Where would you recommend looking for the root of the problem?

As far as I know @inrupt/solid-client doesn’t support writing blank nodes. I would recommend using named nodes (if you create the data using solid-client, it can help you generate unique names for them).

1 Like

You’re probably right, but we have to take into account that when I create a solid dataset before uploading it to the POD (specifically, an Inrapt object), then it sees them, and in the file entry itself in the POD, if you download it as a .ttl file, everything is also fine and correct)
By the way, I also encountered such a problem when working with Inrapt that if you store a significant number of records in one dataset, the loading time grows generally inadequately, I tried to do the same thing equivalently but directly with the interface of downloading a file as a file and not a solid dataset and this problem did not arise, did not encounter?

The SolidDataset type takes more time to generate the objects necessary in your program by parsing a larger dataset. A flat file is streamed to you as just bytes with no object instantiation.

The type itself will not parse out resource files with blank nodes. When you request a file as a stream of bytes, it serves that without any of the object creation that is used to serve you a SolidDataset type in your application.

1 Like