sql generated in explorer is weird

Smail1
New Member

Hello, 

In lookml i have one explorer :

Example : 

explore: toto{

  join: tata{
    type: left_outer
    relationship: one_to_many
    sql_on: ${toto.id} = ${tata.id} ;;

  }

}

why in explorer when i select only one field1 from tata table the sql generaled use toto ? something like :
select filed1 from toto left join tata on toto.id = tata.id
or for me i just need this sql : 

select field1 from tata

Thank you for your response. 

Best regards

Solved Solved
0 4 123
1 ACCEPTED SOLUTION

When you have a SQL like this:

SELECT

  table_b.field_at

FROM table_a

    LEFT JOIN table_b USING(some_id)

Then your base table is still table_a.

Looker creates the JOINs dynamically but the base is always the same. It will only generate JOINs it needs but the base needs to be there, so in your case it will generate table1 and table10

View solution in original post

4 REPLIES 4
Top Labels in this Space
Top Solution Authors