I am using page 28 of this doc for reference: https://resources.docs.salesforce.com/200/latest/en-us/sfdc/pdf/bi_dev_guide_saql.pdf
I need to change the time zone in the step. I am trying to use the computeExpression action to handle it. Here is the code I tried:
"CreatedDate_Hour_3": {
"datasets": [
{
"id": "0Fb32000000TVRzCAO",
"label": "Case_Article_Survey",
"name": "Case_Article_Survey",
"url": "/services/data/v38.0/wave/datasets/0Fb32000000TVRzCAO"
}
],
"isFacet": true,
"isGlobal": false,
"query": {
"pigql": "q = load \"Case_Article_Survey\";\r\nq = group q by 'CreatedDate_Hour';\r\nq = foreach q generate 'CreatedDate_Hour' as 'CreatedDate_Hour', count() as 'count';\r\nq = order q by 'CreatedDate_Hour' asc;\r\nq = limit q 2000;",
"measures": [
[
"count",
"*",
"count"
]
],
"action": "computeExpression",
"parameters": {
"source": "CreatedDate_Hour",
"mergeWithSource": true,
"computedFields": [
{
"name": "CreatedDate_Hour_adjusted",
"type": "Datetime",
"format": "MM/dd/yyyy HH:mm:ss",
"saqlExpression": "toDate(CreatedDate_Hour - 8*3600)"
}
]
},
"measuresMap": {},
"autoFilter": true,
"groups": [
"CreatedDate_Hour"
]
},
"selectMode": "single",
"type": "aggregateflex",
"useGlobal": false,
"visualizationParameters": {
"options": {}
}
},
This code is not subtracting 8 hours from CreatedDate_Hour.