- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 12:45 AM
Hi All, Getting below error while printing log statements.
Below is the code I've written:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 12:54 AM
As per the screenshot, this is not an error, you have parsed the JSON thats why you get the data as JSON object
Please do it as follows:
var opportunities = parsedData.opportunitiesData;
opportunities = JSON.stringify(opportunities);
gs.info(opportunities);
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 01:04 AM
Hi @peri sravani1 ,
The Output is in JSON format in order to view it you can stringify it as mentioned by Prince above.
You can write this line instead
gs.info("test line 40 "+JSON.stringify(opportunities));
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 12:54 AM
As per the screenshot, this is not an error, you have parsed the JSON thats why you get the data as JSON object
Please do it as follows:
var opportunities = parsedData.opportunitiesData;
opportunities = JSON.stringify(opportunities);
gs.info(opportunities);
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 01:04 AM
Hi @peri sravani1 ,
The Output is in JSON format in order to view it you can stringify it as mentioned by Prince above.
You can write this line instead
gs.info("test line 40 "+JSON.stringify(opportunities));
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 05:19 AM
How do I set primary key on to a custom table?
@Danish Bhairag2 @Prince Arora
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 05:31 AM
How you are storing data into the table?
Best practice is to store data into staging table and then transform it into target table using transform map and in transform map you can set the primary key by setting the coalesce field to true.
If you are storing the data directly into the table then you need to check before insertion whether that key is already present in the table or not
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.