Blog

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


Making Updates Safe for Parallel Processing

  • 28 May, 2021
  • By Dave Cassel

I’ve seen a couple cases recently where we were making modifications to a document in MarkLogic and the process was restricted to a single thread due to concerns about overwriting data. Let’s look at an example. function makeUpdates(someArgs) { let uri = ‘/some/content.json’; let docObj = cts.doc(uri).toObject(); docObj.meta.foo = updateFoo(docObj.meta.foo, someArgs); xdmp.documentInsert( uri, docObj, { […]

Read More


cta-bg

Ready to Chat?

Book your 30-minute Technology Clarity Call. I offer a free, no-obligation consultation to learn about your business and explore whether a Fractional CTO engagement is the right fit.