geodegfsh

I want to put PDX like data into a region with GFSH


In GFSH I want to run a put command to create a key and value with set of PDX like values... For example:

put --key=('test1') --value=('Client':'XYZ', 'MsgType':'R', 'OrdType':'C', 'SecurityType':'FOR', 'Symbol':'EUR/USD', 'QuoteReqId':'test1', 'OrderQty':'100000', 'OrderQty2':'0', 'Reference1':'GFSH Test', 'StreamingQuoteDuration':'30', 'FutSettDate':'20200102', 'Currency':'EUR') --region=/myRegion

This is returning the error

You cannot specify ':'R', 'OrdType':'C', 'SecurityType':'FOR', 'Symbol':'EUR/USD', 'QuoteReqId':'test1', 'OrderQty':'100000', 'OrderQty2':'0', 'Reference1':'GFSH Test', 'StreamingQuoteDuration' :'30', 'FutSettDate':'20200102', 'Currency':'EUR')' as another value for the default ('') option in a single command. You already provided 'MsgType' earlier. Did you forget to add quotes around the value of another option?


Solution

  • I tried @Juan Ramos answer above but it did not quite work. The spaces aren't the issue - what makes the initial put work is adding double quotes around the value string in brackets:

    put --key=('test1') --value="('Client':'XYZ', 'MsgType':'R', 'OrdType':'C', 'SecurityType':'FOR', 'Symbol':'EUR/USD', 'QuoteReqId':'test1', 'OrderQty':'100000', 'OrderQty2':'0', 'Reference1':'GFSH Test', 'StreamingQuoteDuration':'30', 'FutSettDate':'20200102', 'Currency':'EUR')" --region=/myRegion
    

    That still puts a string in the region and does not make PDX representation of the data though.