How to get explore name in the manifest file

Hello,

Any idea how to put condition based on the explore name or label name belong to a specific explore in the manifest file.

Regards,

Mehdi

 

0 2 604
2 REPLIES 2

Roderick
Community Manager
Community Manager

Hi @mtajmouati,

If I understand your question, it is not currently possible to put conditions based on the explore name or label name in the manifest file in Looker. However, there are a few workarounds that you can use to achieve a similar effect.

One workaround is to use the explore parameter in the project_name parameter. This will allow you to specify a different project name for each explore. You can then use the project name in the manifest file to determine whether or not to include the explore.

For example, if you have an explore named customers in the sales project, you could use the following manifest file to include the explore:

project_name: "sales"

If you have an explore named customers in the marketing project, you could use the following manifest file to exclude the explore:

project_name: "marketing"

Another workaround is to use the label parameter in the explore parameter. This will allow you to specify a different label for each explore. You can then use the label in the manifest file to determine whether or not to include the explore.

For example, if you have an explore named customers with the label Sales Customers, you could use the following manifest file to include the explore:

explore: customers { label: "Sales Customers" }

If you have an explore named customers with the label Marketing Customers, you could use the following manifest file to exclude the explore:

explore: customers { label: "Marketing Customers" }

These workarounds are not ideal, but they can be used to achieve a similar effect to putting conditions based on the explore name or label name in the manifest file. I hope this helps! 

Hey @mtajmouati 

I think some additional clarification of the question would really help.

You can set constants in the manifest file and then use those constants in places where liquid evaluation is accepted (such as a sql parameter), but I'm not sure if that's what you want.

Also, the LAMS LookML linter will let you define rules/conditions in your manifest file that can check explore names/labels, but this is at development time, not a query-time evaluation like liquid.