arc-deltaperiod-config-plugin


License

License

MIT
Categories

Categories

config Application Layer Libs Configuration Tape Data Data Structures
GroupId

GroupId

ai.tripl
ArtifactId

ArtifactId

arc-deltaperiod-config-plugin_2.11
Last Version

Last Version

1.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

arc-deltaperiod-config-plugin
arc-deltaperiod-config-plugin
Project URL

Project URL

https://arc.tripl.ai
Project Organization

Project Organization

ai.tripl
Source Code Management

Source Code Management

https://github.com/tripl-ai/arc-deltaperiod-config-plugin

Download arc-deltaperiod-config-plugin_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/ai.tripl/arc-deltaperiod-config-plugin_2.11/ -->
<dependency>
    <groupId>ai.tripl</groupId>
    <artifactId>arc-deltaperiod-config-plugin_2.11</artifactId>
    <version>1.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/ai.tripl/arc-deltaperiod-config-plugin_2.11/
implementation 'ai.tripl:arc-deltaperiod-config-plugin_2.11:1.2.0'
// https://jarcasting.com/artifacts/ai.tripl/arc-deltaperiod-config-plugin_2.11/
implementation ("ai.tripl:arc-deltaperiod-config-plugin_2.11:1.2.0")
'ai.tripl:arc-deltaperiod-config-plugin_2.11:jar:1.2.0'
<dependency org="ai.tripl" name="arc-deltaperiod-config-plugin_2.11" rev="1.2.0">
  <artifact name="arc-deltaperiod-config-plugin_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='ai.tripl', module='arc-deltaperiod-config-plugin_2.11', version='1.2.0')
)
libraryDependencies += "ai.tripl" % "arc-deltaperiod-config-plugin_2.11" % "1.2.0"
[ai.tripl/arc-deltaperiod-config-plugin_2.11 "1.2.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.12
com.typesafe : config jar 1.3.1

provided (2)

Group / Artifact Type Version
ai.tripl : arc_2.11 jar 2.10.0
org.apache.spark : spark-sql_2.11 jar 2.4.5

test (1)

Group / Artifact Type Version
org.scalatest : scalatest_2.11 jar 3.0.7

Project Modules

There are no modules declared in this project.

arc-deltaperiod-config-plugin creates a list of formatted dates to easily calculate data processing periods.

Documentation

To use the plugin specify a return format, the lag and lead days and a variable name to return. This example will create a string like 2019-07-01,2019-07-02,2019-07-03,2019-07-04,2019-07-05,2019-07-06,2019-07-07,2019-07-08,2019-07-09,2019-07-10,2019-07-11,2019-07-12. Optionally currentDate can be specified in the same format as the formatter to specify a deterministic date for testing.

This string can then be used with the glob processing capabilities of Spark to read a subset of input files:

{
  "plugins": {
    "config": [
      {
        "type": "DeltaPeriodDynamicConfigurationPlugin",
        "environments": [
          "production",
          "test"
        ],
        "returnName": "ETL_CONF_DELTA_PERIOD",
        "lagDays": 10,
        "leadDays": 1,
        "formatter": "uuuu-MM-dd"
      }      
    ]
  },
  "stages": [
    {
      "type": "ParquetExtract",
      "name": "test",
      "description": "test",
      "environments": [
        "production",
        "test"
      ],
      "inputURI": "/tmp/customer/{"${ETL_CONF_DELTA_PERIOD}"}/*.parquet",
      "outputView": "test"
    }
  ]
}

Authors/Contributors

License

Arc is released under the MIT License.

ai.tripl

tripl.ai

Versions

Version
1.2.0
1.1.0
1.0.1
1.0.0