0

Instead of packaging the data of my Analytics template as CSV files in the template I want to have a recipe create it from the orgs data. I there for tried to update my existing template (part of a managed package) using this command

 sfdx analytics:template:update -t <TEMPLATEID> -f <FOLDERID> -r <RECIPEID>

This command fails with

ERROR running analytics:template:update: Failed to assemble External Files for application [MyApp], Dataset [MySchemaCsv] CSV's data has been garbage collected. Try editing the Dataset and replacing the CSV data before retrying this command.

I tried to remove the CSV node in the recipe and also replace it with a totally new CSV dataset. But the issue stays the same.

enter image description here

1

1 Answer 1

1

In my experience, unfortunately the issue may be just with having used CSVs in your template :( I've been following your posts, and my use case is exactly the same as yours: packaging a CRMA template for leveraging by end users via the freemium ISV licences. And I've run into quite a few issues (which I've shared with Salesforce via Sangita Gupta). In regards to CSVs, here are the 2 main problems I've found:

  1. There is a very hidden limit to the size of the external datasets (via CSVs or any other mechanism, I imagine). If you exceed the limit (which is not hard as it's quite small), the dataset will work perfectly well in your packaging org but will get truncated in your template (!).

  2. CSVs are garbage collected (as per the message you're getting), and need to be re-uploaded every time you want to update the template. Yeap, even if there's been absolutely no change in the datasets (but you've made some changes in your dashboards and want to update the template), the template update fails with a very similar error message to what you're getting => CSV garbage collected. There is no way to go forward unless you re-upload the CSV.

So, if your plan is actually to do away with CSVs all together and create the dataset from the org's data, my recommendation is to remove all traces of the CSVs in the template -> that should hopefully do away with all these CSVs-related complications for you?

2
  • What do you suggest as a replacement for my schema CSV. I really just need a bunch of field names, so I am not using the data lines in the CSV just the first one. Is there a way to define lists of variables in TCRM? Mar 9, 2023 at 12:41
  • Not quite sure I follow the question. In your recipe, just remove "Schema CSV" and create your Generated Dataset (which I imagine is what your dashboards are using) from the Org Data + whatever transformations are needed? I notice you mention you tried to do that but didn't work ("I tried to remove the CSV node in the recipe and also replace it with a totally new CSV dataset. But the issue stays the same.")? In that case, try to update the CRMA Template metadata via SFDX, there must still be some "remnant" of the External File definition, try deleting it there?
    – jjblanco
    Mar 12, 2023 at 22:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .