ContributionsMost RecentMost LikesSolutionsRe: Changing the key names dynamically Thank you koryknick that works. Join array of Objects Hi , I have a requirement to join the array1 with array2 in the same document and fetch one column from array 2 into array1 if condition matches. I can do it by splitting the arrays and join them back again. I would like to to know if i can do it in minimal way using expression language? please help studySiteId from array1 should match with studySiteId in array2 and get studySiteReferenceValue from array2 and put it in array1 with key value pair. if not matches put studySiteReferenceValue as null INPUT [ { "Array1" : [ { "Study": "D123", "studySiteNumber":"123", "studySiteId":806, "countryCode":"BR" }, { "Study": "D124", "studySiteNumber":"0820", "studySiteId":807, "countryCode":"BR" } ], "Array2" : [ { "isRefFound":true, "studySiteId":806, "studySiteReferenceTypeId":100, "studySiteReferenceValue":"0SI000000006E06", "sourceSystemId":22, "etlIsDeletedFlg":false }, { "isRefFound":true, "studySiteId":8088, "studySiteReferenceTypeId":100, "studySiteReferenceValue":"0SI000000006E06", "sourceSystemId":22, "etlIsDeletedFlg":false } ] } ] OUTPUT: [ { "Array1" : [ { "Study": "D123", "studySiteNumber":"123", "studySiteId":806, "countryCode":"BR", "studySiteReferenceValue":"0SI000000006E06" }, { "Study": "D124", "studySiteNumber":"0820", "studySiteId":807, "countryCode":"BR", "studySiteReferenceValue":"" } ], "Array2" : [ { "isRefFound":true, "studySiteId":806, "studySiteReferenceTypeId":100, "studySiteReferenceValue":"0SI000000006E06", "sourceSystemId":22, "etlIsDeletedFlg":false }, { "isRefFound":true, "studySiteId":8088, "studySiteReferenceTypeId":100, "studySiteReferenceValue":"0SI000000006E06", "sourceSystemId":22, "etlIsDeletedFlg":false } ] } ] Changing the key names dynamically Hi, I have a requirement where we need to read 50 tables from oracle and put the data to postgres. there is no transformation logic in between . But issue is while loading to target the column names are slightly changing. for an instance , src_table1 { "id" : 1, "name" : "abc", "del_ind" true } While loading the above data to target i need to change the column names . The above json keys needs to be changed while loading to target as target table column names are different. src_col corresponding_tgt_col id id name full_name del_ind delete_indicator Like this I have 50 tables i cant create 50 mappers to map the column names for each table. I need to have a expression language to change the field names accordingly . right now i am maintaining a config file which contains all the information to parameterize everything. src tblename, tgt table name ,src schema, tgt schema,srcaccount,tgt account everything comes from my parent pipeline. all set but, while changing the column names I am struggling to write a expression . please help! SolvedRe: Smartsheet rest api pagination Thank you! Some How it is not fetching the last page data. I had to change Has next url to something like below: $entity.rows.length==100. so that it loops till the rows are 100. if rows array is not 100, which means there is no further data. Thanks for the Help! Smartsheet rest api pagination Hi , We are integrating smartsheet rest api’s in snaplogic. We get only totalrecordscount in the response. there is no other things comes up in response. I need to apply pagination . In paramters i can use page and pageSize . Page is something which page we want to access and pageSize is 100 by default. These 2 paramters are not part of the response. I am not sure how I can create hasNext and nextUrl to paginate and fetch all 77k records. I am attaching the screenshots of rest snap settings .I am unable to loop. it is like never ending. please suggest. https://smartsheet.redoc.ly/tag/reports#operation/getReport offset is a parameter i gave as 0 for incrementing in nexUrl page Re: Transform Array to New array actually this works only if we have covers. I got into another problem now. I am pasting INPUT and OUTPUT here. could you please on how we can transform this. I used json generator to transform but no luck. @AleksandarAngelevski INPUT: { “summary”: { “airtimeEnabledInsuranceProductCode”: { “cover”: [ { “needCode”: “Illness”, “needKindName”: “Hospital Illness”, “autoBoostCoverAmount”: { “amount”: 25, “currencyCode”: “XAF” }, “coverAmount”: { “amount”: 0, “currencyCode”: “XAF” } }, { “needCode”: “Accident”, “needKindName”: “Hospital Accident”, “autoBoostCoverAmount”: { “amount”: 25, “currencyCode”: “XAF” }, “coverAmount”: { “amount”: 0, “currencyCode”: “XAF” } }, { “needCode”: “Life”, “needKindName”: “Life”, “autoBoostCoverAmount”: { “amount”: 25, “currencyCode”: “XAF” }, “coverAmount”: { “amount”: 0, “currencyCode”: “XAF” } } ], “policyNumber”: “1234567”, “policyStatus”: “Not Taken Up”, “productCode”: “Airtime Enabled”, “coverAmountSegments”: [ { “startDate”:“2022-03-20T00:00:00”, “endDate”:“2022-09-19T00:00:00”, “sumAssured”:{ “amount”:10000.0, “currencyCode”:“XAF” } }, { “startDate”:“2022-03-20T00:00:00”, “endDate”:“2022-09-19T00:00:00”, “sumAssured”:{ “amount”:5000.0, “currencyCode”:“XAF” } }], “coverStatus”: { “loyalty”: “ACTIVE”, “autoBoost”: “ACTIVE”, “prepaid”: “ACTIVE” } }, “bonusAmount”: { “amount”: 2.50, “currencyCode”: “GHS” }, “bonusAmountRequiredToConvert”: { “amount”: -155.50, “currencyCode”: “XAF” }, “consents”: [ { “agreementReference”: “0006978665”, “content”: “Recharge With Care”, “reference”: “2150000059599412”, “response”: “NO-RESPONSE”, “type”: “Recharge With Care Policy Change” } ], “memberId”: “2320000000000”, “kycInfo”: { “kycStatus”: true, “kycConfirmation”: false }, “language”: “English” } } OUTPUT: { “products”: [ { “type”: “aYo Airtime Enabled”, “policyNumber”: “1234567”, “policyStatus”: “Not Taken Up”, “attributes”: [ { “name”: “Game Level”, “value”: “1” } ], “postPaidCover”: [ { “needCode”: “Illness”, “needKindName”: “Hospital Illness”, “rates”: [ { “type”: “autoBoostCoverAmount”, “amount”: { “value”: 25, “currencyCode”: “XAF” } }, { “type”: “Cover Amount”, “amount”: { “value”: 0.00, “currencyCode”: “XAF” } } ] }, { “needCode”: “Accident”, “needKindName”: “Hospital Accident”, “rates”: [ { “type”: “autoBoostCoverAmount”, “amount”: { “value”: 25, “currencyCode”: “XAF” } }, { “type”: “Cover Amount”, “amount”: { “value”: 0.00, “currencyCode”: “XAF” } } ] }, { “needCode”: “Life”, “needKindName”: “Life”, “rates”: [ { “type”: “autoBoostCoverAmount”, “amount”: { “value”: 25, “currencyCode”: “XAF” } }, { “type”: “Cover Amount”, “amount”: { “value”: 0.00, “currencyCode”: “XAF” } } ] } ], “prepaidCover”: [ { “startDate”: “2022-03-20T00:00:00”, “endDate”: “2022-09-19T00:00:00”, “amount”: { “value”: 100000.0, “currencyCode”: “GHS” } } ] } ], “consents”: [ { “agreementReference”: “0006978665”, “content”: “Recharge With Care”, “reference”: “2150000059599412”, “response”: “NO-RESPONSE”, “type”: “Recharge With Care Policy Change” } ], “bonus”: [ { “type”: “bonusAmount”, “amount”: 2.50, “currencyCode”: “GHS” }, { “type”: “requiredToConvert”, “amount”: -155.50, “currencyCode”: “GHS” } ], “memberId”: “2320000000000”, “kycInfo”: { “kycStatus”: true, “kycConfirmation”: false }, “language”: “English” } Re: Transform Array to New array Hi @AleksandarAngelevski Both Works.The first method is kind of hard coded one. We need to lookup on coveraount. it yes we need to proceed else create a empty array. Second one is working fine for me. I appreciate your help in this regards Transform Array to New array I have a requirement where I need to convert an array into new array . Below is the example . INPUT: { “cover”: [ { “needCode”: “abc”, “needKindName”: “abc xyz”, “autoBoostCoverAmount”: { “amount”: 25, “currencyCode”: “XAF” }, “coverAmount”: { “amount”: 0, “currencyCode”: “XAF” } }, { “needCode”: “ttt”, “needKindName”: “abc ttt”, “autoBoostCoverAmount”: { “amount”: 25, “currencyCode”: “XAF” }, “coverAmount”: { “amount”: 0, “currencyCode”: “XAF” } }, { “needCode”: “rrr”, “needKindName”: “abc rrr”, “autoBoostCoverAmount”: { “amount”: 25, “currencyCode”: “XAF” }, “coverAmount”: { “amount”: 0, “currencyCode”: “XAF” } } ] } OUTPUT { “ppCover”: [ { “needCode”: “abc”, “needKindName”: “abc xyz”, “rates”: [ { “type”: “Cover Amount”, “amount”: { “value”: 0.00, “currencyCode”: “xaf” } } ] }, { “needCode”: “ttt”, “needKindName”: “abc ttt”, “rates”: [ { “type”: “Cover Amount”, “amount”: { “value”: 0.00, “currencyCode”: “xaf” } } ] }, { “needCode”: “rrr”, “needKindName”: “abc rrr”, “rates”: [ { “type”: “Cover Amount”, “amount”: { “value”: 0.00, “currencyCode”: “xaf” } } ] } ] } Step 1: Cover needs to be renamed as “ppCover” Step2: Create a new array of objects called rates inside ppcover array . Step3: field type inside the rates array is “coverAmount” as we have the coverAmount object in Input .if there is no coverObject in the input then it should be empty please help how we can manage this using map function. @bojanvelevski In case if you could help us. Re: Looping through Api call Thanks @bojanvelevski you are a Savior. It works! Looping through Api call Hi We have a requirement where, If we do an api call , we get response something like below { records_remaining : “200”, records_processed: “100”, failed: “0” }, “entity”: [ "rec1: “abc”, “rec2”:“xyz” ] Pagination does not support by Api . we need to wait for 10 sec for every api call until we get records_remaining is 0 for example https:abc.com/8080/getfullload?batch=50 -----> wait for 10 sec and do the same call until we get records remainining to 0 @bojanvelevski Any best way we can achieve this? please help! Solved