How to dynamically pass array JSON as input to javascript adapters? - ibm-mobilefirst

My input data is given below. How do i parse this to send it from my app to the adapter. Help me out by giving some examples for PUT request and adapter sample code.
var data = {
"apps" : [{
"pkg" : "com.google.android.youtube",
"version" : 112753132
}, {
"pkg" : "com.motorola.motocare",
"version" : 2
}, {
"pkg" : "com.android.providers.telephony",
"version" : 22
}, {
"pkg" : "com.google.android.gallery3d",
"version" : 40301
}, {
"pkg" : "io.appium.settings",
"version" : 1
}, {
"pkg" : "com.google.android.googlequicksearchbox",
"version" : 300682618
}, {
"pkg" : "com.android.providers.calendar",
"version" : 22
}, {
"pkg" : "com.android.providers.media",
"version" : 800
}, {
"pkg" : "com.google.android.apps.docs.editors.docs",
"version" : 62731433
}, {
"pkg" : "com.google.android.onetimeinitializer",
"version" : 22
}, {
"pkg" : "com.xe.currency",
"version" : 101
}, {
"pkg" : "com.motorola.bug2go",
"version" : 0
}, {
"pkg" : "com.motorola.camera",
"version" : 50002104
}, {
"pkg" : "com.android.wallpapercropper",
"version" : 22
}, {
"pkg" : "com.sample.printer",
"version" : 1
}, {
"pkg" : "com.javacodegeeks.android.locationservicetest",
"version" : 1
}, {
"pkg" : "com.konylabs.WAI",
"version" : 1
}, {
"pkg" : "com.verizon.permissions.vzwappapn",
"version" : 1
}, {
"pkg" : "com.motorola.ccc.devicemanagement",
"version" : 1
}, {
"pkg" : "com.motorola.android.fmradio",
"version" : 22
}, {
"pkg" : "com.motorola.sensorhub.stml0.updater",
"version" : 3017003
}, {
"pkg" : "com.stgit.jumionative",
"version" : 1
}, {
"pkg" : "com.android.documentsui",
"version" : 22
}, {
"pkg" : "com.android.externalstorage",
"version" : 22
}, {
"pkg" : "com.android.htmlviewer",
"version" : 22
}, {
"pkg" : "com.javapapers.android.androidgps",
"version" : 1
}, {
"pkg" : "com.motorola.hotspotlauncher",
"version" : 1
}, {
"pkg" : "com.android.mms.service",
"version" : 22
}, {
"pkg" : "com.android.providers.downloads",
"version" : 22
}, {
"pkg" : "com.motorola.wappushsi",
"version" : 1
}, {
"pkg" : "com.motorola.android.sdm.plugins.connmo",
"version" : 1
}, {
"pkg" : "com.example.android.testing.espresso.BasicSample.test",
"version" : 0
}, {
"pkg" : "com.motorola.android.settings.diag_mdlog",
"version" : 4
}, {
"pkg" : "com.vzw.hss.myverizon",
"version" : 40
}, {
"pkg" : "com.android.browser.provider",
"version" : 22
}, {
"pkg" : "com.motorola.entitlement",
"version" : 22
}, {
"pkg" : "com.motorola.ccc.checkin",
"version" : 1
}, {
"pkg" : "com.motorola.programmenu",
"version" : 22
}, {
"pkg" : "com.handyapps.currencyexchange",
"version" : 56
}, {
"pkg" : "paxcreation.com.multipleviewinrecycleview",
"version" : 1
}, {
"pkg" : "com.motorola.ccc.mainplm",
"version" : 1
}, {
"pkg" : "com.motorola.motgeofencesvc",
"version" : 10001
}, {
"pkg" : "com.google.android.configupdater",
"version" : 22
}, {
"pkg" : "com.motorola.groundloopnoisepreventer",
"version" : 10101
}, {
"pkg" : "com.orgname.linkedIn",
"version" : 1
}, {
"pkg" : "com.motorola.ccc.cce",
"version" : 6
}, {
"pkg" : "com.motorola.ccc.ota",
"version" : 71000
}, {
"pkg" : "com.motorola.ccc.notification",
"version" : 1
}, {
"pkg" : "com.orgname.password",
"version" : 1
}, {
"pkg" : "com.android.defcontainer",
"version" : 22
}, {
"pkg" : "com.android.providers.downloads.ui",
"version" : 22
}, {
"pkg" : "com.android.vending",
"version" : 80750800
}, {
"pkg" : "com.android.pacprocessor",
"version" : 22
}, {
"pkg" : "com.motorola.pgmsystem2",
"version" : 22
}, {
"pkg" : "com.stgit.audio",
"version" : 1
}, {
"pkg" : "com.motorola.bodyguard",
"version" : 10257
}, {
"pkg" : "com.motorola.motodisplay.env",
"version" : 22
}, {
"pkg" : "com.joeykrim.rootcheck",
"version" : 136
}, {
"pkg" : "com.motorola.demomode",
"version" : 22
}, {
"pkg" : "com.android.certinstaller",
"version" : 22
}, {
"pkg" : "com.mobisystems.fileman",
"version" : 14500
}, {
"pkg" : "com.google.android.marvin.talkback",
"version" : 40501000
}, {
"pkg" : "com.motorola.android.sdm.plugins.diagmon",
"version" : 22
}, {
"pkg" : "com.InvokingAdapterProcedures",
"version" : 1
}, {
"pkg" : "android",
"version" : 22
}, {
"pkg" : "com.android.contacts",
"version" : 22
}, {
"pkg" : "com.motorola.android.provisioning",
"version" : 1
}, {
"pkg" : "com.vzw.apnservice",
"version" : 12
}, {
"pkg" : "com.motorola.vzw.phone.extensions",
"version" : 1
}, {
"pkg" : "com.google.android.apps.inputmethod.hindi",
"version" : 457
}, {
"pkg" : "com.android.stk",
"version" : 22
}, {
"pkg" : "com.AuthenticateFingerPrint",
"version" : 1
}, {
"pkg" : "com.orgname.PushNotification",
"version" : 1
}, {
"pkg" : "com.android.backupconfirm",
"version" : 22
}, {
"pkg" : "com.motorola.migrate",
"version" : 16044
}, {
"pkg" : "com.motorola.vzw.settings.extensions",
"version" : 22
}, {
"pkg" : "com.manoj.dlt",
"version" : 202
}, {
"pkg" : "com.google.android.launcher",
"version" : 103001
}, {
"pkg" : "com.androidmyway.demo.proxymityalert",
"version" : 1
}, {
"pkg" : "com.google.android.deskclock",
"version" : 45200512
}, {
"pkg" : "com.mbfs.mra.android.tablet",
"version" : 1
}, {
"pkg" : "com.example.hello",
"version" : 10000
}, {
"pkg" : "com.google.android.gm",
"version" : 58315863
}, {
"pkg" : "com.kony.sample",
"version" : 1
}, {
"pkg" : "com.motorola.moodles",
"version" : 301
}, {
"pkg" : "com.motorola.motocit",
"version" : 117
}, {
"pkg" : "com.example.googleLogin",
"version" : 1
}, {
"pkg" : "com.koushikdutta.vysor",
"version" : 1477720800
}, {
"pkg" : "com.google.zxing.client.android",
"version" : 105
}, {
"pkg" : "com.google.android.setupwizard",
"version" : 200
}, {
"pkg" : "com.qualcomm.qcrilmsgtunnel",
"version" : 22
}, {
"pkg" : "com.ford.applinkcatalog",
"version" : 10001
}, {
"pkg" : "com.android.providers.settings",
"version" : 22
}, {
"pkg" : "com.android.sharedstoragebackup",
"version" : 22
}, {
"pkg" : "com.google.android.email",
"version" : 7008110
}, {
"pkg" : "com.kony.KitchenSinkApp",
"version" : 1
}, {
"pkg" : "com.google.android.music",
"version" : 3120
}, {
"pkg" : "com.android.printspooler",
"version" : 1
}, {
"pkg" : "com.sample.httpurl",
"version" : 1
}, {
"pkg" : "com.android.dreams.basic",
"version" : 22
}, {
"pkg" : "io.selendroid.testapp",
"version" : 1
}, {
"pkg" : "com.kony.FunctionPreviewApp",
"version" : 28
}, {
"pkg" : "com.motorola.MotGallery2",
"version" : 304138
}, {
"pkg" : "com.stgit.portfolio.dravya",
"version" : 1
}, {
"pkg" : "com.android.inputdevices",
"version" : 22
}, {
"pkg" : "com.motorola.android.nativedropboxagent",
"version" : 1
}, {
"pkg" : "com.motorola.android.jvtcmd",
"version" : 22
}, {
"pkg" : "com.lenovo.anyshare.gps",
"version" : 4030608
}, {
"pkg" : "com.motorola.motosignature.app",
"version" : 1
}, {
"pkg" : "com.dropbox.android",
"version" : 1120200
}, {
"pkg" : "com.vznavigator.Generic",
"version" : 907073
}, {
"pkg" : "com.motorola.android.buacontactadapter",
"version" : 22
}, {
"pkg" : "com.google.android.apps.cloudprint",
"version" : 113
}, {
"pkg" : "com.chrysler.tvauth",
"version" : 9
}, {
"pkg" : "com.google.android.apps.docs",
"version" : 62113533
}, {
"pkg" : "com.google.android.apps.maps",
"version" : 932100122
}, {
"pkg" : "com.google.android.apps.plus",
"version" : 416251307
}, {
"pkg" : "com.motorola.dataoffloading",
"version" : 1
}, {
"pkg" : "com.android.cellbroadcastreceiver",
"version" : 22
}, {
"pkg" : "com.google.android.webview",
"version" : 270408100
}, {
"pkg" : "com.motorola.fmrecording",
"version" : 22
}, {
"pkg" : "com.motorola.localwipe.policy",
"version" : 1
}, {
"pkg" : "com.motorola.contacts.preloadcontacts",
"version" : 1
}, {
"pkg" : "com.android.server.telecom",
"version" : 22
}, {
"pkg" : "com.google.android.syncadapters.contacts",
"version" : 22
}, {
"pkg" : "com.motorola.android.providers.settings",
"version" : 22
}, {
"pkg" : "com.android.facelock",
"version" : 22
}, {
"pkg" : "com.android.keychain",
"version" : 22
}, {
"pkg" : "com.google.android.gm.exchange",
"version" : 508255
}, {
"pkg" : "com.android.chrome",
"version" : 270408101
}, {
"pkg" : "com.zzgo.main",
"version" : 1
}, {
"pkg" : "com.SSOApp",
"version" : 1
}, {
"pkg" : "com.android.dialer",
"version" : 22
}, {
"pkg" : "com.sample.handlingcookies",
"version" : 1
}, {
"pkg" : "com.google.android.street",
"version" : 18102
}, {
"pkg" : "com.google.android.gms",
"version" : 9683234
}, {
"pkg" : "com.google.android.gsf",
"version" : 22
}, {
"pkg" : "com.google.android.tts",
"version" : 210309111
}, {
"pkg" : "com.google.android.partnersetup",
"version" : 22
}, {
"pkg" : "com.motorola.genie",
"version" : 104037
}, {
"pkg" : "com.motorola.nfcui",
"version" : 1
}, {
"pkg" : "com.motorola.setup",
"version" : 22
}, {
"pkg" : "com.CallerApp",
"version" : 1
}, {
"pkg" : "com.android.packageinstaller",
"version" : 22
}, {
"pkg" : "com.google.android.videos",
"version" : 36160
}, {
"pkg" : "stg.com.shuttleclient",
"version" : 1
}, {
"pkg" : "com.android.proxyhandler",
"version" : 22
}, {
"pkg" : "com.lmi.motorola.rescue",
"version" : 74522
}, {
"pkg" : "com.google.android.apps.hangoutsdialer",
"version" : 1642
}, {
"pkg" : "com.ionicframework.ionicgeolocationdemo761609",
"version" : 1
}, {
"pkg" : "com.customermobile.preload.vzw",
"version" : 10
}, {
"pkg" : "com.google.android.feedback",
"version" : 22
}, {
"pkg" : "com.google.android.calendar",
"version" : 2014102770
}, {
"pkg" : "com.motorola.onetimeinitializer",
"version" : 22
}, {
"pkg" : "com.android.managedprovisioning",
"version" : 22
}, {
"pkg" : "com.motorola.launcherconfig",
"version" : 10000000
}, {
"pkg" : "de.j4velin.wifiAutoOff",
"version" : 173
}, {
"pkg" : "com.example.yeshwanthkk.ocr",
"version" : 1
}, {
"pkg" : "com.android.dreams.phototable",
"version" : 22
}, {
"pkg" : "com.mapmywalk.android2",
"version" : 16060200
}, {
"pkg" : "com.motorola.moto",
"version" : 20301
}, {
"pkg" : "com.motorola.slpc",
"version" : 10112
}, {
"pkg" : "com.DCMobile",
"version" : 1
}, {
"pkg" : "com.orgname.Print",
"version" : 1
}, {
"pkg" : "com.example.distancematrix",
"version" : 1
}, {
"pkg" : "com.android.providers.partnerbookmarks",
"version" : 22
}, {
"pkg" : "com.google.android.gsf.login",
"version" : 22
}, {
"pkg" : "com.jms.zoomrotation",
"version" : 2
}, {
"pkg" : "com.motricity.verizon.ssodownloadable",
"version" : 229
}, {
"pkg" : "com.motorola.vzw.loader",
"version" : 22
}, {
"pkg" : "com.android.wallpaper.livepicker",
"version" : 22
}, {
"pkg" : "com.mmi.explore",
"version" : 16
}, {
"pkg" : "portfolio.stgit.com.portfolio",
"version" : 1
}, {
"pkg" : "com.example.helloapp",
"version" : 1
}, {
"pkg" : "com.example.webserviceexample",
"version" : 1
}, {
"pkg" : "com.motorola.motocare.internal",
"version" : 1
}, {
"pkg" : "com.example.yeshwanthkk.indoorpositioning",
"version" : 1
}, {
"pkg" : "com.chrysler.dailysales",
"version" : 10000
}, {
"pkg" : "com.Print",
"version" : 1
}, {
"pkg" : "org.mozilla.firefox",
"version" : 2015422361
}, {
"pkg" : "com.google.android.inputmethod.korean",
"version" : 745
}, {
"pkg" : "com.karthi.testApp",
"version" : 1
}, {
"pkg" : "com.motorola.fmplayer",
"version" : 1100089
}, {
"pkg" : "com.google.android.backuptransport",
"version" : 22
}, {
"pkg" : "com.motorola.audioeffects",
"version" : 22
}, {
"pkg" : "com.fsp.android.friendlocator",
"version" : 15200
}, {
"pkg" : "youten.redo.ble.ibeacondetector",
"version" : 3
}, {
"pkg" : "com.linkedin.android",
"version" : 88700
}, {
"pkg" : "com.android.settings",
"version" : 22
}, {
"pkg" : "com.google.android.inputmethod.pinyin",
"version" : 421
}, {
"pkg" : "com.stg.demokpns",
"version" : 1
}, {
"pkg" : "com.android.calculator2",
"version" : 22
}, {
"pkg" : "com.google.android.apps.books",
"version" : 30315
}, {
"pkg" : "com.qualcomm.location",
"version" : 1
}, {
"pkg" : "com.hecorat.azplugin",
"version" : 6
}, {
"pkg" : "com.lmi.motorola.rescuesecurity",
"version" : 74522
}, {
"pkg" : "com.motorola.slpc_sys",
"version" : 10001
}, {
"pkg" : "com.motorola.setupwizard.phoneservice",
"version" : 22
}, {
"pkg" : "com.example.linkedinintegration",
"version" : 1
}, {
"pkg" : "com.example.yeshwanthkk.beaconpositioning",
"version" : 1
}, {
"pkg" : "com.motorola.actions",
"version" : 111005
}, {
"pkg" : "com.ionicframework.ionicbeacon700665",
"version" : 18
}, {
"pkg" : "com.orgname.FirstSPA",
"version" : 1
}, {
"pkg" : "com.android.vpndialogs",
"version" : 22
}, {
"pkg" : "com.google.android.talk",
"version" : 23256370
}, {
"pkg" : "com.motorola.bach.modemstats",
"version" : 1
}, {
"pkg" : "com.SignInWithGoogle",
"version" : 1
}, {
"pkg" : "com.android.phone",
"version" : 22
}, {
"pkg" : "com.android.shell",
"version" : 22
}, {
"pkg" : "com.ibm.appcenter",
"version" : 80
}, {
"pkg" : "com.android.providers.userdictionary",
"version" : 22
}, {
"pkg" : "com.orgname.sample",
"version" : 1
}, {
"pkg" : "jp.co.omronsoft.iwnnime.ml",
"version" : 32
}, {
"pkg" : "com.orgname.DirectYourFriend",
"version" : 1
}, {
"pkg" : "com.android.location.fused",
"version" : 22
}, {
"pkg" : "com.android.systemui",
"version" : 22
}, {
"pkg" : "com.motorola.motodisplay",
"version" : 21110214
}, {
"pkg" : "com.fusionone.android.sync.vzbuaclient",
"version" : 2901144
}, {
"pkg" : "edu.sfsu.cs.orange.ocr",
"version" : 33
}, {
"pkg" : "com.motorola.setupwizard.devicesetup",
"version" : 1
}, {
"pkg" : "com.example.android.screencapture",
"version" : 0
}, {
"pkg" : "com.google.android.play.games",
"version" : 22090004
}, {
"pkg" : "io.appium.unlock",
"version" : 1
}, {
"pkg" : "com.google.android.apps.magazines",
"version" : 2015061020
}, {
"pkg" : "com.android.bluetooth",
"version" : 22
}, {
"pkg" : "com.qualcomm.timeservice",
"version" : 22
}, {
"pkg" : "com.google.android.androidforwork",
"version" : 22
}, {
"pkg" : "com.qualcomm.atfwd",
"version" : 22
}, {
"pkg" : "com.android.providers.contacts",
"version" : 22
}, {
"pkg" : "com.motorola.setupwizard.controller",
"version" : 22
}, {
"pkg" : "com.android.captiveportallogin",
"version" : 22
}, {
"pkg" : "com.motorola.so",
"version" : 2010001
}, {
"pkg" : "com.verizon.messaging.vzmsgs",
"version" : 30271
}, {
"pkg" : "com.verizon.llkagent",
"version" : 1
}, {
"pkg" : "com.motorola.android.dm.service",
"version" : 2
}, {
"pkg" : "com.gotv.nflgamecenter.us.lite",
"version" : 1110317
}, {
"pkg" : "com.verizon.permissions.appdirectedsms",
"version" : 1
}, {
"pkg" : "com.hp.android.printservice",
"version" : 86
}, {
"pkg" : "com.google.android.inputmethod.latin",
"version" : 24512315
}
]
};
How can I send this from my client to adapter using WLResourceRequest?

