Dependent Fields: Examples

A dependent field is a data attribute that relies on another field for its generation or calculation. Lets explore the handling of dependent fields through a user interface, by using examples provided.

Handling Dependent Fields:

Users interact with a graphical interface to manage dependent fields. For instance, let's consider the mathematical expression:

1. Mathematical Expression:

Imagine you have columns named A, B, C, and D.

  • Expression 1: "A + (B * C) / 12"

    This means take the values in A, B, and C columns, do some math, and get a result.

  • Expression 2: "A**2 + B / C"

    It involves squaring A, adding B, and then dividing by C.

2. Sub-string Relation:

This feature facilitates the establishment of relationships between string columns, specifically focusing on substrings. Consider the example where the "Email" column is related to "First Name," "Last Name," and "National ID"

  • Example Expression: "{First Name,0-1}.{Last Name, A}{National ID,0-3}@gmail.com"

Breakdown:

  • Each {} block signifies a distinct column.

  • The second part within {} dictates indexes or 'A' for all values.

  • The provided example demonstrates the use of substrings from specified columns to construct email addresses.

The first letter of First Name, all of Last Name, and the first three characters of National ID contribute to creating an email.

Sample Data:

First Name
Last Name
National ID
Email

John

Doe

ASF025586

Robert

Smith

BDG02582

3. Using Different Parts of a Column:

Let's say you have a column called Full Name.

  • Example Expression: "{Full Name, S, (A,0-1), D}{National ID,0-3}@gmail.com"

    Breakdown:

    • Split Full Name using a space (S).

    • Take the first letter (0-1) and join it with a dot (D).

    • Then, add the first three characters of National ID and create an email.

Symbolic delimiters play a pivotal role in substring relations, offering flexibility in data splitting and joining. Some available delimiters include:

  • A: @ (At)

  • AS: * (Asterisk)

  • B: / (Forward Slash)

  • D: . (Dot)

  • H: - (Hyphen)

  • P: + (Plus Sign)

  • S: (Space)

  • U: _ (Underscore)

Sample Data:

Full Name
National ID
Email

John Doe

ASF025586

Robert Smith

BDG02582

4. Random Email Generation:

To regenerate emails from specified fields, If you have columns like First Name, Last Name, and Date_of_Birth.

  • Example Expression: "First Name|Last Name|Date_of_Birth"

    • Use these fields to generate an email.

Sample Result:

First Name
Last Name
Date_of_Birth
Email

Jon

Parsons

1999-11-09

Thomas

Harris

1979-11-23

5. Two-One Relation:

The Two-One Relation feature allows the concatenation of two columns to be equivalent to a third column. For instance suppose you have columns like First Name, Last Name, and Full Name.

  • Example Expression: "(First Name, Last Name, S)"

    • Combine First Name and Last Name with a space in between.

In this scenario, "First Name" and "Last Name" are concatenated using the 'S' delimiter (space) to generate the "Full Name" column. Any modification in one of these three columns triggers a recalculation in the others, maintaining consistency in the dataset.

Sample Data:

First Name
Last Name
Full Name

Jon

Parsons

Jon Parsons

Thomas

Harris

Thomas Harris

These examples illustrate how to use expressions to create relationships between different columns, making data processing more flexible and dynamic.

Last updated