Derived Datetime-based Attribution

Skip to end of metadata
Go to start of metadata

Description

Deriving datetime-based attribution from a single date makes for more meaningful and usable guided navigation and analytics. This very straightforward pattern explains how to use a simple reformatter transform to derive a wide variety of additional attribution.

Given a single input date string, this sample pattern currently generates the following attribution:

  • Year
  • Month
  • Day
  • MinutesAgo
  • HoursAgo
  • MonthsAgo
  • DaysAgo
  • YearsAgo
  • DayOfWeek
  • EpochDate

Pattern

INPUT FILE (date.txt):

We apply a format mask to our DateField via the input metadata, eg.

then simply run this data through a reformatter transformation that can create the variety of attribution for us on the output edge as illustrated by our sample DerivedDateTimeBasedAttribution graph:

which has the following transform logic, as seen in both GUI and CTL form:

Example Graph

Here is a snippet from the completed graph:

To test in your own environment:

  1. Create a new graph and copy and paste the graph snippet from above within <Graph> </Graph> on Source tab
  2. Copy the input file above into: ${DATAIN_DIR}/date.txt  (make sure file ends with an empty line)
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Oracle community and they might not be employed or in any way formally affiliated with Oracle. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Oracle nor any other party necessarily agrees with them.