You can use WLResourceRequest.sendFormParameters(json) to do this. For more details refer to this link.
To send json,queryparameters,header etc together in a single WLResourceRequest call, refer to the code snippet and sample in this link.

What if you stringify() the data variable before it gets assigned to the params variable?
Something like this:
var JSONData = JSON.stringify( data );
var params = [JSONdata, deviceid, token];
var newParams = {"params" : JSON.stringify( params )};
resourceRequest.sendFormParameters( newParams )
I think you'd have to JSON.parse() the data variable inside the Javascript adapter. I'm going to try that out when I get a chance...
-Paul Horan-

Related

How to guarantee air price quote after PNR creation on Sabre API?

I'm trying to create a PNR with "Time to think/Fare lock" option offered by airlines like AF, KLM, LH and more. The idea is to create the PNR to temporarily "block" the price until the time limit is reached (48~72hs) but I don't know how.
I'm able to create the PNR, with CreatePassengerNameRecord, without problems and it returns the retained PriceQuote but the fare is not guaranteed until ticketed and the system will re-price the itinerary with the current fare before ticketing.
Request/response example
CreatePassengerNameRecordRQ
"CreatePassengerNameRecordRQ" : {
"version" : "2.2.0",
"haltOnAirPriceError" : true,
"TravelItineraryAddInfo" : {
"AgencyInfo" : {
"Address" : {
"AddressLine" : "TEST",
"CityName" : "TEST",
"CountryCode" : "FR",
"PostalCode" : "99999",
"StreetNmbr" : "TEST 123"
},
"Ticketing" : {
"PseudoCityCode" : "L4GJ",
"TicketType" : "7TAW"
}
},
"CustomerInfo" : {
"ContactNumbers" : {
"ContactNumber" : [
{
"Phone" : "99999999",
"PhoneUseType" : "A"
}
]
},
"CustLoyalty" : [],
"Email" : [
{
"Address" : "test#gmail.com"
},
{
"Address" : "testRes#gmail.com"
}
],
"PersonName" : [
{
"NameNumber" : "1.1",
"PassengerType" : "ADT",
"GivenName" : "TEST",
"Surname" : "TEST"
}
]
}
},
"AirBook" : {
"HaltOnStatus" : [
{
"Code" : "HL"
},
{
"Code" : "KK"
},
{
"Code" : "LL"
},
{
"Code" : "NN"
},
{
"Code" : "NO"
},
{
"Code" : "UC"
},
{
"Code" : "US"
}
],
"OriginDestinationInformation" : {
"FlightSegment" : [
{
"DepartureDateTime" : "2021-02-17T13:15:00",
"ArrivalDateTime" : "2021-02-17T13:45:00",
"FlightNumber" : "1780",
"NumberInParty" : "1",
"ResBookDesigCode" : "G",
"Status" : "NN",
"DestinationLocation" : {
"LocationCode" : "LHR"
},
"MarketingAirline" : {
"Code" : "AF",
"FlightNumber" : "1780"
},
"OriginLocation" : {
"LocationCode" : "CDG"
}
},
{
"DepartureDateTime" : "2021-02-26T11:30:00",
"ArrivalDateTime" : "2021-02-26T13:50:00",
"FlightNumber" : "1581",
"NumberInParty" : "1",
"ResBookDesigCode" : "X",
"Status" : "NN",
"DestinationLocation" : {
"LocationCode" : "CDG"
},
"MarketingAirline" : {
"Code" : "AF",
"FlightNumber" : "1581"
},
"OriginLocation" : {
"LocationCode" : "LHR"
}
}
]
}
},
"AirPrice" : [
{
"PriceComparison" : {
"AcceptablePriceDecrease" : {
"Amount" : 125.3,
"HaltOnNonAcceptablePrice" : true
},
"AcceptablePriceIncrease" : {
"Amount" : 5,
"HaltOnNonAcceptablePrice" : true
},
"AmountSpecified" : 125.3
},
"PriceRequestInformation" : {
"Retain" : true,
"OptionalQualifiers" : {
"MiscQualifiers" : {
"BaggageAllowance" : []
},
"FOP_Qualifiers" : {
"BasicFOP" : {
"Type" : "CK"
}
},
"PricingQualifiers" : {
"ItineraryOptions" : {
"SegmentSelect" : [
{
"Number" : "1",
"RPH" : "1"
},
{
"Number" : "2",
"RPH" : "2"
}
]
},
"PassengerType" : [
{
"Quantity" : "1",
"Code" : "ADT"
}
],
"SpecificFare" : [
{
"FareBasis" : "GS50OALG",
"RPH" : "1"
},
{
"FareBasis" : "XS50OALG",
"RPH" : "2"
}
]
}
}
}
}
],
"SpecialReqDetails" : {
"SpecialService" : {
"SpecialServiceInfo" : {
"AdvancePassenger" : [],
"SecureFlight" : [
{
"PersonName" : {
"NameNumber" : "1.1",
"DateOfBirth" : "1991-01-13",
"Gender" : "M",
"GivenName" : "TEST",
"Surname" : "TEST"
}
}
],
"Service" : [
{
"SSR_Code" : "CTCM",
"PersonName" : {
"NameNumber" : "1.1"
},
"Text" : "0033142890939"
},
{
"SSR_Code" : "CTCE",
"PersonName" : {
"NameNumber" : "1.1"
},
"Text" : "TEST"
}
]
}
}
},
"PostProcessing" : {
"RedisplayReservation" : {
"waitInterval" : 1000
},
"EndTransaction" : {
"Email" : {
"eTicket" : {
"PDF" : {
"Ind" : false
},
"Ind" : false
},
"Ind" : true
},
"Source" : {
"ReceivedFrom" : "TEST"
}
}
}
}
}
CreatePassengerNameRecordRS (partial)
"CreatePassengerNameRecordRS" : {
"ApplicationResults" : {
"status" : "Complete",
"Success" : [
{
"timeStamp" : "2020-11-19T06:29:15.342-06:00"
}
],
"Warning" : [
{
"type" : "BusinessLogic",
"timeStamp" : "2020-11-19T06:29:14.016-06:00",
"SystemSpecificResults" : [
{
"Message" : [
{
"code" : "WARN.SWS.HOST.WARNING_RESPONSE",
"content" : "EndTransactionLLSRQ: TTY REQ PEND"
}
]
}
]
}
]
},
"ItineraryRef" : {
"ID" : "HOKJCQ"
},
"AirBook" : {
"OriginDestinationOption" : {
"FlightSegment" : [
{
"ArrivalDateTime" : "02-17T13:45",
"DepartureDateTime" : "02-17T13:15",
"eTicket" : true,
"FlightNumber" : "1780",
"NumberInParty" : "001",
"ResBookDesigCode" : "G",
"Status" : "NN",
"DestinationLocation" : {
"LocationCode" : "LHR"
},
"MarketingAirline" : {
"Code" : "AF",
"FlightNumber" : "1780"
},
"OriginLocation" : {
"LocationCode" : "CDG"
}
},
{
"ArrivalDateTime" : "02-26T13:50",
"DepartureDateTime" : "02-26T11:30",
"eTicket" : true,
"FlightNumber" : "1581",
"NumberInParty" : "001",
"ResBookDesigCode" : "X",
"Status" : "NN",
"DestinationLocation" : {
"LocationCode" : "CDG"
},
"MarketingAirline" : {
"Code" : "AF",
"FlightNumber" : "1581"
},
"OriginLocation" : {
"LocationCode" : "LHR"
}
}
]
}
},
"AirPrice" : [
{
"PriceComparison" : {
"AmountReturned" : "125.30",
"AmountSpecified" : "125.3"
},
"PriceQuote" : {
"MiscInformation" : {
"BaggageInfo" : {
"SubCodeProperties" : [
{
"SolutionSequenceNmbr" : 1,
"RPH" : 1,
"AncillaryFeeGroupCode" : "BG",
"CommercialNameofBaggageItemType" : "FREE BAGGAGE ALLOWANCE",
"EMD_Type" : "4",
"ExtendedSubCodeKey" : "0DFAAAF"
},
{
"SolutionSequenceNmbr" : 1,
"RPH" : 2,
"AncillaryFeeGroupCode" : "BG",
"CommercialNameofBaggageItemType" : "UPTO50LB 23KG AND62LI 158LCM",
"DescriptionOne" : {
"Code" : "23",
"Text" : "UP TO 50 POUNDS/23 KILOGRAMS"
},
"DescriptionTwo" : {
"Code" : "6U",
"Text" : "UP TO 62 LINEAR INCHES/158 LINEAR CENTIMETERS"
},
"EMD_Type" : "4",
"ExtendedSubCodeKey" : "0GOACAF",
"SizeWeightInfo" : {
"MaximumSizeInAlternate" : {
"Units" : "C",
"content" : "158"
},
"MaximumSize" : {
"Units" : "I",
"content" : "62"
},
"MaximumWeightInAlternate" : {
"Units" : "K",
"content" : "23"
},
"MaximumWeight" : {
"Units" : "L",
"content" : "50"
}
}
},
{
"SolutionSequenceNmbr" : 1,
"RPH" : 3,
"AncillaryFeeGroupCode" : "BG",
"AncillaryService" : {
"SubGroupCode" : "CY",
"Text" : "CARRY ON HAND BAGGAGE"
},
"CommercialNameofBaggageItemType" : "CARRYON HAND BAGGAGE ALLOWANCE",
"EMD_Type" : "4",
"ExtendedSubCodeKey" : "0LNABAF"
},
{
"SolutionSequenceNmbr" : 1,
"RPH" : 4,
"AncillaryFeeGroupCode" : "BG",
"AncillaryService" : {
"SubGroupCode" : "CY",
"Text" : "CARRY ON HAND BAGGAGE"
},
"BookingMethod" : "04",
"CommercialNameofBaggageItemType" : "CABIN BAGGAGE 12KG 1PC 115CM",
"DescriptionOne" : {
"Code" : "12",
"Text" : "UP TO 26 POUNDS/12 KILOGRAMS"
},
"DescriptionTwo" : {
"Code" : "4U",
"Text" : "UP TO 45 LINEAR INCHES/115 LINEAR CENTIMETERS"
},
"EMD_Type" : "4",
"ExtendedSubCodeKey" : "0MRACAF",
"SizeWeightInfo" : {
"MaximumSizeInAlternate" : {
"Units" : "C",
"content" : "115"
},
"MaximumSize" : {
"Units" : "I",
"content" : "45"
},
"MaximumWeightInAlternate" : {
"Units" : "K",
"content" : "12"
},
"MaximumWeight" : {
"Units" : "L",
"content" : "26"
}
}
}
]
},
"HeaderInformation" : [
{
"SolutionSequenceNmbr" : "1",
"DepartureDate" : "2021-02-17",
"Text" : [
"VALIDATING CARRIER - AF",
"CAT 15 SALES RESTRICTIONS FREE TEXT FOUND - VERIFY RULES",
"BAG ALLOWANCE -CDGLHR-NIL/AF",
"1STCHECKED BAG FEE-CDGLHR-EUR45.00/AF/UP TO 50 POUNDS/23 KILOGR",
"AMS AND UP TO 62 LINEAR INCHES/158 LINEAR CENTIMETERS",
"2NDCHECKED BAG FEE-CDGLHR-EUR70.00/AF/UP TO 50 POUNDS/23 KILOGR",
"AMS AND UP TO 62 LINEAR INCHES/158 LINEAR CENTIMETERS",
"BAG ALLOWANCE -LHRCDG-NIL/AF",
"1STCHECKED BAG FEE-LHRCDG-EUR45.00/AF/UP TO 50 POUNDS/23 KILOGR",
"AMS AND UP TO 62 LINEAR INCHES/158 LINEAR CENTIMETERS",
"2NDCHECKED BAG FEE-LHRCDG-EUR70.00/AF/UP TO 50 POUNDS/23 KILOGR",
"AMS AND UP TO 62 LINEAR INCHES/158 LINEAR CENTIMETERS",
"CARRY ON ALLOWANCE",
"CDGLHR LHRCDG-01P/AF",
"01/UP TO 26 POUNDS/12 KILOGRAMS AND UP TO 45 LINEAR INCHES/115",
"LINEAR CENTIMETERS",
"CARRY ON CHARGES",
"CDGLHR LHRCDG-AF-CARRY ON FEES UNKNOWN-CONTACT CARRIER",
"ADDITIONAL ALLOWANCES AND/OR DISCOUNTS MAY APPLY DEPENDING ON",
"FLYER-SPECIFIC FACTORS /E.G. FREQUENT FLYER STATUS/MILITARY/",
"CREDIT CARD FORM OF PAYMENT/EARLY PURCHASE OVER INTERNET,ETC./"
],
"ValidatingCarrier" : {
"Code" : "AF"
}
}
],
"SolutionInformation" : [
{
"SolutionSequenceNmbr" : "1",
"BaseFareCurrencyCode" : "EUR",
"CurrencyCode" : "EUR",
"GrandTotalEquivFareAmount" : "34.00",
"GrandTotalTaxes" : "91.30",
"RequiresRebook" : "false",
"TicketNumber" : "0",
"TotalAmount" : "125.30"
}
],
"ValidatingCarrier" : [
{
"NewValidatingProcess" : true,
"SolutionSequenceNmbr" : "1",
"SettlementMethod" : "BSP",
"Ticket" : [
{
"Type" : "ETKTREQ",
"CarrierCode" : "AF",
"ValidatingCarrierType" : "Default"
}
]
}
]
},
"PricedItinerary" : {
"AlternativePricing" : "false",
"CurrencyCode" : "EUR",
"MultiTicket" : false,
"TotalAmount" : "125.30",
"AirItineraryPricingInfo" : [
{
"SolutionSequenceNmbr" : "1",
"BaggageProvisions" : [
...
],
"FareCalculation" : {
"Text" : "PAR AF LON17.62AF PAR22.33NUC39.95END ROE0.85086"
},
"FareCalculationBreakdown" : [
{
"Branch" : {
"PCC" : "N1GJ",
"FirstJointCarrier" : "AF"
},
"Departure" : {
"CityCode" : "PAR",
"AirportCode" : "CDG",
"AirlineCode" : "AF",
"GenericInd" : "O",
"ArrivalCityCode" : "LON",
"ArrivalAirportCode" : "LHR"
},
"FareBasis" : {
"Code" : "GS50OALG",
"FareAmount" : "17.62",
"FarePassengerType" : "ADT",
"FareType" : "P",
"FilingCarrier" : "AF",
"GlobalInd" : "EH",
"TripTypeInd" : "R",
"Market" : "PARLON",
"Cabin" : "Y"
},
"FreeBaggageAllowance" : "NONIL",
"RuleCategoryIndicator" : [
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"15",
"16"
]
},
{
"Branch" : {
"PCC" : "N1GJ",
"FirstJointCarrier" : "AF"
},
"Departure" : {
"CityCode" : "LON",
"AirportCode" : "LHR",
"AirlineCode" : "AF",
"GenericInd" : "O",
"ArrivalCityCode" : "PAR",
"ArrivalAirportCode" : "CDG"
},
"FareBasis" : {
"Code" : "XS50OALG",
"FareAmount" : "22.33",
"FarePassengerType" : "ADT",
"FareType" : "P",
"FilingCarrier" : "AF",
"GlobalInd" : "EH",
"TripTypeInd" : "R",
"Market" : "PARLON",
"Cabin" : "Y"
},
"FreeBaggageAllowance" : "NONIL",
"RuleCategoryIndicator" : [
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"15",
"16"
]
}
],
"ItinTotalFare" : {
"NonRefundableInd" : "N",
"BaggageInfo" : {
"NonUS_DOT_Disclosure" : {
"Text" : [
"BAG ALLOWANCE -CDGLHR-NIL/AF",
"1STCHECKED BAG FEE-CDGLHR-EUR45.00/AF/UP TO 50 POUNDS/23 KILOGR",
"AMS AND UP TO 62 LINEAR INCHES/158 LINEAR CENTIMETERS",
"2NDCHECKED BAG FEE-CDGLHR-EUR70.00/AF/UP TO 50 POUNDS/23 KILOGR",
"AMS AND UP TO 62 LINEAR INCHES/158 LINEAR CENTIMETERS",
"BAG ALLOWANCE -LHRCDG-NIL/AF",
"1STCHECKED BAG FEE-LHRCDG-EUR45.00/AF/UP TO 50 POUNDS/23 KILOGR",
"AMS AND UP TO 62 LINEAR INCHES/158 LINEAR CENTIMETERS",
"2NDCHECKED BAG FEE-LHRCDG-EUR70.00/AF/UP TO 50 POUNDS/23 KILOGR",
"AMS AND UP TO 62 LINEAR INCHES/158 LINEAR CENTIMETERS",
"CARRY ON ALLOWANCE",
"CDGLHR LHRCDG-01P/AF",
"01/UP TO 26 POUNDS/12 KILOGRAMS AND UP TO 45 LINEAR INCHES/115",
"LINEAR CENTIMETERS",
"CARRY ON CHARGES",
"CDGLHR LHRCDG-AF-CARRY ON FEES UNKNOWN-CONTACT CARRIER",
"ADDITIONAL ALLOWANCES AND/OR DISCOUNTS MAY APPLY DEPENDING ON",
"FLYER-SPECIFIC FACTORS /E.G. FREQUENT FLYER STATUS/MILITARY/",
"CREDIT CARD FORM OF PAYMENT/EARLY PURCHASE OVER INTERNET,ETC./"
]
}
},
"BaseFare" : {
"Amount" : "34.00",
"CurrencyCode" : "EUR"
},
"Construction" : {
"Amount" : "39.95",
"CurrencyCode" : "NUC",
"RateOfExchange" : "0.850860"
},
"Taxes" : {
"TotalAmount" : "91.30",
"Tax" : [
{
"Amount" : "26.00",
"TaxCode" : "YQI",
"TaxName" : "SERVICE FEE - CARRIER-IMPOSED",
"TicketingTaxCode" : "YQ"
},
{
"Amount" : "16.33",
"TaxCode" : "FR",
"TaxName" : "CIVIL AVIATION TAX DOMESTIC AN",
"TicketingTaxCode" : "FR"
},
{
"Amount" : "13.09",
"TaxCode" : "QX",
"TaxName" : "PASSENGER SERVICE CHARGE INTER",
"TicketingTaxCode" : "QX"
},
{
"Amount" : "1.13",
"TaxCode" : "IZ",
"TaxName" : "AIR PASSENGER SOLIDARITY TAX",
"TicketingTaxCode" : "IZ"
},
{
"Amount" : "14.51",
"TaxCode" : "GB",
"TaxName" : "AIR PASSENGER DUTY APD",
"TicketingTaxCode" : "GB"
},
{
"Amount" : "18.74",
"TaxCode" : "UB",
"TaxName" : "PASSENGER SERVICE CHARGE DEPAR",
"TicketingTaxCode" : "UB"
},
{
"Amount" : "1.50",
"TaxCode" : "O4",
"TaxName" : "AIR PASSENGER SOLIDARITY TAX S",
"TicketingTaxCode" : "O4"
}
]
},
"TotalFare" : {
"Amount" : "125.30",
"CurrencyCode" : "EUR"
}
},
"PassengerTypeQuantity" : {
"Code" : "ADT",
"Quantity" : "1"
},
"PTC_FareBreakdown" : [
{
"Cabin" : "Y",
"FareBasis" : {
"Code" : "GS50OALG",
"FareAmount" : "17.62",
"FarePassengerType" : "ADT",
"FareType" : "P",
"FilingCarrier" : "AF",
"GlobalInd" : "EH",
"Market" : "PARLON"
},
"FreeBaggageAllowance" : "NONIL"
},
{
"Cabin" : "Y",
"FareBasis" : {
"Code" : "XS50OALG",
"FareAmount" : "22.33",
"FarePassengerType" : "ADT",
"FareType" : "P",
"FilingCarrier" : "AF",
"GlobalInd" : "EH",
"Market" : "PARLON"
},
"FreeBaggageAllowance" : "NONIL"
}
]
}
]
}
}
}
],
"TravelItineraryRead" : {
"TravelItinerary" : {
"CustomerInfo" : {
...
},
"ItineraryInfo" : {
"ItineraryPricing" : {
"PriceQuote" : [
{
"RPH" : "1",
"MiscInformation" : {
"SignatureLine" : [
{
"ExpirationDateTime" : "00:00",
"Source" : "SYS",
"Status" : "ACTIVE",
"Text" : "N1GJ N1GJ*AWS 1329/19NOV20"
}
]
},
"PricedItinerary" : [
{
"DisplayOnly" : false,
"InputMessage" : "WPFCK¥S1*ZZGS50OALG¥S2*ZZXS50OALG¥P1ADT¥RQ",
"RPH" : "1",
"StatusCode" : "A",
"TaxExempt" : false,
"ValidatingCarrier" : "AF",
"StoredDateTime" : "2020-11-19T13:29",
"AirItineraryPricingInfo" : {
"ItinTotalFare" : [
{
"BaseFare" : {
"Amount" : "34.00",
"CurrencyCode" : "EUR"
},
"Taxes" : {
"Tax" : {
"Amount" : "91.30",
"TaxCode" : "XT"
},
"TaxBreakdownCode" : [
{
"TaxPaid" : false,
"content" : "26.00YQ"
},
{
"TaxPaid" : false,
"content" : "16.33FR"
},
{
"TaxPaid" : false,
"content" : "13.09QX"
},
{
"TaxPaid" : false,
"content" : "1.13IZ"
},
{
"TaxPaid" : false,
"content" : "14.51GB"
},
{
"TaxPaid" : false,
"content" : "18.74UB"
},
{
"TaxPaid" : false,
"content" : "1.50O4"
}
]
},
"TotalFare" : {
"Amount" : "125.30",
"CurrencyCode" : "EUR"
},
"Totals" : {
"BaseFare" : {
"Amount" : "34.00"
},
"Taxes" : {
"Tax" : {
"Amount" : "91.30"
}
},
"TotalFare" : {
"Amount" : "125.30"
}
}
}
],
"PassengerTypeQuantity" : [
{
"Code" : "ADT",
"Quantity" : "01"
}
],
"PTC_FareBreakdown" : [
{
"Endorsements" : {
"Endorsement" : [
{
"type" : "PRICING_PARAMETER",
"Text" : "WPFCK$S1*ZZGS50OALG$S2*ZZXS50OALG$P1ADT$RQ"
},
{
"type" : "WARNING",
"Text" : "VALIDATING CARRIER - AF"
},
{
"type" : "WARNING",
"Text" : "CAT 15 SALES RESTRICTIONS FREE TEXT FOUND - VERIFY RULES"
}
]
},
"FareBasis" : [
{
"Code" : "GS50OALG/XS50OALG"
}
],
"FareCalculation" : {
"Text" : [
"PAR AF LON17.62AF PAR22.33NUC39.95END ROE0.85086"
]
},
"FareSource" : "ATPC",
"FlightSegment" : [
{
"ConnectionInd" : "O",
"DepartureDateTime" : "02-17T13:15",
"FlightNumber" : "1780",
"ResBookDesigCode" : "G",
"SegmentNumber" : "1",
"Status" : "OK",
"BaggageAllowance" : {
"Number" : "NIL"
},
"FareBasis" : {
"Code" : "GS50OALG"
},
"MarketingAirline" : {
"Code" : "AF",
"FlightNumber" : "1780"
},
"OriginLocation" : {
"LocationCode" : "CDG"
},
"ValidityDates" : {
"NotValidAfter" : "2021-02-17",
"NotValidBefore" : "2021-02-17"
}
},
{
"ConnectionInd" : "O",
"DepartureDateTime" : "02-26T11:30",
"FlightNumber" : "1581",
"ResBookDesigCode" : "X",
"SegmentNumber" : "2",
"Status" : "OK",
"BaggageAllowance" : {
"Number" : "NIL"
},
"FareBasis" : {
"Code" : "XS50OALG"
},
"MarketingAirline" : {
"Code" : "AF",
"FlightNumber" : "1581"
},
"OriginLocation" : {
"LocationCode" : "LHR"
},
"ValidityDates" : {
"NotValidAfter" : "2021-02-26",
"NotValidBefore" : "2021-02-26"
}
},
{
"OriginLocation" : {
"LocationCode" : "CDG"
}
}
],
"FareComponent" : [
{
"FareBasisCode" : "GS50OALG",
"FareDirectionality" : "FROM",
"Amount" : "1762",
"TicketDesignator" : "",
"GoverningCarrier" : "AF",
"FareComponentNumber" : "1",
"Location" : {
"Origin" : "PAR",
"Destination" : "LON"
},
"Dates" : {
"DepartureDateTime" : "02-17T13:15",
"ArrivalDateTime" : "02-17T13:45"
},
"FlightSegmentNumbers" : {
"FlightSegmentNumber" : [
"1"
]
}
},
{
"FareBasisCode" : "XS50OALG",
"FareDirectionality" : "TO",
"Amount" : "2233",
"TicketDesignator" : "",
"GoverningCarrier" : "AF",
"FareComponentNumber" : "2",
"Location" : {
"Origin" : "LON",
"Destination" : "PAR"
},
"Dates" : {
"DepartureDateTime" : "02-26T11:30",
"ArrivalDateTime" : "02-26T13:50"
},
"FlightSegmentNumbers" : {
"FlightSegmentNumber" : [
"2"
]
}
}
]
}
]
}
}
],
"ResponseHeader" : {
"Text" : [
"FARE - PRICE RETAINED",
"FARE USED TO CALCULATE DISCOUNT",
"FARE NOT GUARANTEED UNTIL TICKETED"
]
},
"PriceQuotePlus" : {
"DomesticIntlInd" : "I",
"PricingStatus" : "S",
"VerifyFareCalc" : false,
"ItineraryChanged" : false,
"ManualFare" : false,
"NegotiatedFare" : false,
"SystemIndicator" : "S",
"NUCSuppresion" : false,
"SubjToGovtApproval" : false,
"IT_BT_Fare" : "BT",
"DisplayOnly" : false,
"DiscountAmount" : "0",
"PassengerInfo" : {
"PassengerType" : "ADT",
"PassengerData" : [
{
"NameNumber" : "01.01",
"content" : "TEST/TEST"
}
]
},
"TicketingInstructionsInfo" : {}
}
}
],
"PriceQuoteTotals" : {
"BaseFare" : {
"Amount" : "34.00"
},
"Taxes" : {
"Tax" : {
"Amount" : "91.30"
}
},
"TotalFare" : {
"Amount" : "125.30"
}
}
},
"Ticketing" : [
{
"RPH" : "01",
"TicketTimeLimit" : "TAWL4GJ19NOV009/"
}
]
},
"ItineraryRef" : {
...
},
"SpecialServiceInfo" : [
{
"RPH" : "001",
"Type" : "GFX",
"Id" : "14",
"Service" : {
"SSR_Code" : "SSR",
"SSR_Type" : "DOCS",
"Airline" : {
"Code" : "AF"
},
"PersonName" : [
{
"NameNumber" : "01.01",
"content" : "TEST/TEST"
}
],
"Text" : [
"HK1/DB/13JAN1991/M/TEST/TEST"
]
}
},
{
"RPH" : "002",
"Type" : "GFX",
"Id" : "15",
"Service" : {
"SSR_Code" : "SSR",
"SSR_Type" : "CTCM",
"Airline" : {
"Code" : "AF"
},
"PersonName" : [
{
"NameNumber" : "01.01",
"content" : "TEST/TEST"
}
],
"Text" : [
"HK1/0033142890939"
]
}
},
{
"RPH" : "003",
"Type" : "GFX",
"Id" : "16",
"Service" : {
"SSR_Code" : "SSR",
"SSR_Type" : "CTCE",
"Airline" : {
"Code" : "AF"
},
"PersonName" : [
{
"NameNumber" : "01.01",
"content" : "TEST/TEST"
}
],
"Text" : [
"TEST"
]
}
}
]
}
}
}
Do I need to specify something in CreatePassengerNameRecordRQ to freeze the fare quote ?
Is there any other action needed to access this special option offered by some airlines ?
Thank you !

