GithubHelp home page GithubHelp logo

Comments (8)

enridaga avatar enridaga commented on June 18, 2024 1

Tarql binds values to variables without the need to explicitly express a triple pattern to match/capture the value.

OK, now on the main point. I like the idea of providing a default triple pattern. It's interesting how you would get the same behaviour with the following:

{ fx:properties
                  fx:location     "/app/proposal.csv" ;
                  fx:csv.headers  "true" ;
       [] xyz:name ?name ;
          xyz:age ?age ;
          xyz:dog ?dog . 
      }

without headers, we would need to add a convention for the variable name ?col_1 etc...

{ fx:properties
                  fx:location     "/app/proposal.csv" ;
                  fx:csv.headers  "true" ;
       [] rdf:_1 ?col_1 ;
          rdf:_2 ?col_2 ;
          rdf:_3 ?col_3 . 
      }

from sparql.anything.

rjyounes avatar rjyounes commented on June 18, 2024

Along with this, it would be nice to automatically replace spaces with underscores in the incoming column headers; this is what TARQL does.

from sparql.anything.

justin2004 avatar justin2004 commented on June 18, 2024

@rjyounes
what if, in a single csv, one column is "state_city" and another is "state city" ?
how does TARQL handle the collision?

from sparql.anything.

rjyounes avatar rjyounes commented on June 18, 2024

Good question. I haven't ever encountered it. Possibly some hand-correction is required.

from sparql.anything.

enridaga avatar enridaga commented on June 18, 2024

Along with this, it would be nice to automatically replace spaces with underscores in the incoming column headers; this is what TARQL does.

Indeed, currently, we are just making those strings URL-safe, which results in some unintuitive %20 appearing. Maybe we can think about adding an option to treat them as web page slugs, but even with that, there can be cases where the result is not intuitive anyway (cases, special chars, etc...).

@rjyounes what if, in a single csv, one column is "state_city" and another is "state city" ? how does TARQL handle the collision?

We already have this problem, sometimes CSVs repeat column names multiple times. We just add _1 etc... not great but intuitive enough.

from sparql.anything.

justin2004 avatar justin2004 commented on June 18, 2024

@enridaga and we'd need to wrap each of the triple patterns in an OPTIONAL to get the Tarql behavior.

from sparql.anything.

enridaga avatar enridaga commented on June 18, 2024

@enridaga and we'd need to wrap each of the triple patterns in an OPTIONAL to get the Tarql behavior.

Even if we remove the null-string option?

from sparql.anything.

justin2004 avatar justin2004 commented on June 18, 2024

Even if we remove the null-string option?

oh, if we don't assert the null-string option then that might be the Tarql behavior.

but i do know that my team likes using the null-string option with the SPARQL Anything OPTIONAL triple patterns (as they transition from Tarql to SPARQL Anything).

from sparql.anything.

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.