Hi team, We've recently run into an issue with a v...
# gooddata-cloud
t
Hi team, We've recently run into an issue with a visualization not loading / being able to be edited. I think this is the relevant error in the console:
Invariant Violation: Item attribute.business_date.day was not found in cache.
Our yaml file has this for the filter:
Copy code
filter_by:
    business_date.day_filter:
      type: attribute_filter
      using: attribute/business_date.day
m
Hi Tim, thank you for reaching out to us. May I ask, did yo umake some recently changes in the LDM? If that is the case I would recommend to reload the cache Data. If not, would you be so kind to share with us the direct link to the visualisation, feel free to us DM.
t
No recent changes to our LDM. I've tried clearing the cache as well, but no luck. I'll DM you the link
1
m
Thank you for this, as I shared internally with you. I confirm the insight it is not loading neither able to edit. I have recreated the insight as Test (shared also) and there is a difference with the filters. We will check further and we will provide an update.
m
Hi Tim, I was looking into this, but it's unclear how the wrong identifier for the date filter ended up in the yaml in the first place. From my testing, I can confirm that "Business Date" is not considered a reserved word, nor there are any issues introduced by its usage such as the one you're experiencing. From our previous conversation here: https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1745276774557719, we found some issues introduced by the CLI tool, specifically with the date filter identifier related to "week_us" that have since been addressed. I would like to check if we're talking about the same or similar issue here by getting some steps to reproduce it. Specifically, are you able to reproduce the issue consistently? How did the date filter in the visualization looked like before it got broken? If it got broken after the cloning to your local workspace, please let us know if the identifier used to be the same or if it changed, for example, the object was originally an attribute, but then it got converted into a date from the LDM. Also, if this is not how the filter or visualization got defined, could you please provide a link to the visualization before the cloning and the subsequent deploying to your workspace for closer inspection? If this is rather a one time issue, I would recommend editing the insight so it contains the correct object definition. I provided the steps in our linked conversation, but I am sending them over here too for your convenience: First get the entity, e.g.:
/api/v1/entities/workspaces/2e95d3d504314691b27f4c021fa48cf3/visualizationObjects/e0f27225-d519-439a-9749-948aa72d3ca3
Find all instances were
attribute/business_date.day
is used and replaced them for
business_date.day
. Use the modified layout as a body for the PUT request to the same endpoint and set the correct content-type as exemplified in the Apiary: https://www.gooddata.com/docs/cloud/api-and-sdk/api/api_reference_all/#operation/updateEntity@Workspaces
t
Hi Moises, this
business_date.day_filter
was introduced during the fix to the thread you linked to. It was cloned from GoodData when it was working and now appears to be broken.
@Mauricio Cabezas was helping as well and made a test visualization that works. The YAML file for that visualization has a different filter. If I clone from the test visualization, the filter looks like this:
Copy code
filter_by:
    business_date_year:
      type: date_filter
      using: business_date
Our original filter looks like this:
Copy code
filter_by:
    business_date.day_filter:
      type: attribute_filter
      using: attribute/business_date.day
If I update the filter in my yaml file to this filter and redeploy, I get the following error:
Screenshot 2025-06-24 at 8.33.03 AM.png
m
Hi Tim, thank you for this, I would like to know.. have you tried to clone and deploy the test viz. I created? Are you able to reproduce the same issue?
t
I cloned it down and noticed the main difference is the filter as specified above. If I deploy it out with the updated filter, I get that error I sent in the screenshot.
m
I followed these steps to try to reproduce the issue: 1. Created an insight using the date dimension *"*Business Day*"*, and set it to *"*Last 7 days*"* to match the granularity from the broken filter (
business_date_day
). 2. Cloned the workspace locally using GD CLI v0.12. 3. In the insight YAML, the filter appears like this:
Copy code
filter_by:
  business_date_day:
    type: date_filter
    granularity: DAY
    from: -6
    to: 0
    using: business_date
4. Without making any changes, I deployed the workspace back to the server. 5. After deployment, the filter still shows correctly in the visualizationObjects endpoint (i.e., not broken):
Copy code
"filters": [
  {
    "relativeDateFilter": {
      "dataSet": {
        "identifier": {
          "id": "business_date",
          "type": "dataset"
        }
      },
      "granularity": "GDC.time.date",
      "from": -6,
      "to": 0
    }
  }
]
I understand you tried fixing the filter directly in your YAML file, could you please try updating it directly in the platform instead by editing the object there? Unfortunately, this kind of fix can’t be introduced just from the local workspace side. Regarding the issue itself: since it started happening after your upgrade to v0.12, could you please try to reproduce it again? For example, if you recreate the insight in the platform (or fix the current broken insight) and then re-run the clone-and-deploy steps, does the issue come back? If not, it’s possible this was just a one-time glitch. Please also keep in mind that the tool is still in beta, so some inconsistencies like this can happen. But if you’re able to reproduce it again reliably, I’ll be happy to escalate the issue to our team as before.
t
Okay, if I add in the granularity dimension to the filter, it works. I'm wondering why it was missing before or wasn't included when I cloned the visualization down. This seems like it's a change between an earlier version of the CLI and the YAML files it generates and the current one. Are these changes documented somewhere?
m
I am glad to hear this is fixed. The granularity is always part of the object metadata, for example this is how it looks like in the context filter: https://www.gooddata.com/docs/cloud/api-and-sdk/api/api_reference_all/#operation/getEntity@FilterContexts, but I am surprised it wasn't included in the body of yours, most likely due to the breaking change introduced by the CLI. If you run into this issue again, please let us know and provide some steps to replicate it and we'll pass the info to our devs. Our apologies for any frustration or inconvenience this may have created.