How to deploy Column View artifact on CloudFoundry

I have a Column View in SAP HANA SQL that is used in a sql procedure
CREATE COLUMN VIEW "ABC_COLUMN_VIEW" TYPE hierarchy WITH PARAMETERS (
'hierarchyDefinition'='{
"MULTIPARENT":true,
"NODETYPE":"STRING",
"NODETYPE_INFERRED":"STRING",
"RUNTIMEOBJECTTYPE":"tree",
"SOURCEQUERY":"SELECT "A_COLUMN", "B_COLUMN" FROM "ABC_TABLE"",
"SOURCEQUERYSCHEMA":"ABC_SCHEMA",
"SOURCETYPE":"RECURSIVE"}')
and im trying to deploy it on cf but now i see that the .hdiconfig file doesnt have anything about column views
{
"plugin_version" : "2.0.0.0",
"file_suffixes" : {
"hdbsynonym" : {
"plugin_name" : "com.sap.hana.di.synonym"
},
"hdbsynonymconfig" : {
"plugin_name" : "com.sap.hana.di.synonym.config"
},
"hdbtable" : {
"plugin_name" : "com.sap.hana.di.table"
},
"hdbdropcreatetable" : {
"plugin_name" : "com.sap.hana.di.dropcreatetable"
},
"hdbvirtualtable" : {
"plugin_name" : "com.sap.hana.di.virtualtable"
},
"hdbvirtualtableconfig" : {
"plugin_name" : "com.sap.hana.di.virtualtable.config"
},
"hdbindex" : {
"plugin_name" : "com.sap.hana.di.index"
},
"hdbfulltextindex" : {
"plugin_name" : "com.sap.hana.di.fulltextindex"
},
"hdbconstraint" : {
"plugin_name" : "com.sap.hana.di.constraint"
},
"hdbtrigger" : {
"plugin_name" : "com.sap.hana.di.trigger"
},
"hdbstatistics" : {
"plugin_name" : "com.sap.hana.di.statistics"
},
"hdbview" : {
"plugin_name" : "com.sap.hana.di.view"
},
"hdbcalculationview" : {
"plugin_name" : "com.sap.hana.di.calculationview"
},
"hdbprojectionview" : {
"plugin_name" : "com.sap.hana.di.projectionview"
},
"hdbprojectionviewconfig" : {
"plugin_name" : "com.sap.hana.di.projectionview.config"
},
"hdbresultcache" : {
"plugin_name" : "com.sap.hana.di.resultcache"
},
"hdbcds" : {
"plugin_name" : "com.sap.hana.di.cds"
},
"hdbfunction" : {
"plugin_name" : "com.sap.hana.di.function"
},
"hdbvirtualfunction" : {
"plugin_name" : "com.sap.hana.di.virtualfunction"
},
"hdbvirtualfunctionconfig" : {
"plugin_name" : "com.sap.hana.di.virtualfunction.config"
},
"hdbhadoopmrjob" : {
"plugin_name" : "com.sap.hana.di.virtualfunctionpackage.hadoop"
},
"jar" : {
"plugin_name" : "com.sap.hana.di.virtualfunctionpackage.hadoop"
},
"hdbtabletype" : {
"plugin_name" : "com.sap.hana.di.tabletype"
},
"hdbprocedure" : {
"plugin_name" : "com.sap.hana.di.procedure"
},
"hdbvirtualprocedure" : {
"plugin_name" : "com.sap.hana.di.virtualprocedure"
},
"hdbvirtualprocedureconfig" : {
"plugin_name" : "com.sap.hana.di.virtualprocedure.config"
},
"hdbafllangprocedure" : {
"plugin_name" : "com.sap.hana.di.afllangprocedure"
},
"hdblibrary" : {
"plugin_name" : "com.sap.hana.di.library"
},
"hdbsequence" : {
"plugin_name" : "com.sap.hana.di.sequence"
},
"hdbrole" : {
"plugin_name" : "com.sap.hana.di.role"
},
"hdbroleconfig" : {
"plugin_name" : "com.sap.hana.di.role.config"
},
"hdbstructuredprivilege" : {
"plugin_name" : "com.sap.hana.di.structuredprivilege"
},
"hdbanalyticprivilege" : {
"plugin_name" : "com.sap.hana.di.analyticprivilege"
},
"hdbtabledata" : {
"plugin_name" : "com.sap.hana.di.tabledata"
},
"csv" : {
"plugin_name" : "com.sap.hana.di.tabledata.source"
},
"properties" : {
"plugin_name" : "com.sap.hana.di.tabledata.properties"
},
"tags" : {
"plugin_name" : "com.sap.hana.di.tabledata.properties"
},
"hdbgraphworkspace" : {
"plugin_name" : "com.sap.hana.di.graphworkspace"
},
"hdbflowgraph" : {
"plugin_name" : "com.sap.hana.di.flowgraph"
},
"hdbreptask" : {
"plugin_name" : "com.sap.hana.di.reptask"
},
"hdbsearchruleset" : {
"plugin_name" : "com.sap.hana.di.searchruleset"
},
"hdbtextconfig" : {
"plugin_name" : "com.sap.hana.di.textconfig"
},
"hdbtextdict" : {
"plugin_name" : "com.sap.hana.di.textdictionary"
},
"hdbtextrule" : {
"plugin_name" : "com.sap.hana.di.textrule"
},
"hdbtextinclude" : {
"plugin_name" : "com.sap.hana.di.textrule.include"
},
"hdbtextlexicon" : {
"plugin_name" : "com.sap.hana.di.textrule.lexicon"
},
"hdbtextminingconfig" : {
"plugin_name" : "com.sap.hana.di.textminingconfig"
},
"txt" : {
"plugin_name" : "com.sap.hana.di.copyonly"
}
}
}
So my problem is can i add a column view artifact somehow so i can push to cf or there is another way now to implement hierarchy?
You’re right, there isn’t a content type for column views because these are runtime objects.
The column view you posted looks like it belongs to a hierarchy view, which is a kind of column view. You can model hierarchy functions in HANA 2 WebIDE, so that’s what I’d recommend to try here.

