Blog

SPARQL Update with Multiple Targets

  • 28 July, 2022
  • By Dave Cassel

In my last post, I talked about using the bindings parameter of MarkLogic’s sem.sparql function to look for multiple values in a SPARQL query. It turns out that approach doesn’t work for SPARQL Update. I’ll use the same sample data as my previous post: ‘use strict’; declareUpdate(); const sem = require(“/MarkLogic/semantics”) const myPred = sem.iri(“myPredicate”); sem.rdfInsert([1, 2, 3, 4, […]

Read More


TDE Template – Unknown Table

  • 28 November, 2021
  • By Dave Cassel

MarkLogic’s Data Hub Central offers an easy way to create entities. As a bonus, it automatically creates a TDE Template for you, making your entity accessible through SQL or Optic API queries. However, we ran into an error with this process recently. After creating an entity and processing some sample data, a member of the […]

Read More


Populating an Array from Numbered Fields

  • 28 November, 2021
  • By Dave Cassel

As we move data from other sources (often relational databases) into MarkLogic JSON, we have the opportunity to change the way data are represented. I’ve seen a pattern a few times where the incoming source repeats a field, appending a number. I’ll illustrate with a simplified example: name,pet_name_1,pet_name2 David,Merry,Pippin Alice,Spot, Bob,Fluffy,George When I see something […]

Read More


SPARQL Update and Locks

  • 28 October, 2021
  • By Dave Cassel

I just learned something the hard way, so I thought I’d share. The tl;dr is that sem.sparqlUpdate runs in a separate transaction by default, which means you need to be careful about document locks. (If your response is “well, duh”, then you may not need the rest of this post. If you’ve ever had a sem.sparqlUpdate request time out when it […]

Read More


cta-bg

Get In Touch

Wherever you are in your data management journey, we're here to help you take the next step. Whether you're just starting to identify challenges or are ready to implement a solution, our team is ready to assist.