Between Time

This transform allows you to select the start time and end time to return the dataset for the selected duration.(e.g., 9:00-9:30 AM).

tags: [“EDA”]

Parameters

The table gives a brief description about each parameter in between time transform.

Name:

By default, the transform name is populated. You can also add a custom name for the transform.

Input Dataset:

The file name of the input dataset. You can select the dataset that was uploaded from the drop-down list. (Required: True, Multiple: False)

Output Dataset:

The file name with which the output dataset is created returning the dataset for the selected duration. (Required: True, Multiple: False)

timestamp field:

The name of the timestamp field in the dataset. (Required: True, Multiple: False, Datatypes: [“TIMESTAMP”], Options: [“FIELDS”], Datasets: [“df”])

start_time:

The time from which the filter limit is applicable. (format 00:00). (Required: True, Multiple: False, Datatypes: [“STRING”], Options: [“CONSTANT”])

end_time:

The time up to which the filter limit is applicable. (format 00:00). (Required: True, Multiple: False, Datatypes: [“STRING”], Options: [“CONSTANT”])

include_start:

Indicates whether the start time needs to be included in the result. Possible values:

  • 0 - Excludes the start time from the result.

  • 1- Includes the start time in the result. (Required: True, Multiple: False, Datatypes: [“LONG”] , Options: [“CONSTANT”], Constant_options: [0,1])

include_end:

Indicates whether the end time needs to be included in the result. (Required: True, Multiple: False, Datatypes: [“LONG”] , Options: [“CONSTANT”], Constant_options: [0,1])

Sample input for Between Time transform:

../../../_images/betweentime.png

The output after running the Between time transform on the dataset appears as below:

../../../_images/betweetime_output_new.png

How to use it in Notebook

The following is the code snippet you must use in the Jupyter Notebook editor to run the Between Time transform:

template=TemplateV2.get_template_by('Between Time')

recipe_Between_Time= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='Between Time')

transform=Transform()
transform.templateId = template.id
transform.name='Between Time'
transform.variables = {
'input_dataset':'temperature',
'output_dataset':'temperature_betweentime',
'timestamp':"Datetime",
'value_1':"0:30",
'value_2':"8:30",
'value_3':0,
'value_4':0}
recipe_Between_Time.add_transform(transform)
recipe_Between_Time.run()

Requirements

pandas datetime