PHP MongoDB Collection Export to CSV issue

I have collection with following data set
MongoDB Enterprise > db.UCODEPatter.find()
{ "_id" : { "UCODE" : NumberLong("233220524641368") }, "value" : 117 }
{ "_id" : { "UCODE" : NumberLong("233222325602424") }, "value" : 71 }
{ "_id" : { "UCODE" : NumberLong("233222325601932") }, "value" : 69 }
{ "_id" : { "UCODE" : NumberLong("233222325601947") }, "value" : 59 }
{ "_id" : { "UCODE" : NumberLong("233222325602414") }, "value" : 58 }
{ "_id" : { "UCODE" : NumberLong("233222325602419") }, "value" : 49 }
{ "_id" : { "UCODE" : NumberLong("233222325602418") }, "value" : 48 }
{ "_id" : { "UCODE" : NumberLong("233220535710165") }, "value" : 47 }
{ "_id" : { "UCODE" : NumberLong("233222325602405") }, "value" : 46 }
{ "_id" : { "UCODE" : NumberLong("233222325602420") }, "value" : 45 }
{ "_id" : { "UCODE" : NumberLong("233220537026120") }, "value" : 45 }
{ "_id" : { "UCODE" : NumberLong("233222686003297") }, "value" : 44 }
{ "_id" : { "UCODE" : NumberLong("233222325602417") }, "value" : 44 }
i am try to export above data as CSV file using PHP , here my php code
<?php
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename=example.csv');
header('Pragma: no-cache');
$database = "LogData";
$colName = "UCODEPatter";
$connection = new MongoClient();
$collection = $connection->$colName->$database;
$cursor = $collection->find();
foreach($cursor as $cur)
echo '"'.$cur["UCODE"].'","'.$cur['value']."\"\n";
?>
when i used above code , i created csv file without data, please kindly help me to sort this
I think, you messed up with methods here:
$collection = $connection->$colName->$database;
There should be this:
$collection = $connection->selectDB($database)->selectCollection($colName);
And you didn't show that your collection exists in db named "LogData", so you should check this.

