Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clue/86c3cbdc10ecf49d444f61768034856a to your computer and use it in GitHub Desktop.
Save clue/86c3cbdc10ecf49d444f61768034856a to your computer and use it in GitHub Desktop.
using transformer in between (mysql, clickhouse)
$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