Individual transcode times 2-3X that VS all done in single job/config file in google cloud - google-cloud-transcoder

Transcode jobs taking exponentially longer if done individually vs as part of a single config file/job.
First, use a config file to transcode 5 or more versions of a piece of content, note the total transcode time. Second, break out each version from the original config file into single transcode jobs and note the time each takes individually, add them all up then compare to the time it took to do the first job when done as a whole/single config file. I am seeing a 2-3X increase in transcode times.
Job Config { "config": { "elementaryStreams": [ { "key": "360p1-125kbps-h264", "videoStream": { "codec": "h264", "profile": "high", "preset": "slow", "widthPixels": 640, "heightPixels": 360, "frameRate": 29.97, "pixelFormat": "yuv420p", "bitrateBps": 125000, "rateControlMode": "vbr", "enableTwoPass": true, "gopDuration": "4s", "allowOpenGop": true, "entropyCoder": "cabac", "bFrameCount": 3, "bPyramid": true } }, { "key": "360p2-250kbps-h264", "videoStream": { "codec": "h264", "profile": "high", "preset": "slow", "widthPixels": 640, "heightPixels": 360, "frameRate": 29.97, "pixelFormat": "yuv420p", "bitrateBps": 250000, "rateControlMode": "vbr", "enableTwoPass": true, "gopDuration": "4s", "allowOpenGop": true, "entropyCoder": "cabac", "bFrameCount": 3, "bPyramid": true } }, { "key": "480p1-400kbps-h264", "videoStream": { "codec": "h264", "profile": "high", "preset": "slow", "widthPixels": 854, "heightPixels": 480, "frameRate": 29.97, "pixelFormat": "yuv420p", "bitrateBps": 400000, "rateControlMode": "vbr", "enableTwoPass": true, "gopDuration": "4s", "allowOpenGop": true, "entropyCoder": "cabac", "bFrameCount": 3, "bPyramid": true } }, { "key": "480p2-800kbps-h264", "videoStream": { "codec": "h264", "profile": "high", "preset": "slow", "widthPixels": 854, "heightPixels": 480, "frameRate": 29.97, "pixelFormat": "yuv420p", "bitrateBps": 800000, "rateControlMode": "vbr", "enableTwoPass": true, "gopDuration": "4s", "allowOpenGop": true, "entropyCoder": "cabac", "bFrameCount": 3, "bPyramid": true } }, { "key": "720p-1600kbps-h264", "videoStream": { "codec": "h264", "profile": "high", "preset": "slow", "widthPixels": 1280, "heightPixels": 720, "frameRate": 29.97, "pixelFormat": "yuv420p", "bitrateBps": 1600000, "rateControlMode": "vbr", "enableTwoPass": true, "gopDuration": "4s", "allowOpenGop": true, "entropyCoder": "cabac", "bFrameCount": 3, "bPyramid": true } }, { "key": "720p-2500kbps-h264", "videoStream": { "codec": "h264", "profile": "high", "preset": "slow", "widthPixels": 1280, "heightPixels": 720, "frameRate": 29.97, "pixelFormat": "yuv420p", "bitrateBps": 2500000, "rateControlMode": "vbr", "enableTwoPass": true, "gopDuration": "4s", "allowOpenGop": true, "entropyCoder": "cabac", "bFrameCount": 3, "bPyramid": true } }, { "key": "1080p-5500kbps-h264", "videoStream": { "codec": "h264", "profile": "high", "preset": "slow", "widthPixels": 1920, "heightPixels": 1080, "frameRate": 29.97, "pixelFormat": "yuv420p", "bitrateBps": 5500000, "rateControlMode": "vbr", "enableTwoPass": true, "gopDuration": "4s", "allowOpenGop": true, "entropyCoder": "cabac", "bFrameCount": 3, "bPyramid": true } } ], "muxStreams": [ { "key": "360p1-125kbps-h264", "container": "mp4", "elementaryStreams": [ "360p1-125kbps-h264" ] }, { "key": "360p2-250kbps-h264", "container": "mp4", "elementaryStreams": [ "360p2-250kbps-h264" ] }, { "key": "460p1-400kbps-h264", "container": "mp4", "elementaryStreams": [ "480p1-400kbps-h264" ] }, { "key": "460p2-800kbps-h264", "container": "mp4", "elementaryStreams": [ "480p2-800kbps-h264" ] }, { "key": "720p-1600kbps-h264", "container": "mp4", "elementaryStreams": [ "720p-1600kbps-h264" ] }, { "key": "720p-2500kbps-h264", "container": "mp4", "elementaryStreams": [ "720p-2500kbps-h264" ] }, { "key": "1080p-5500kbps-h264", "container": "mp4", "elementaryStreams": [ "1080p-5500kbps-h264" ] } ] } }