SQL Where clause equivalent for Elastic Search

I am trying to create a aggregate results in elastic search but filter option is not working for me.
I can aggregate data without filter e.g.
select name , material ,sum(price)
from products group by name , material
curl -XGET 'http://localhost:9200/products/_search?pretty=true' -d'
{
"aggs" : {
"product" : {
"terms" : {
"field" : "name"
},
"aggs" : {
"material" : {
"terms" : {
"field" : "material"
},
"aggs" : {
"sum_price" : {
"sum" : {
"field" : "price"
}
}
}
}
}
}
},
"size" : 0
}'
but I am facing problems to write equivalent DSL query of :
select name , material ,sum(price)
from products
where material = "wood"
group by name , material
Should be something like this:
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"term": {
"material": "wood"
}
}
}
},
"aggs" : {
"product" : {
"terms" : {
"field" : "name"
},
"aggs" : {
"material" : {
"terms" : {
"field" : "material"
},
"aggs" : {
"sum_price" : {
"sum" : {
"field" : "price"
}
}
}
}
}
}
},
"size" : 0
}
Use a filter if you know the exact value and do not need a match, else use a match query instead of the filtered query.
You can use match
{
"query": {
"bool": {
"must": [
{
"match": {
"material": "wood"
}
}
],
"filter": [
{
"match_all": {}
},
]
}
},
"aggs" : {
"product" : {
"terms" : {
"field" : "name"
},
"aggs" : {
"material" : {
"terms" : {
"field" : "material"
},
"aggs" : {
"sum_price" : {
"sum" : {
"field" : "price"
}
}
}
}
}
}
},
"size" : 0
}

