Forked from davor010/gist:41ddf289c4155bce8daa8960d4cf885b
Created
February 17, 2020 09:50
-
-
Save clue/86c3cbdc10ecf49d444f61768034856a to your computer and use it in GitHub Desktop.
using transformer in between (mysql, clickhouse)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$promise = new React\Promise\FulfilledPromise(1); | |
$transformer = new ThroughStream(function ($data) { | |
return array('id' => $data['id'], 'stocknummer' => $data['id'], 'dealer_id' => $data['id'], '_vnr' => 1, '_checksum' => sha1(json_encode($data)), '_timestamp' => date('Y-m-d h:i:s')); | |
}); | |
//try to change in Client class add _vnr, _checksum and _timestamp | |
$source->pipe($transformer)->pipe($stream); | |
//$source->pipe($stream); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment