ShowAll Questionssorted byDate Posted
Shilpa S 33

# Determine Optimal Climates

{ "Add Temp Class": { "action": "computeExpression", "parameters": { "source": "Define Temp Range", "mergeWithSource": true, "computedFields": [ { "defaultValue": "Continental", "name": "TempClass", "saqlExpression": "case \nwhen LowTemp < 25 and HighTemp < 25 then \"Polar\" \nwhen LowTemp >= 25 and LowTemp <= 50 and HighTemp >= 25 and HighTemp <= 50 then \"Cool\"\nwhen LowTemp >= 51 and LowTemp <= 85 and HighTemp >= 51 and HighTemp <= 85 then \"Continental\"\nwhen LowTemp > 85 and HighTemp > 85 then \"Tropical\"\nwhen LowTemp < 25 and (HighTemp >= 25 and HighTemp <= 50) then \"Polar-Cool\" \nwhen LowTemp < 25 and (HighTemp >= 25 and HighTemp <= 85) then \"Polar-Cool-Continental\" \nwhen LowTemp < 25 and HighTemp > 85 then \"Polar-Cool-Continental-Tropical\" \nwhen (LowTemp >= 25 and LowTemp <= 50) and (HighTemp >= 51 and HighTemp <= 85) then \"Cool-Continental\" \nwhen (LowTemp >= 25 and LowTemp <= 50) and HighTemp >= 85 then \"Cool-Continental-Tropical\" \nwhen (LowTemp >= 51 and LowTemp <= 85) and HighTemp > 85 then \"Continental-Tropical\" \nend", "label": "TempClass", "type": "Text" } ] } }, "Calculate Acreage": { "action": "computeExpression", "parameters": { "source": "Load Seed Chart", "mergeWithSource": true, "computedFields": [ { "precision": 18, "name": "Acreage", "saqlExpression": "(Seeds_Pound*Spacing)/6272640", "scale": 6, "label": "Acreage", "type": "Numeric" } ] } }, "Create Seed Bank": { "action": "sfdcRegister", "parameters": { "name": "Seed Bank", "alias": "Seed_Bank", "source": "CleanUp" } }, "Load Seed Chart": { "action": "edgemart", "parameters": { "alias": "Seed_Chart" } }, "Augment Temp Class": { "action": "augment", "parameters": { "left": "Add Temp Class", "right": "Load Temp Class Mapping", "relationship": "Climate", "operation": "LookupSingleValue", "left_key": [ "TempClass" ], "right_key": [ "TempKey" ], "right_select": [ "TempClass" ] } }, "Load Temp Class Mapping": { "action": "edgemart", "parameters": { "alias": "Temperature_Classes_Mapping" } }, "CleanUp": { "action": "sliceDataset", "parameters": { "mode": "drop", "source": "Augment Temp Class", "fields": [ { "name": "LowTemp" }, { "name": "HighTemp" } ] } }, "Define Temp Range": { "action": "computeExpression", "parameters": { "source": "Calculate Acreage", "mergeWithSource": true, "computedFields": [ { "defaultValue": "0", "precision": 18, "name": "LowTemp", "saqlExpression": "string_to_number(substr(Temperature,1,2))", "scale": 2, "label": "LowTemp", "type": "Numeric" }, { "defaultValue": "0", "precision": 18, "name": "HighTemp", "saqlExpression": "string_to_number(substr(Temperature,4,5))", "scale": 2, "label": "HighTemp", "type": "Numeric" } ] } } }