How does MongoDB index arrays?

In MongoDB, if I were to store an array (say ["red", "blue"]) in a field "color", does it index "red" and "blue" so I could query for "red", for example, or does in make {"red", "blue"} a composite index?
When it comes to indexing arrays, MongoDB indexes each value of the array so you can query for individual items, such as "red." For example:
> db.col1.save({'colors': ['red','blue']})
> db.col1.ensureIndex({'colors':1})
> db.col1.find({'colors': 'red'})
{ "_id" : ObjectId("4ccc78f97cf9bdc2a2e54ee9"), "colors" : [ "red", "blue" ] }
> db.col1.find({'colors': 'blue'})
{ "_id" : ObjectId("4ccc78f97cf9bdc2a2e54ee9"), "colors" : [ "red", "blue" ] }
For more information, check out MongoDB's documentation on Multikeys: http://www.mongodb.org/display/DOCS/Multikeys
You can simply test index usage by appending "explain" to your query:
> db.col1.save({'colors': ['red','blue']})
# without index
> db.col1.find({'colors': 'red'}).explain()
{
"queryPlanner" : {
"plannerVersion" : 1,
"namespace" : "protrain.col1",
"indexFilterSet" : false,
"parsedQuery" : {
"colors" : {
"$eq" : "red"
}
},
"winningPlan" : {
"stage" : "COLLSCAN", <--- simple column scan
"filter" : {
"colors" : {
"$eq" : "red"
}
},
"direction" : "forward"
},
"rejectedPlans" : [ ]
},
"serverInfo" : {
"host" : "bee34f15fe28",
"port" : 27017,
"version" : "3.4.4",
"gitVersion" : "888390515874a9debd1b6c5d36559ca86b44babd"
},
"ok" : 1
}
# query with index
> db.col1.createIndex( { "colors":1 } )
> db.col1.find({'colors': 'red'}).explain()
{
"queryPlanner" : {
"plannerVersion" : 1,
"namespace" : "protrain.col1",
"indexFilterSet" : false,
"parsedQuery" : {
"colors" : {
"$eq" : "red"
}
},
"winningPlan" : {
"stage" : "FETCH",
"inputStage" : {
"stage" : "IXSCAN", <!---- INDEX HAS BEEN USED
"keyPattern" : {
"colors" : 1
},
"indexName" : "colors_1",
"isMultiKey" : true,
"multiKeyPaths" : {
"colors" : [
"colors"
]
},
"isUnique" : false,
"isSparse" : false,
"isPartial" : false,
"indexVersion" : 2,
"direction" : "forward",
"indexBounds" : {
"colors" : [
"[\"red\", \"red\"]"
]
}
}
},
"rejectedPlans" : [ ]
},
"serverInfo" : {
"host" : "bee34f15fe28",
"port" : 27017,
"version" : "3.4.4",
"gitVersion" : "888390515874a9debd1b6c5d36559ca86b44babd"
},
"ok" : 1
}
For structures where you have structured indexes, you could use the array position to index fields inside arrays:
{
'_id': 'BB167E2D61909E848EBC96C7B33251AC',
'hist': {
'map': {
'10': 1
}
},
'wayPoints': [{
'bhf_name': 'Zinsgutstr.(Berlin)',
'ext_no': 900180542,
'lat': 52.435158,
'lon': 13.559086,
'puic': 86,
'time': {
'dateTime': '2018-01-10T09: 38: 00',
'offset': {
'totalSeconds': 3600
}
},
'train_name': 'Bus162'
},
{
'bhf_name': 'SAdlershof(Berlin)',
'ext_no': 900193002,
'lat': 52.435104,
'lon': 13.54055,
'puic': 86,
'time': {
'dateTime': '2018-01-10T09: 44: 00',
'offset': {
'totalSeconds': 3600
}
},
'train_name': 'Bus162'
}]
}
db.col.createIndex( { "wayPoints.0.ext_no":1 } )
db.col.createIndex( { "wayPoints.0.train_name":1 } )
db.col.createIndex( { "wayPoints.1.ext_no":1 } )
db.col.createIndex( { "wayPoints.1.train_name":1 } )
> db.col.find(
... {
... "wayPoints.ext_no": 900180542
... }
... ,
... {
... "wayPoints.ext_no":1,
... "wayPoints.train_name":1,
... "wayPoints.time":1
... }
... ).explain()
{
"queryPlanner" : {
"plannerVersion" : 1,
"namespace" : "db.col",
"indexFilterSet" : false,
"parsedQuery" : {
"wayPoints.ext_no" : {
"$eq" : 900180542
}
},
"winningPlan" : {
"stage" : "PROJECTION",
"transformBy" : {
"wayPoints.ext_no" : 1,
"wayPoints.train_name" : 1,
"wayPoints.time" : 1
},
"inputStage" : {
"stage" : "FETCH",
"inputStage" : {
"stage" : "IXSCAN",
"keyPattern" : {
"wayPoints.ext_no" : 1
},
"indexName" : "wayPoints.ext_no_1",
"isMultiKey" : true,
"multiKeyPaths" : {
"wayPoints.ext_no" : [
"wayPoints"
]
},
"isUnique" : false,
"isSparse" : false,
"isPartial" : false,
"indexVersion" : 2,
"direction" : "forward",
"indexBounds" : {
"wayPoints.ext_no" : [
"[900180542.0, 900180542.0]"
]
}
}
}
},
"rejectedPlans" : [ ]
},
"serverInfo" : {
"host" : "bee34f15fe28",
"port" : 27017,
"version" : "3.4.4",
"gitVersion" : "888390515874a9debd1b6c5d36559ca86b44babd"
},
"ok" : 1
}