Skip to main content

#Recipe0 discutindo

Hi There, 

 

Another recipe question as Im new to using this tool as opposed to dataflows. When aggregating data in a recipe the options for date fields is to aggregate the data by the dates individual components (year (column1), Month (column2), Day (column2), Epoch Sec (column 4) ect).

 

This is fine, but after the aggregation I need to perform a calculation based on the full date assigned to that row, I tried converting the epoch sec to a date in the transform node, but running into an error. What is the best way to get the date  assigned to that row? If it is converting the epoch can you help me with the logic as I seem to be doing something wrong

 

Thanks!

2 comentários
  1. 20 de nov. de 2024, 08:59

    who designed the platform this way? ugh it's horrible. making unnecessary transformation steps from breaking up the dates in the aggregate node. the date functions are horrible in CRMA compared to other analytics platforms.

     

    another way is to do a left look up from the original data before the aggregate node (if you have a unique key) to join the date back to the data but why design the platform in such a way that makes your users have to do that in the first place? really... why?

0/9000

I have a dataset containing Opportunity Start Date, Opportunity End Date and Volume columns.

Client has asked to show a visualisation in the Dashboard where volume is distributed between Opportunity Start Date and Opportunity End Date month by month on equally basis throughtout the whole year.

 

For example, for below datapoints.

 

S No || Opportunity Start Date || Opportunity End Date || Volume

1 || 01-01-2023 || 31-12-2023 || 1200

2 || 01-06-2023 || 31-12-2023 || 2400

 

There will be 12 bars in the visualisation showing [ 1200 * 5/12 ] = 500 each for Jan to May

& [ 1200 * 7/12 ] + [ 2400 * 7/12 ] = 2100 each from June to Dec month.

 

Is there a way this can be achieved using SAQL?

 

Alternatively I would have to make the column to row transformation in Recipe by splitting each Opportunity row into 12 rows each for each month and divding the volume eqully.  

 

#CRMAnalytics #Recipe #DataTransformation #SAQL 

2 respostas
  1. 22 de nov. de 2023, 04:19

    I managed to do this in recipe. For simplicity sake I created 12 rows for each record irrespective of the start date and end date and created a new column 'Sub Volume' which is set to "0" or "Volume / No of months between start date and enddate" depending on the start date and end date.

0/9000

Recipe/Data Prep Returns 0 rows:  Dataset #1 has one row with a start date and end date.  I have a recipe that joins (left join) Dataset #1 to a dataset of dates (Calendar). It joins on a join key of "1" in both datasets. The idea is to get a row of each date from the calendar for each row in Dataset 1. Then I will do a date diff calculation based on a start and end date and filter out those outside of the range.  In effect I want one row for each day between the start date and end date.  

 

The recipe looks good to me and the previewed data is as expected, with the output showing 34310 rows.  When I run the recipe though, I get 0 rows in my new dataset.  Why would the preview and the actual dataset be different?  Any suggestions?

1 comentário
  1. 9 de jun. de 2021, 13:27
    I'm just gonna say something that is a mistake i'd have made. when fixing and rerunning recipes the name of the dataset may have been changed. and now instead of the new dataset you've fixed you may be looking for the old one with the mistake.(once a dataset is created I dont think it goes away without we manually delete it , changes in the recipe doesnt delete a dataset)
0/9000

Recipe not bringing over agg values in a join

 

From recipe #1 I have a dataset #1, just a normal object related dataset, of account and opportunity. The opportunity has a text field in it which is a unique ID (X)

 

I also have recipe #2, which has one dataset from an external SQL server, it has many lines of X with different volume and prices. It is aggregated by X, so that we get sum of vol and sum of prices.

 

Both datasets on their own all good, but when I try to add dataset 2 to dataset 1 in recipe #1, with X as the key, they match up alright but the aggregated values all come over as 0?

 

Is there something basic im missing?

0/9000

Hi, I've created a recipe for Leads (Unconverted) & Contacts, but I'm attempting to add a column in the recipe (i.e. Object) that will delineate whether the record is from the Lead or Contact object.  Any ideas on how to accomplish this within the recipe?

1 comentário
  1. 21 de mai. de 2021, 06:19

    There are many ways - but maybe just two of them:

    - use a transformation node directly after the digest node to add a field "Source". For the records coming from contact object, you can enter the fixed value of "Contact", for leads you can use "Lead". Just make sure that these two transformation nodes are placed before you append the data.

    - If you have the record ids in your dataset, you can derive the source from the first three characters of the id: Contacts – 003, Leads – 00Q

0/9000
27 comentários
  1. 12 de mai. de 2021, 17:15
    @Neha Verma the default timeout for the REST API call is 10 sec, which is we why received the error. I will set the timeout in our app to the max and release a new version. It will take me a day or two, will let you know when the new release is ready.
0/9000

Need help with filling missing dates

 

I have 2 date fields. One is start date and other is end date. Is there any way we can add the missing dates between start date and end date for a record. Suppose, the start date is 21st March and end date is 28th March, is there any way we can fill missing 6 date values from start date by taking end date as a reference. 

 

I know that there is a fill function but that is not working with end date as a partition. It is only taking dimension which is of string type (correct me if i’m wrong here)

 

Please suggest

 

Thanks!

0/9000

Hi, I have a Recipe built on top of a dataset produced from a Dataflow. I added some new fields to the Recipe through JSON. I see the new fields in my output in the Recipe. However, when I run the Recipe, the fields are not visible when I go to explore the data in a Lens. I did this same thing in another Recipe without an issue. Has anyone else had this happen, and been able to solve for it? Thanks. 

2 comentários
0/9000
0/9000
0/9000