This behavior is working as intended mainly because there's a lot of duplicate work done with many jobs (so things like downloading the input file and other parts of our pipeline need to happen many times rather than once), and scheduling transcodes internally for many jobs will most likely never be as fast as well.
Transcoder API handles transcoding in parallel (we call it partition processing. Divide the long input file into partitions, and process each partition(2 min long video by default) in parallel) no matter your config is with 1 elementary stream or 10 elementary streams.
Back to your original question: 1 job with 10 elementary streams v.s. 10 jobs each with 1 elementary stream.
They all handled in partition processing(parallel transcoding), however, 10 jobs each with 1 elementary stream do lots of duplicated tasks each job, thus requires longer time to finish in the end if you simply add the time together.

Related

Tweepy - Differences with status info delivered by Twitter API

Does somebody knows why Twitter API delivers different information for the same status using different methods?
I'm working on a Twitter bot to collect transit events. I'm facing some issues with the information delivered by the API, due to I've identified that depending on the method, the API can deliver different result for the same Tweet/status.
Here an example for the Tweet ID:1531517617562951682 using api.get_status, the status doesn't have the attributes extended_tweet and timestamp_ms.
Thanks in advance.
{
"created_at": "Tue May 31 06:07:08 +0000 2022",
"id": 1531517617562951682,
"id_str": "**1531517617562951682**",
"text": "01:07 #Precauci\u00f3nVial | Por percance en Av. Ing. Eduardo Molina a la altura de Av. Talism\u00e1n, col. San Pedro el Chic\u2026 (**removed_url)",
**"truncated": true**,
"entities": {
"hashtags": [
{
"text": "Precauci\u00f3nVial",
"indices": [
6,
21
]
}
],
"symbols": [],
"user_mentions": [],
"urls": [
{
"url": **removed_url_short,
"expanded_url": ,
"display_url": ,
"indices": [
117,
140
]
}
]
},
"source": "Twitter Web App",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 166594238,
"id_str": "166594238",
"name": "OVIAL_SSCCDMX",
"screen_name": "OVIALCDMX",
"location": "Liverpool #136, Col. Ju\u00e1rez",
"description": "Centro de Orientaci\u00f3n Vial de la Secretar\u00eda de Seguridad Ciudadana de la Ciudad de M\u00e9xico.",
"url":,
"entities": {
"url": {
"urls": [
{
"url": ,
"expanded_url": ,
"display_url": "ssc.cdmx.gob.mx",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": []
}
},
"protected": false,
"followers_count": 1866313,
"friends_count": 125,
"listed_count": 4188,
"created_at": "Wed Jul 14 15:00:43 +0000 2010",
"favourites_count": 2748,
"utc_offset": null,
"time_zone": null,
"geo_enabled": true,
"verified": true,
"statuses_count": 1110675,
"lang": null,
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "000000",
"profile_background_image_url":
"profile_background_image_url_https": ,
"profile_background_tile": false,
"profile_image_url": ,
"profile_image_url_https": ,
"profile_banner_url": ,
"profile_link_color": "BC8F8F",
"profile_sidebar_border_color": "000000",
"profile_sidebar_fill_color": "000000",
"profile_text_color": "000000",
"profile_use_background_image": false,
"has_extended_profile": false,
"default_profile": false,
"default_profile_image": false,
"following": false,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none",
"withheld_in_countries": []
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"retweet_count": 0,
"favorite_count": 0,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "es"
}
Same status collected with a stream.Attributes extended_tweet and timestamp are present on the status:
{
"created_at": "Tue May 31 06:07:08 +0000 2022",
"id": 1531517617562951682,
"id_str": "1531517617562951682",
"text": "01:07 #Precauci\u00f3nVial | Por percance en Av. Ing. Eduardo Molina a la altura de Av. Talism\u00e1n, col. San Pedro el Chic\u2026 (**removed url)",
"display_text_range": [
0,
140
],
"source": "Twitter Web App",
"truncated": true,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 166594238,
"id_str": "166594238",
"name": "OVIAL_SSCCDMX",
"screen_name": "OVIALCDMX",
"location": "Liverpool #136, Col. Ju\u00e1rez",
"url": "http://ssc.cdmx.gob.mx",
"description": "Centro de Orientaci\u00f3n Vial de la Secretar\u00eda de Seguridad Ciudadana de la Ciudad de M\u00e9xico.",
"translator_type": "none",
"protected": false,
"verified": true,
"followers_count": 1866203,
"friends_count": 125,
"listed_count": 4188,
"favourites_count": 2748,
"statuses_count": 1110325,
"created_at": "Wed Jul 14 15:00:43 +0000 2010",
"utc_offset": null,
"time_zone": null,
"geo_enabled": true,
"lang": null,
"contributors_enabled": false,
"is_translator": false,
"profile_background_color": "000000",
"profile_background_image_url": ,
"profile_background_image_url_https": ,
"profile_background_tile": false,
"profile_link_color": "BC8F8F",
"profile_sidebar_border_color": "000000",
"profile_sidebar_fill_color": "000000",
"profile_text_color": "000000",
"profile_use_background_image": false,
"profile_image_url": ,
"profile_image_url_https": ,
"profile_banner_url": ,
"default_profile": false,
"default_profile_image": false,
"following": null,
"follow_request_sent": null,
"notifications": null,
"withheld_in_countries": []
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"extended_tweet": {
"full_text": "01:07 #Precauci\u00f3nVial | Por percance en Av. Ing. Eduardo Molina a la altura de Av. Talism\u00e1n, col. San Pedro el Chico, servicios de emergencia acuden al lugar. (**removed url)",
"display_text_range": [
0,
158
],
"entities": {
"hashtags": [
{
"text": "Precauci\u00f3nVial",
"indices": [
6,
21
]
}
],
"urls": [],
"user_mentions": [],
"symbols": [],
"media": [
{
"id": 1531517217703092224,
"id_str": "1531517217703092224",
"indices": [
159,
182
],
"additional_media_info": {
"monetizable": false
},
"media_url": ,
"media_url_https": ,
"url":,
"display_url": "pic.twitter.com/q3seKvyPIM",
"expanded_url": ,
"type": "video",
"video_info": {
"aspect_ratio": [
16,
9
],
"duration_millis": 4003,
"variants": [
{
"content_type": "application/x-mpegURL",
"url": ""
},
{
"bitrate": 832000,
"content_type": "video/mp4",
"url": "
},
{
"bitrate": 256000,
"content_type": "video/mp4",
"url":
}
]
},
"sizes": {
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"large": {
"w": 640,
"h": 360,
"resize": "fit"
},
"medium": {
"w": 640,
"h": 360,
"resize": "fit"
},
"small": {
"w": 640,
"h": 360,
"resize": "fit"
}
}
}
]
},
"extended_entities": {
"media": [
{
"id": 1531517217703092224,
"id_str": "1531517217703092224",
"indices": [
159,
182
],
"additional_media_info": {
"monetizable": false
},
"media_url": ,
"media_url_https": ,
"url": ,
"display_url": ,
"expanded_url": ,
"type": "video",
"video_info": {
"aspect_ratio": [
16,
9
],
"duration_millis": 4003,
"variants": [
{
"content_type": "application/x-mpegURL",
"url": "
},
{
"bitrate": 832000,
"content_type": "video/mp4",
"url": "
},
{
"bitrate": 256000,
"content_type": "video/mp4",
"url": ""
}
]
},
"sizes": {
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"large": {
"w": 640,
"h": 360,
"resize": "fit"
},
"medium": {
"w": 640,
"h": 360,
"resize": "fit"
},
"small": {
"w": 640,
"h": 360,
"resize": "fit"
}
}
}
]
}
},
"quote_count": 0,
"reply_count": 0,
"retweet_count": 0,
"favorite_count": 0,
"entities": {
"hashtags": [
{
"text": "Precauci\u00f3nVial",
"indices": [
6,
21
]
}
],
"urls": [
{
"url": ,
"expanded_url": ,
"display_url": "twitter.com/i/web/status/1\u2026",
"indices": [
117,
140
]
}
],
"user_mentions": [],
"symbols": []
},
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"filter_level": "low",
"lang": "es",
"**timestamp_ms**": "1653977228905"
}
For v1.1, the extended Tweet information is available by default in the streaming API, but for the REST endpoints, you need to add the tweet_mode=extended parameter to your request to retrieve the full text.
In V2, there is no longer a concept of extended (beyond 140 characters) Tweets. All Tweets are natively up to 280 characters as standard.

WebM Spritesheet/Transcode from canonical config failed in google cloud

WebM Spritesheet/Transcode from canonical config failed to complete with error message: Request field config.editList[0].startTimeOffset is 0s, expected start time less than the minimum duration of all inputs for this atom (0s).
The config used is from https://cloud.google.com/transcoder/docs/how-to/generate-spritesheet#generate_image_periodically
Project Number: PROJECT-NUMBER
Job ID: projects/PROJECT-NUMBER/locations/us-central1/jobs/JOB-ID
Location: us-central1
Job Config
{
"name": "projects/PROJECT-NUMBER/locations/us-central1/jobs/JOB-ID",
"config": {
"inputs": [
{
"key": "input0",
"uri": "gs://input_video.webm"
}
],
"editList": [
{
"key": "atom0",
"inputs": [
"input0"
],
"startTimeOffset": "0s"
}
],
"elementaryStreams": [
{
"videoStream": {
"codec": "h264",
"profile": "high",
"preset": "veryfast",
"heightPixels": 360,
"widthPixels": 640,
"pixelFormat": "yuv420p",
"bitrateBps": 550000,
"rateControlMode": "vbr",
"crfLevel": 21,
"vbvSizeBits": 550000,
"vbvFullnessBits": 495000,
"gopDuration": "3s",
"entropyCoder": "cabac",
"frameRate": 60
},
"key": "video-stream0"
},
{
"audioStream": {
"codec": "aac",
"bitrateBps": 64000,
"channelCount": 2,
"channelLayout": [
"fl",
"fr"
],
"sampleRateHertz": 48000
},
"key": "audio-stream0"
}
],
"muxStreams": [
{
"key": "sd",
"fileName": "sd.mp4",
"container": "mp4",
"elementaryStreams": [
"video-stream0",
"audio-stream0"
]
}
],
"output": {
"uri": "gs://output/"
},
"spriteSheets": [
{
"format": "jpeg",
"filePrefix": "small-sprite-sheet",
"spriteWidthPixels": 64,
"spriteHeightPixels": 32,
"startTimeOffset": "0s",
"interval": "7s",
"quality": 100
},
{
"format": "jpeg",
"filePrefix": "large-sprite-sheet",
"spriteWidthPixels": 128,
"spriteHeightPixels": 72,
"startTimeOffset": "0s",
"interval": "7s",
"quality": 100
}
]
},
"state": "FAILED",
"failureReason": "Job validation failed: Request field config.editList[0].startTimeOffset is 0s, expected start time less than the minimum duration of all inputs for this atom (0s).",
"ttlAfterCompletionDays": 30
}
Looks like the duration we're calculated for the input is 0 seconds. So either the input is empty, or we're unable to calculate the duration of the input. Do you know if the former is the case? For the latter, if the customer provides an endTimeOffset in their editList, then we should use that duration, which would get past this validation error.
Totally missed the input link in comment#1, sorry about that! So when I run ffprobe on the input, I get
Metadata:
encoder : Chrome
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0(eng): Audio: opus, 48000 Hz, mono, fltp (default)
Stream #0:1(eng): Video: h264 (Baseline), yuv420p(progressive), 640x480 [SAR 1:1 DAR 4:3], 29.97 fps, 29.97 tbr, 1k tbn, 2k tbc (default)
We do generate the editList, but in this case we couldn't get valid duration from the input. My guess is that this worked previously because the inputs used contained timing metadata, though I could help confirm that if you have the input from a job that went through successfully. I'd suggest specifying the endTimeOffset in the job config if possible (especially if different encoding is used from input-to-input).

Transcoder fails to write output due to permission issue

The transcode job is able to read the file but the output directory is not getting created.
I checked the log and the error is due to permission issue with Storage. I would like to get your help related to this issue.
Logs:
The response of the video transcoding is as follows.
{
"name": "projects/PROJECT-NUMBER/locations/us-central1/jobs/JOB-ID",
"config": {
"inputs": [
{
"key": "input0",
"uri": "gs://input.mp4"
}
],
"editList": [
{
"key": "atom0",
"inputs": [
"input0"
],
"startTimeOffset": "0s"
}
],
"elementaryStreams": [
{
"videoStream": {
"codec": "h264",
"profile": "high",
"preset": "veryfast",
"heightPixels": 720,
"widthPixels": 1280,
"pixelFormat": "yuv420p",
"bitrateBps": 1500000,
"rateControlMode": "vbr",
"crfLevel": 21,
"vbvSizeBits": 1500000,
"vbvFullnessBits": 1350000,
"gopDuration": "3s",
"entropyCoder": "cabac",
"frameRate": 60
},
"key": "video-streamR480P"
},
{
"videoStream": {
"codec": "h264",
"profile": "high",
"preset": "veryfast",
"heightPixels": 1080,
"widthPixels": 1920,
"pixelFormat": "yuv420p",
"bitrateBps": 3000000,
"rateControlMode": "vbr",
"crfLevel": 21,
"vbvSizeBits": 3000000,
"vbvFullnessBits": 2700000,
"gopDuration": "3s",
"entropyCoder": "cabac",
"frameRate": 60
},
"key": "video-streamR720P"
},
{
"videoStream": {
"codec": "h264",
"profile": "high",
"preset": "veryfast",
"heightPixels": 1440,
"widthPixels": 2560,
"pixelFormat": "yuv420p",
"bitrateBps": 6000000,
"rateControlMode": "vbr",
"crfLevel": 21,
"vbvSizeBits": 6000000,
"vbvFullnessBits": 5400000,
"gopDuration": "3s",
"entropyCoder": "cabac",
"frameRate": 60
},
"key": "video-streamR1080P"
},
{
"videoStream": {
"codec": "h264",
"profile": "high",
"preset": "veryfast",
"heightPixels": 2160,
"widthPixels": 3840,
"pixelFormat": "yuv420p",
"bitrateBps": 10000000,
"rateControlMode": "vbr",
"crfLevel": 21,
"vbvSizeBits": 10000000,
"vbvFullnessBits": 9000000,
"gopDuration": "3s",
"entropyCoder": "cabac",
"frameRate": 60
},
"key": "video-streamR1440P"
},
{
"audioStream": {
"codec": "aac",
"bitrateBps": 512000,
"channelCount": 2,
"channelLayout": [
"fl",
"fr"
],
"sampleRateHertz": 48000
},
"key": "audio-stream"
}
],
"muxStreams": [
{
"key": "mux-streamR480P",
"fileName": "mux-streamR480P.m4s",
"container": "fmp4",
"elementaryStreams": [
"video-streamR480P"
]
},
{
"key": "mux-streamR720P",
"fileName": "mux-streamR720P.m4s",
"container": "fmp4",
"elementaryStreams": [
"video-streamR720P"
]
},
{
"key": "mux-streamR1080P",
"fileName": "mux-streamR1080P.m4s",
"container": "fmp4",
"elementaryStreams": [
"video-streamR1080P"
]
},
{
"key": "mux-streamR1440P",
"fileName": "mux-streamR1440P.m4s",
"container": "fmp4",
"elementaryStreams": [
"video-streamR1440P"
]
},
{
"key": "mux-streamaudio-stream",
"fileName": "mux-streamaudio-stream.m4s",
"container": "fmp4",
"elementaryStreams": [
"audio-stream"
]
}
],
"manifests": [
{
"fileName": "manifest.mpd",
"type": "DASH",
"muxStreams": [
"mux-streamR480P",
"mux-streamR720P",
"mux-streamR1080P",
"mux-streamR1440P",
"mux-streamaudio-stream"
]
},
{
"fileName": "master.m3u8",
"type": "HLS",
"muxStreams": [
"mux-streamR480P",
"mux-streamR720P",
"mux-streamR1080P",
"mux-streamR1440P",
"mux-streamaudio-stream"
]
}
],
"output": {
"uri": "gs://output-bucket/"
}
}, "ttlAfterCompletionDays": 30
}
Job_ID is XXXXXXXXXXXXXXXXXXXXXXXX.
Please help.
I have checked the job and found the failure message:
Job validation failed: atom atom0 does not have any inputs (input0) with an audio track
It has nothing to do with storage permission. Can you fix the edit list with an input that includes audio track and try again?
I think the permission error that you observe is happening on the client side and is not related to the Transcoder API

how to set a trigger to change dates of all related nodes in neo4j?

How to set a trigger in a way that when the date of a parent node changes -its end date and the start dates of its related nodes change automatically? My trigger looks something like this-
CALL apoc.trigger.add(
'update_date',
'UNWIND apoc.trigger.propertiesByKey({assignedNodeProperties},"start_date") as prop
WITH prop.node as n
match (n)-[:precedes_fs]->(m)
SET n.end_date = apoc.date.toISO8601(apoc.date.add(apoc.date.fromISO8601(n.start_date), 'ms', n.duration, 'd'), "ms")
, m.start_date = apoc.date.toISO8601(apoc.date.add(apoc.date.fromISO8601(n.end_date), 'ms', 1, 'd'), "ms")', {phase:'after'});
but my query-
match(n) where n.wbs="1.3" set n.start_date="2019-03-19T11:30:00.000Z"
is taking too long to execute(no result at all- the query keeps spinning in neo4j browser and nothing in debug log). I am using Neo4j Enterprise version 3.5.4 - Any suggestions are appreciated
Edit- My node properties look something like this-(all of them have a single label-task)
{
"marked": "false",
"end_date": "2019-04-25T11:30:00.000Z",
"parent": "d4e051af-91da-4024-96e7-dfe518ef54980",
"early_start_date": "2019-03-06T02:30:00.000Z",
"early_finish_date": "2019-04-25T11:30:00.000Z",
"late_start_date": "2019-03-06T02:30:00.000Z",
"wbs": "1",
"difference": 50,
"isCritical": false,
"late_finish_date": "2019-04-25T11:30:00.000Z",
"text": "Construction of House",
"id": "d4e051af-91da-4024-96e7-dfe518ef54981",
"task_type": "project",
"start_date": "2019-03-06T02:30:00.000Z"
}
{
"marked": "false",
"end_date": "2019-04-18T11:30:00.000Z",
"parent": "d4e051af-91da-4024-96e7-dfe518ef54981",
"early_start_date": "2019-04-12T02:30:00.000Z",
"early_finish_date": "2019-04-18T11:30:00.000Z",
"late_start_date": "2019-04-12T02:30:00.000Z",
"wbs": "1.9",
"type": 0,
"lag": 0,
"difference": 6,
"isCritical": false,
"late_finish_date": "2019-04-18T11:30:00.000Z",
"text": "Concreting of columns",
"id": "d4e051af-91da-4024-96e7-dfe518ef549810",
"task_type": "task",
"start_date": "2019-04-12T02:30:00.000Z"
}
{
"marked": "false",
"end_date": "2019-04-23T11:30:00.000Z",
"parent": "d4e051af-91da-4024-96e7-dfe518ef54981",
"early_start_date": "2019-04-19T02:30:00.000Z",
"early_finish_date": "2019-04-23T11:30:00.000Z",
"late_start_date": "2019-04-19T02:30:00.000Z",
"wbs": "1.10",
"type": 0,
"lag": 0,
"difference": 4,
"isCritical": false,
"late_finish_date": "2019-04-23T11:30:00.000Z",
"text": "Shuttering of slab",
"id": "d4e051af-91da-4024-96e7-dfe518ef549811",
"task_type": "task",
"start_date": "2019-04-19T02:30:00.000Z"
}
{
"marked": "false",
"end_date": "2019-04-25T11:30:00.000Z",
"parent": "d4e051af-91da-4024-96e7-dfe518ef54981",
"early_start_date": "2019-04-24T02:30:00.000Z",
"early_finish_date": "2019-04-25T11:30:00.000Z",
"late_start_date": "2019-04-24T02:30:00.000Z",
"wbs": "1.11",
"type": 0,
"lag": 0,
"difference": 1,
"isCritical": false,
"late_finish_date": "2019-04-25T11:30:00.000Z",
"text": "Reinforcement of slab",
"id": "d4e051af-91da-4024-96e7-dfe518ef549812",
"task_type": "task",
"start_date": "2019-04-24T02:30:00.000Z"
}
{
"marked": "111",
"end_date": "2019-03-06T11:30:00.000Z",
"parent": "d4e051af-91da-4024-96e7-dfe518ef54981",
"early_start_date": "2019-03-06T02:30:00.000Z",
"early_finish_date": "2019-03-06T11:30:00.000Z",
"late_start_date": "2019-04-25T02:30:00.000Z",
"wbs": "1.12",
"difference": 0,
"isCritical": false,
"late_finish_date": "2019-04-25T11:30:00.000Z",
"text": "Concreting of slab",
"id": "d4e051af-91da-4024-96e7-dfe518ef549813",
"task_type": "task",
"start_date": "2019-03-06T02:30:00.000Z"
}
{
"marked": "false",
"end_date": "2019-03-11T11:30:00.000Z",
"parent": "d4e051af-91da-4024-96e7-dfe518ef54981",
"early_start_date": "2019-03-06T02:30:00.000Z",
"early_finish_date": "2019-03-11T11:30:00.000Z",
"late_start_date": "2019-03-06T02:30:00.000Z",
"wbs": "1.1",
"difference": 4,
"isCritical": false,
"late_finish_date": "2019-03-11T11:30:00.000Z",
"text": "Marking of footing",
"id": "d4e051af-91da-4024-96e7-dfe518ef54982",
"task_type": "task",
"start_date": "2019-03-07T02:30:00.000Z"
}
{
"marked": "true",
"end_date": "2019-03-13T11:30:00.000Z",
"parent": "d4e051af-91da-4024-96e7-dfe518ef54981",
"early_start_date": "2019-03-12T02:30:00.000Z",
"early_finish_date": "2019-03-13T11:30:00.000Z",
"late_start_date": "2019-03-12T02:30:00.000Z",
"wbs": "1.2",
"type": 0,
"lag": 0,
"difference": 2,
"isCritical": false,
"late_finish_date": "2019-03-13T11:30:00.000Z",
"text": "###",
"id": "d4e051af-91da-4024-96e7-dfe518ef54983",
"task_type": "task",
"start_date": "2019-03-11T11:30:00.000Z"
}
{
"marked": "true",
"end_date": "2019-03-19T11:30:00.000Z",
"parent": "d4e051af-91da-4024-96e7-dfe518ef54981",
"early_start_date": "2019-03-14T02:30:00.000Z",
"early_finish_date": "2019-03-19T11:30:00.000Z",
"actual_start_date": "$$$$",
"late_start_date": "2019-03-14T02:30:00.000Z",
"wbs": "1.3",
"type": 0,
"lag": 0,
"difference": 5,
"isCritical": false,
"late_finish_date": "2019-03-19T11:30:00.000Z",
"text": "Footing Reinforcement",
"id": "d4e051af-91da-4024-96e7-dfe518ef54984",
"task_type": "task",
"start_date": "2019-03-14T02:30:00.000Z"
}
{
"marked": "false",
"end_date": "2019-03-25T11:30:00.000Z",
"parent": "d4e051af-91da-4024-96e7-dfe518ef54981",
"early_start_date": "2019-03-20T02:30:00.000Z",
"early_finish_date": "2019-03-25T11:30:00.000Z",
"actual_start_date": "$$$$",
"late_start_date": "2019-03-20T02:30:00.000Z",
"wbs": "1.4",
"type": 0,
"lag": 0,
"difference": 5,
"isCritical": false,
"late_finish_date": "2019-03-25T11:30:00.000Z",
"text": "Footing shutteirng",
"id": "d4e051af-91da-4024-96e7-dfe518ef54985",
"task_type": "task",
"start_date": "2019-03-20T02:30:00.000Z"
}
{
"marked": "false",
"end_date": "2019-03-26T11:30:00.000Z",
"parent": "d4e051af-91da-4024-96e7-dfe518ef54981",
"early_start_date": "2019-03-26T02:30:00.000Z",
"early_finish_date": "2019-03-26T11:30:00.000Z",
"late_start_date": "2019-03-26T02:30:00.000Z",
"wbs": "1.5",
"type": 0,
"lag": 0,
"difference": 0,
"isCritical": false,
"late_finish_date": "2019-03-26T11:30:00.000Z",
"text": "Footing Concreting",
"id": "d4e051af-91da-4024-96e7-dfe518ef54986",
"task_type": "task",
"start_date": "2019-03-26T02:30:00.000Z"
}
{
"marked": "false",
"end_date": "2019-04-01T11:30:00.000Z",
"parent": "d4e051af-91da-4024-96e7-dfe518ef54981",
"early_start_date": "2019-03-27T02:30:00.000Z",
"early_finish_date": "2019-04-01T11:30:00.000Z",
"late_start_date": "2019-03-27T02:30:00.000Z",
"wbs": "1.6",
"type": 0,
"lag": 0,
"difference": 5,
"isCritical": false,
"late_finish_date": "2019-04-01T11:30:00.000Z",
"text": "Backfilling",
"id": "d4e051af-91da-4024-96e7-dfe518ef54987",
"task_type": "task",
"start_date": "2019-03-27T02:30:00.000Z"
}
{
"marked": "false",
"end_date": "2019-04-05T11:30:00.000Z",
"parent": "d4e051af-91da-4024-96e7-dfe518ef54981",
"early_start_date": "2019-04-02T02:30:00.000Z",
"early_finish_date": "2019-04-05T11:30:00.000Z",
"late_start_date": "2019-04-02T02:30:00.000Z",
"wbs": "1.7",
"type": 0,
"lag": 0,
"difference": 3,
"isCritical": false,
"late_finish_date": "2019-04-05T11:30:00.000Z",
"text": "Reinforcement of columns",
"id": "d4e051af-91da-4024-96e7-dfe518ef54988",
"task_type": "task",
"start_date": "2019-04-04T02:30:00.000Z"
}
{
"marked": "false",
"end_date": "2019-04-11T11:30:00.000Z",
"parent": "d4e051af-91da-4024-96e7-dfe518ef54981",
"early_start_date": "2019-04-08T02:30:00.000Z",
"early_finish_date": "2019-04-11T11:30:00.000Z",
"late_start_date": "2019-04-08T02:30:00.000Z",
"wbs": "1.8",
"type": 0,
"lag": 0,
"difference": 3,
"isCritical": false,
"late_finish_date": "2019-04-11T11:30:00.000Z",
"text": "Shuttering of columns",
"id": "d4e051af-91da-4024-96e7-dfe518ef54989",
"task_type": "task",
"start_date": "2019-04-08T02:30:00.000Z"
}
```[enter image description here][1]
[1]: https://i.stack.imgur.com/OGLEe.png
Seems like you are updating a property in the trigger which is causing the trigger to fire again thus getting into an infinite cycle. That's why it doesn't return.
There is an experimental Graphaware triggers module that may just work for your case, https://github.com/graphaware/neo4j-triggers

How to fetch specific details from the result of twitter api?

With twitter api named GET friends/list, https://api.twitter.com/1.1/friends/list.json i could get details of every user i am following. What i need is some particular data, 'geo' and 'coordinates' to be specific. There do exist a parameter named 'skip_status=true' to skip the status. But please let me know if either 'geo and coordinates' or 'status' alone could be fetched.
"users": [
{
"id": 3233xxxxxx,
"id_str": "3233428303",
"name": "Mars",
"screen_name": "Mars9411",
"location": "",
"description": "",
"url": null,
"entities": {
"description": {
"urls": []
}
},
"protected": false,
"followers_count": 1,
"friends_count": 0,
"listed_count": 0,
"created_at": "Tue Jun 02 09:58:03 +0000 2015",
"favourites_count": 0,
"utc_offset": null,
"time_zone": null,
"geo_enabled": true,
"verified": false,
"statuses_count": 9,
"lang": "en",
"status": {
"created_at": "Tue Oct 27 12:31:11 +0000 2015",
"id": 6589842841878xxxx,
"id_str": "65898428418781xxxx",
"text": "Hey, Download the app in your phone and you can have an Emergency Contact for FREE. It's Great.\nhttps://t.co/kEZg",
"source": "iOS",
"truncated": false,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"geo": {
"type": "Point",
"coordinates": [
28.612486,
77.377425
]
},
"coordinates": {
"type": "Point",
"coordinates": [
77.377425,
28.612486
]
},
"place": {
"id": "2e6064382c71b343",
"url": "https://api.twitter.com/1.1/geo/id/2e606438.json",
"place_type": "city",
"name": "Noida",
"full_name": "Noida, Uttar Pradesh",
"country_code": "IN",
"country": "India",
"contained_within": [],
"bounding_box": {
"type": "Polygon",
"coordinates": [
[
[
77.302126,
28.4439811
],
[
77.6953257,
28.4439811
],
[
77.6953257,
28.6471308
],
[
77.302126,
28.6471308
]
]
]
},
"attributes": {}
},
"contributors": null,
"retweet_count": 0,
"favorite_count": 0,
"entities": {
"hashtags": [],
"symbols": [],
"user_mentions": [],
"urls": [
{
"url": "https://t.co/kEZ",
"expanded_url": "http://www.sav.net/apps",
"display_url": "sav.net/apps",
"indices": [
101,
124
]
}
]
},
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"lang": "en"
},
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://abs.twimg.com/sticky/default_profile_images/default_profile_0_normal.png",
"profile_image_url_https": "https://abs.twimg.com/sticky/default_profile_images/default_profile_0_normal.png",
"profile_link_color": "0084B4",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": false,
"default_profile": true,
"default_profile_image": true,
"following": true,
"follow_request_sent": false,
"notifications": false,
"muting": false,
"blocking": false,
"blocked_by": false
},
{
"id": 741xxxxxx,
"id_str": "741xxxxxx",
"name": "Food",
"screen_name": "food",
"location": "Fort, IN",
"description": "Locally xxxxx",
"url": "http://t.co",
"entities": {
"url": {
"urls": [
{
"url": "http://t.co",
"expanded_url": "http://Food.com",
"display_url": "food.com",
"indices": [
0,
22
]
}
]
},
"description": {
"urls": []
}
},
"protected": false,
"followers_count": 1976,
"friends_count": 375,
"listed_count": 44,
"created_at": "Tue Aug 07 02:10:46 +0000 2012",
"favourites_count": 247,
"utc_offset": -14400,
"time_zone": "Eastern Time (US & Canada)",
"geo_enabled": true,
"verified": false,
"statuses_count": 1349,
"lang": "en",
"status": {
"created_at": "Sun Oct 25 01:52:10 +0000 2015",
"id": 658098694xxxxxxxxx,
"id_str": "658098694xxxxxxxxx",
"text": "#BenjamenKelly tonight!",
"source": "Twitter for iPhone",
"truncated": false,
"in_reply_to_status_id": 657368006075486200,
"in_reply_to_status_id_str": "657368006075486208",
"in_reply_to_user_id": 509529431,
"in_reply_to_user_id_str": "509529431",
"in_reply_to_screen_name": "Kelly",
"geo": null,
"coordinates": null,
"place": {
"id": "3877d6c867447819",
"url": "https://api.twitter.com/1.1/geo/id/3877d6c867447819.json",
"place_type": "city",
"name": "Fort",
"full_name": "Fort, IN",
"country_code": "US",
"country": "United States",
"contained_within": [],
"bounding_box": {
"type": "Polygon",
"coordinates": [
[
[
-85.336872,
40.95926
],
[
-85.003231,
40.95926
],
[
-85.003231,
41.214574
],
[
-85.336872,
41.214574
]
]
]
},
"attributes": {}
},
"contributors": null,
"retweet_count": 0,
"favorite_count": 1,
"entities": {
"hashtags": [],
"symbols": [],
"user_mentions": [
{
"screen_name": "Benj",
"name": "boy",
"id": 509529431,
"id_str": "509529431",
"indices": [
0,
14
]
}
],
"urls": []
},
"favorited": false,
"retweeted": false,
"lang": "en"
},
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/2479745010/yz4eu6wrca8c5e2hw6x9_normal.jpeg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/2479745010/yz4eu6wrca8c5e2hw6x9_normal.jpeg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/741935389/1444260221",
"profile_link_color": "0084B4",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": false,
"default_profile": true,
"default_profile_image": false,
"following": true,
"follow_request_sent": false,
"notifications": false,
"muting": false,
"blocking": false,
"blocked_by": false
}
This is what i am getting(supposing i have only 2 users in my following). What i need is as follows:
"geo": {
"type": "Point",
"coordinates": [
28.612486,
77.377425
]
},
"coordinates": {
"type": "Point",
"coordinates": [
77.377425,
28.612486
]
},
"geo": null,
"coordinates": null,
You need to filter out those details from the results yourself. The API will return the complete person object, not specific fields.

Resources