使用tdbloader2在fuseki上加载许多rdf文件

时间:2016-06-20 17:21:30

标签: jena fuseki

我需要将很多小的rdf文件加载到fuseki数据库中。 我正在尝试

var AWS = require('aws-sdk');
var db = new AWS.DynamoDB();

exports.handler = function(event, context) {

  var params = {
    TableName: "Events", //"StreamsLambdaTable",
    ProjectionExpression: "ID, description, endDate, imagePath, locationLat, locationLon, #nm, startDate, #tp, userLimit",  //specifies the attributes you want in the scan result.
    FilterExpression: "locationLon between :lower_lon and :higher_lon and locationLat between :lower_lat and :higher_lat",
    ExpressionAttributeNames: {
        "#nm": "name",
        "#tp": "type",
    },
    ExpressionAttributeValues: {
        ":lower_lon": {"N": event.low_lon},
        ":higher_lon": {"N": event.high_lon}, //event.high_lon}
        ":lower_lat": {"N": event.low_lat},
        ":higher_lat": {"N": event.high_lat}
    }
};

  db.scan(params, function(err, data) {
    if (err) {
      console.log(err); // an error occurred
      } 
    else {
      data.Items.forEach(function(record) {
           console.log(
                record.name.S + "");
        });
        context.succeed(data.Items);


      }
  });
};

更好的方法吗?

1 个答案:

答案 0 :(得分:2)

这是shell的错误。例如,请参阅“Argument list too long error for rm, cp, mv commands”。

但是,在尝试批量加载之前解析所有文件以检查它们是否有效是一个好主意,因为一个错误会中止批量加载程序。在检查期间,您也可以转换为加载速度更快的N-triples。