Hi, datetime field get converted in object and can't pass to any kind of pipe:
protected function setup()
{
$this->src('sqlserver')
->query("
SELECT mydatetimefield, textfield FROM mytable
")
->pipe(new TimeBucket(array("mydatetimefield"=>"quarter")))
->pipe(new Group(array("by"=>"mydatetimefield")))
->pipe($this->dataStore('amb_mod'));
}
Here comes the error:
Fatal error: Uncaught exception 'Exception' with message 'DateTime::construct() expects parameter 1 to be string, object given __
Printing out the $data received by timebucket results in something like this:
Array (
[mydatetimefield] => DateTime Object
(
[date] => 2018-03-09 00:00:00.000000
[timezone_type] => 3
[timezone] => Europe/Belgrade
)
[textfield ] => 'text field content'
)