Embed python into looker

Is there a natural way to wrap Python code to display in Looker?

The ideal dataflow for my problem is SQL DB->python-> looker, or alternatively, looker->python-> looker.  I am hoping to embed a.py into lookML so that I can automate python analysis, ready to display in looker.

Answers

  • @five nights at freddy's There isn't a natural way to directly wrap Python code and display it in Looker. Looker primarily focuses on SQL queries and visualizations built on top of your data warehouse. However, there are alternative approaches to achieve your desired dataflow:

    -Looker connects to your data warehouse (e.g., BigQuery, Snowflake).
    -Many data warehouses allow creating User-Defined Functions (UDFs) written in languages like Python.
    -You can develop your Python logic within the UDF and call it directly from your LookML.
    -This approach keeps the Python code within the database environment and leverages Looker's SQL capabilities.