Server.js icon indicating copy to clipboard operation
Server.js copied to clipboard

Composite data source is empty in 3.x (worked in 2.x)

Open pheyvaer opened this issue 3 years ago • 2 comments

Hi,

I used the tool to migrate from the server 2.x to 3.x and this is what I got from some of my datasets. Here a composite data source uses (among others) a HDT data source. The HDT data source itself works, but the composite one is empty (0 quads), but no errors are shown. This worked with 2.x though. I didn't change anything to what the migration tool generated. Is there an error somewhere in my configuration?

{
  "@id": "urn:ldf-server:myDatasource2022-01",
  "@type": "CompositeDatasource",
  "quads": false,
  "datasourcePath": "2022-01",
  "datasourceTitle": "January 2022",
  "description": "Between Our Worlds Dataset for January 2022",
  "compose": [
    "urn:ldf-server:myDatasource2022-01-anime",
    "urn:ldf-server:myDatasourceontology",
    "urn:ldf-server:myDatasourceactionstatus"
  ]
},
{
  "@id": "urn:ldf-server:myDatasource2022-01-anime",
  "@type": "HdtDatasource",
  "quads": false,
  "datasourcePath": "2022-01-anime",
  "datasourceTitle": "January 2022",
  "description": "Between Our Worlds Dataset for January 2022",
  "hide": true,
  "hdtFile": "/var/www/data/2022-01.hdt"
}

pheyvaer avatar Jan 05 '22 06:01 pheyvaer

Config looks fine to me at first glance.

Also no warnings are reported when starting the server?

I don't have the bandwidth to debug this myself, but these places in the code may be relevant for debugging this issue:

  • https://github.com/LinkedDataFragments/Server.js/blob/master/packages/datasource-composite/lib/datasources/CompositeDatasource.js#L47
  • https://github.com/LinkedDataFragments/Server.js/blob/master/packages/datasource-composite/lib/datasources/CompositeDatasource.js#L80

rubensworks avatar Jan 05 '22 06:01 rubensworks

Nope, no warnings. Ok, thanks, will see if I can find something in the code 😄

pheyvaer avatar Jan 05 '22 06:01 pheyvaer