Exercise - Create New Fields

Now that you’ve learned how to define your schema and have created new fields using field-building functions, let’s try some on your own

Exercise 1 - Add new field - offered_approved_delta

In our first exercise, let's create a new field using our field build functions.

Can you create a field that will hold the delta between the "offered_amount" and "approved_amount"?

  • Bonus - as this is a numeric field, can you also create a segmentation for this field?

In the next exercise, we will create another field so hold-on on backfilling until all the new fields are ready.

See Solution

Create Field

  1. In the "Configurations Page" under the "Fields" tab, Click on “add field”.
  2. Add a name - we will call this field “offered_approved_delta”.
  3. Under "type", choose "numeric".
  4. Under “function” we will choose the “delta” function and add the 2 sources - “offerd_amount” and “approved_amount”.
  5. When all is set we will click on "add field" to save it.
1190

Add Segmentation

  1. Under “segmentation” add a new segmentation.
  2. Choose the type - either by "bucket size", by "number of buckets", as a "logarithmic scale", or "discrete".
1459

Exercise 2 - Use this field to create another field - offered_approved_delta_normalized

Now that you created "offered_approved_delta", use this field to create another new field.
Can you create a normalized delta field for offered and approved amounts? Normalized in this case means divided by the offered amount.

See Solution

Create Field

Use the previous field to create another field.

  1. In the "Configurations Page" under the "Fields" tab, Click on “add field”.
  2. Add a name - we will call this field “offered_approved_delta_normalized”.
  3. Under "type", we will choose "numeric".
  4. Under "function" we will choose "divide".
  5. Under "sources", we will add "offered_approved_delta" as the first source and "offered_amount" as the second.
  6. When all is set we will click on "add field" to save it.
1192

Add Segmentation

  1. Under “segmentation” add a new segmentation.
  2. Choose the type - either by "bucket size", by "number of buckets", as a "logarithmic scale", or "discrete".
    As this is a normalized field, the values range from 0 to 1, so 20 buckets of 0.5 in size would work well here.
2348

📘

Backfill your data

Once both fields are created, you should now backfill the data in order for the new fields to be written in the data.

References:
Field Build Functions