Hi,
I have 2 documents with names “first” and “second” residing in different buckets “default” and “cache” respectively.
bucket: default , document name:first
{
"services": [
{
"serviceId": "ABC",
"serviceType": "AAA"
},
{
"serviceId": "CDE",
"serviceType": "BBB",
"serviceLocation": {
"cityName": "Singapore",
"countryName": "Singapore"
}
},
{
"serviceId": "FGH",
"serviceType": "CCC",
"serviceLocation": {
"cityName": "Sydney",
"countryName": "Australia"
}
}
]
}
bucket: cache , document name:second
{
"availabilityInfo": [
{
"serviceId": "CDE",
"availability": 99.8,
"starttime": "11111222",
"endtime": "11113333"
},
{
"serviceId": "FGH",
"availability": 99.7,
"starttime": "11111222",
"endtime": "11113333"
}
]
}
how to create a n1q1 query with left join to retrieve the following output, please assist.
{
"services": [
{
"serviceId": "ABC",
"serviceType": "AAA"
},
{
"serviceId": "CDE",
"serviceType": "BBB",
"serviceLocation": {
"cityName": "Singapore",
"countryName": "Singapore"
},
"availabilityInfo": {
"availability": 99.8,
"starttime": "11111222",
"endtime": "11113333"
}
},
{
"serviceId": "FGH",
"serviceType": "CCC",
"serviceLocation": {
"cityName": "Sydney",
"countryName": "Australia"
},
"availabilityInfo": {
"availability": 99.7,
"starttime": "11111222",
"endtime": "11113333"
}
}
]
}