Currently in LDWizard, it is not yet supported to use SPARQL queries to conduct refinement transformations. This issue proposes a feature to support retrieving values from a given input query and endpoint. The query could have the CSV row/column value injected, if the correct argument is present in the query.
A description of the sparqlTransform implementation:
type Options = {
refinementBinding?: string ;
queryVariable?: string ;
}
function sparqlTransform(query: string, endpoint: string, options: Options = {}): (value: string) => Map<number, string> {
const optionsWithDefault: Options = {...{refinementBinding: 'refinement', queryVariable: 'query'}, ...options}
// 1. parse query and make it into a union of `batchSize` queries and bind the `?search` variable to the value of the column in the source data
// 2. perform fetch request on endpoint
// 3. inject variable `options.queryVariable` into the `union` query
// 4. get binding `options.refinementBinding`
// 5. match the binding to the correct row
// 5. return the Map with the row number and string values of the bindings
}
Currently in LDWizard, it is not yet supported to use SPARQL queries to conduct refinement transformations. This issue proposes a feature to support retrieving values from a given input query and endpoint. The query could have the CSV row/column value injected, if the correct argument is present in the query.
For example:
A description of the
sparqlTransform
implementation: