Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E7 - issue with explore refinements #171

Open
mariana-s-fernandes opened this issue Feb 7, 2024 · 8 comments
Open

E7 - issue with explore refinements #171

mariana-s-fernandes opened this issue Feb 7, 2024 · 8 comments

Comments

@mariana-s-fernandes
Copy link

I get the error

Error evaluating rule: Cannot read properties of undefined (reading 'length')

for explores with emojis or strange characters in the labels.

@fabio-looker
Copy link
Collaborator

fabio-looker commented Apr 5, 2024

Hi @mariana-s-fernandes

Do you mean in the "label" parameter , or in the object name? In the latter case, it could be a parser issue..

A small repro would help, as my attempt to repro it didn't run into any issues:

image

(note: Test in https://github.com/looker-open-source/look-at-me-sideways/tree/issue-171-rule-e7-emojis )

@mariana-s-fernandes
Copy link
Author

I mean the label parameter. The label that is failing is "⭐️ Properties, Companies, Shareholders & More"
It seems to me that javascript is not able to get the length of the string in this line of code: https://github.com/looker-open-source/look-at-me-sideways/blob/master/rules/e7.js#L23

Let me know if you need anything else!

@mariana-s-fernandes
Copy link
Author

This is the result from LAMS, if it helps:
image

@mariana-s-fernandes
Copy link
Author

mariana-s-fernandes commented Apr 10, 2024

I have tried to remove the emoji and it seems that's not the cause for the problem. My customers explore is also only named "Customers" so I have no idea what could be causing this...
image

#LAMS
#rule: K7 {} # Provide one `primary_key`
#rule: F1 {} # No cross-view fields
#rule: F2 {} # No view-labeled fields
#rule: F4 {} # Description or hidden
#rule: T1 {} # Triggers use datagroups
#rule: E1 {} # Join with subst'n operator
#rule: E7 {options: {maxLength: 50}}
#rule: W1 {} # Block indentation

@fabio-looker
Copy link
Collaborator

Given the "+" in the location, I assume it is an issue related to handling of refinements in the LookML parser. I don't think the refinements should be exposed individually in the model. If you would be able to send a zipped copy of your LookML to [email protected], I could use it to repro this issue more quickly?

@mariana-s-fernandes
Copy link
Author

mariana-s-fernandes commented Apr 11, 2024

I'm testing LAMS and the parser locally and the problem is with the parser. These explores are the only ones that have quick start queries. The quick start queries are defined in a refined explore (hence the "+" sign).
I am trying to exclude them from LAMS but they are still getting caught...

I will let you know once I find out more about it!

@mariana-s-fernandes
Copy link
Author

So the problem is that the parser/linter does not support explore refinements. I have removed them on my end and it's working now!
But you may want to investigate on how to support them, if you think that makes sense.

@fabio-looker fabio-looker changed the title E7 - not able to parse emojis from explore label E7 - issue with explore refinements Apr 12, 2024
@fabio-looker
Copy link
Collaborator

I am still not sure exactly what triggered this error, but in v3.1.4, I did make some parser fixes around "include" functionality which could have contributed to this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants