This file contains hidden or 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
SELECT q1.accommodation_provider_id, | |
email, | |
name | |
FROM | |
(SELECT accommodation_provider_id, | |
field_value AS email | |
FROM | |
(SELECT id, | |
accommodation_provider_id, | |
event_name, |
This file contains hidden or 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
{ | |
"jsonpaths": [ | |
"$.id", | |
"$.event_name", | |
"$.accommodation_provider_id", | |
"$.field", | |
"$.value", | |
"$.timestamp" | |
] | |
} |
This file contains hidden or 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
{ | |
"jsonpaths": [ | |
"$.id", | |
"$.event_name", | |
"$.accommodation_provider_id", | |
"$.field", | |
"$.value", | |
"$.timestamp" | |
] | |
} |
This file contains hidden or 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
COPY ap_domain_profile_events FROM 's3://bucket/<manifest>' CREDENTIALS 'aws_iam_role=arn:aws:iam::<aws-account-id>:role/<role-name>' MANIFEST json 's3://bucket/jsonpath/ap_domain_events.path.json' region 'eu-west-1'; |
This file contains hidden or 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
CREATE TABLE ap_domain_profile_events ( | |
id varchar(100), | |
event_name varchar(200), | |
accommodation_provider_id varchar(100), | |
field_name varchar(250), | |
field_value varchar(500), | |
created_at timestamp | |
); |
This file contains hidden or 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
'use strict'; | |
const delimiter = "\n"; | |
const utils = require('./utils.js'); | |
function transform(item) { | |
// don't worry about this utils function, just look at transformProfile is doing, | |
// receiving the streamData and creating an array of object literals with the atomic facts | |
// we want to store | |
return utils.arrayObjectToString(transformProfile(item), delimiter); |
This file contains hidden or 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
'use strict'; | |
const index = require('./index.js'); | |
const payloadFromUniplaces = { | |
"id": "57524918-54c7-4244-8d43-7144ccc5011a", | |
"event_name": "accommodation_provider_profile_updated", | |
"accommodation_provider_id": "cbc884c3-cb55-4f5d-a0a5-8eb598684f11", | |
"profile": { | |
"name": "miguel", |
This file contains hidden or 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
<?php | |
/** | |
* AccommodationProviderProfileToDataStreamListener | |
*/ | |
class AccommodationProviderProfileToDataStreamListener | |
{ | |
/** | |
* @param AccommodationProviderBasicInfoUpdatedEvent $accommodationProviderEvent | |
*/ |
This file contains hidden or 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
{ | |
"account_id": "05702bde-e3e9-4fa3-a11e-bac472a69db8", | |
"basic_info": "{\"name\":\"Miguel\",\"email_address\":{\"email_address\":\"[email protected]\",\"type\":\"work\"}}", | |
"created": "{\"by\":{\"type\":\"person\",\"subtype\":\"agency-staff\",\"id\":\"c4f8a449-e69e-484a-a277-939b0a1a1e63\"},\"at\":\"2017-05-04 11:12:08\"}", | |
"id": "6edcdcc3-12be-4cf7-8abb-865f291b7ace", | |
} |
This file contains hidden or 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
<?php | |
namespace Uniplaces\AccommodationBundle\Domain\AccommodationProvider; | |
use Uniplaces\AccommodationBundle\Domain\AccommodationProvider\Id\AccommodationProviderId; | |
use Uniplaces\AccommodationBundle\Domain\AccommodationProvider\BasicInfo\AccommodationProviderBasicInfo; | |
use Uniplaces\AgencyBundle\Domain\Staff\Id\AgencyStaffId; | |
use Uniplaces\UserBundle\Domain\Account\Id\AccountId; | |
use Uniplaces\UserBundle\Domain\Authored\Person\AgencyStaffAuthored; | |
use Uniplaces\UserBundle\Domain\Authored\StandardizedAuthored; |
NewerOlder