declare variable in sql runner

Hi guys, I need help.

I'm new to the looker, I would like to know if there is a way to declare variables in sql runner;

Thanks

0 3 1,035
3 REPLIES 3

Hi Gabriel!

Could you share with us more details about what kind of activity are you working on?

There is a similar feature I guess it will help you :

https://docs.looker.com/reference/view-params/create_process

Best,

Leo

Hi Leo, how are you?

thanks for your response!

I don't have access to the database, only the model available in the looker, so I do my queries directly in the looker's sql runner. sometimes I need to create common variables, for example:

url varchar := 'http://mysite.com';

select * from table t

where t.url = @url;


I don't know if it's possible to do this in SQL Runner, considering that it's just an environment to execute the queries created by the looker itself.

thanks!

I'm doing great! Thanks 4 asking

Well, SQL runner is not designed for development purposes. It is more like "hey let's gonna test this query, if it works then we will jump to lookML code" or exploring schemas/field types.. But not developing. You have a lot of options to use in lookML rather than sql runner

Best

Leo

Top Labels in this Space
Top Solution Authors