Code Monkey home page Code Monkey logo

Comments (4)

GezimSejdiu avatar GezimSejdiu commented on May 29, 2024

Hi @purohitsumit ,
many thanks for the issue. Indeed, this is related to the variable binding as described on issue #13 and the null values are because of the result set containing all the schema (including RDF terms).

We will try to resolve this issue as soon as possible and map the bindings to the variables present in the projection clause.

Best regards,

from archived-sansa-query.

Aklakan avatar Aklakan commented on May 29, 2024

This is actually a design issue of .sparql() that it exposes the raw SQL result set - without the mapping that creates the actual bindings having been applied. So NULL values are valid at this stage.
RDF terms of different datatypes in general need to be represented with different and/or multiple SQL columns if only using standard SQL datatypes; "RDFTerm" is typically NOT a datatype supported by SQL.
For example: If in SPARQL there are two bindings with a string and an int value for ?x, in the SQL result set there will conceptually be an x_int and an x_string column. The two rows will have one column holding the value and the other one set to NULL.

Note: Improving the naming of columns is subject of #13.

from archived-sansa-query.

Aklakan avatar Aklakan commented on May 29, 2024

@GezimSejdiu @dgraux This is an API design issue and we discussed some time ago, that we will face the same issue with ontop - i.e. any sparql-to-sql rewrite has at least two parts: the SQL result table and the mapping to SPARQL bindings.
I see the following options that .sparql() return for SELECT queries:

  • Some subclass of DataFrame, where the DataFrame is the raw SQL result (as it is now) plus extra methods to create bindings - this way we not break any existing code relying on .sparql - however, using the DataFrame of .sparql() would then be highly dependent on the OBDA engine, which seems awkward for such a central function
  • Let .sparql() return some intermediate object from which one can obtain the bindings or the raw DataFrame
  • Introduce a sibling method of .sparql() that returns a more meaningful result

from archived-sansa-query.

Aklakan avatar Aklakan commented on May 29, 2024

Please continue discussion at #47

from archived-sansa-query.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.