Skip to content

Commit

Permalink
add time field
Browse files Browse the repository at this point in the history
  • Loading branch information
lindeskar committed Jul 12, 2021
1 parent 4602e33 commit bd32e93
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dataflow-udf-js.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
function transform(inJson) {
var obj = { "data" : JSON.parse(inJson) };
obj._metadata = {
time: obj.data.timestamp,
source: obj.data.logName || "default",
sourcetype: "google:gcp:pubsub:message"
};
Expand Down

0 comments on commit bd32e93

Please sign in to comment.