Coder Social home page Coder Social logo

Comments (4)

tcfenstermaker avatar tcfenstermaker commented on July 1, 2024

Steps for creating a temporal (aka bitemporal) database in ML8 (assumes temporal = require("/MarkLogic/temporal.xqy");)

  1. Use admin.databaseAddRangeElementIndex to create four indexes, one each for start and end times for both the valid and system times.
  2. Use temporal.axisCreate to create the valid and system axes bound to the range indexes.
  3. Use temporal.collectionCreate to create a temporal collection which uses the two axes.

from ml-app-deployer.

rjrudin avatar rjrudin commented on July 1, 2024

Trebor - note that you can create the range index via the ml-config/databases/content-database.json file. And I'm assuming the temporal management endpoints provide a way to do the "axisCreate" and "collectionCreate" stuff - e.g. https://docs.marklogic.com/REST/POST/manage/v2/databases/[id-or-name]/temporal/axes

Basically, there shouldn't be any need to write any ML code - should just be able to read JSON/XML files from disk that define the axis/collection, and then call the appropriate endpoint.

from ml-app-deployer.

tcfenstermaker avatar tcfenstermaker commented on July 1, 2024

Current approach:

  • Create new packages com.marklogic.rest.mgmt.temporal and com.marklogic.appdeployer.command.temporal
  • Create new classes com.marklogic.rest.mgmt.temporal.AxesManager and com.marklogic.appdeployer.command.temporal.CreateAxesCommand (these classes most likely will extend AbstractResourceManager and AbstractResourceCommand respectively)
  • Add an item in com.marklogic.appdeployer.command.SortOrderConstants to give an order for the creation of axes relative to other app creation tasks
  • Create a new temporal directory in resources/sample-app/src/main/ml-config/, to contain a sample configuration filet be used in creating a new temporal axis.
  • Add a new getTemporalDir() to com.marklogic.appdeployer.ConfigDir to provide a reference to this new temporal config directory.

from ml-app-deployer.

rjrudin avatar rjrudin commented on July 1, 2024

Addressed in other ticket / pull request

from ml-app-deployer.

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.