Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
590 views
in Technique[技术] by (71.8m points)

google cloud data fusion - CDAP PUBSUB Realtime Pipleine MAP Datatype

Im trying to pull through a pubsub subscription using cdap realtime pipeline.

I can connect the pubsub up but the attributes column is coming through as a MAP datatype and I seen unable to do anything with it (I need the data in it).

The idea is to take that message and place it in a database for further processing.

Is there any way to take the MAP data type and convert it to something useful?

question from:https://stackoverflow.com/questions/65602658/cdap-pubsub-realtime-pipleine-map-datatype

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can convert the column using JavaScript transform plugin.

output.attributes = JSON.stringify(output.attributes);

This will convert the map type to a string.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...