GithubHelp home page GithubHelp logo

Add validation to Views about gaffer HOT 2 CLOSED

gchq avatar gchq commented on August 25, 2024
Add validation to Views

from gaffer.

Comments (2)

p013570 avatar p013570 commented on August 25, 2024

Migration Steps

Views no longer require properties or identifiers to be provided. Instead they just require transient properties (along with filterFunctions and transformFunctions).

Views will now be validated before an operation is executed to ensure it is valid against the graph schema.

So a valid view now looks like this:

"view": {
  "entities": {
    "summaryGroup": {
      "transientProperties": {
        "average": "java.lang.Float"
      },
      "filterFunctions": [
        {
          "function": {
            "class": "gaffer.function.simple.filter.IsMoreThan",
            "value": 5
          },
          "selection": [
            {
              "key": "count"
            }
          ]
        }
      ],
      "transformFunctions": [
        {
          "function": {
            "class": "gaffer.example.function.transform.Average"
          },
          "selection": [
            {
              "key": "count"
            },
            {
              "key": "sum"
            }
          ],
          "projection": [
            {
              "key": "average"
            }
          ]
        }
      ]
    }
  }
}

this would only be valid as long as the corresponding schema defines properties "count" and "sum"

from gaffer.

a09631 avatar a09631 commented on August 25, 2024

Merged into develop.

from gaffer.

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.