GithubHelp home page GithubHelp logo

Comments (4)

cerveada avatar cerveada commented on August 17, 2024

The SaveMode.Ignore works the similar way as CREATE TABLE IF NOT EXISTS in sql. The data are stored only when the target destination is empty (the file doesn't exist for example), otherwise the write is just ignored.

The problem is to get the information which of those two happend. The best way to do it seems to be write metric numFiles. This seems to work, but not for every source. For example Excel source doesn't produce any metrics at all. To deal with this there should be warning when the information is not there and the write will be ignored by spline as well.

from spline-spark-agent.

wajda avatar wajda commented on August 17, 2024

It seems to me that we are dealing with false positive vs false negative dilemma. If we treat absence of change metrics are ignored write we might loose some lineage information. Otherwise we might record lineages that did not actually happen.
What if we make this strategy configurable in the agent, so the user can decide which (mis)behavior is more tolerable for his needs?
E.g.

spline.ignored_write_detection_strategy=BY_METRICS_ABSENCE | BY_METRICS_ZERO

from spline-spark-agent.

cerveada avatar cerveada commented on August 17, 2024

When metric is absent we still always want to ignore by metric zero. What about:
spline.ignored_write_metrics_missing_action=IGNORE_WRITE | CAPTURE_WRITE

from spline-spark-agent.

wajda avatar wajda commented on August 17, 2024

let's do it even cleverer, using a future-proof approach. Let's use a strategy pattern for the ignore write detection logic with the built-in default implementation. And the property we are are discussing will then be a property of the default implementation. Hence the hierarchical configuration (spline -> strategy -> impl -> property):

spline.iwd_strategy.default.on_missing_metrics=IGNORE_LINEAGE | CAPTURE_LINEAGE

If somebody wants to override it with say com.foo.MyIWDStrategy then the config would look like

class MyIWDStrategy extends IWDStragery {
  override val name = "myImpl"
  def propFoo = ???
  def propBar = ???
}
spline.iwd_strategy.class = com.foo.MyIWDStrategy
spline.iwd_strategy.myImpl.propFoo = ...
spline.iwd_strategy.myImpl.propBar = ...

from spline-spark-agent.

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.