diff --git a/metadata-ingestion/setup.py b/metadata-ingestion/setup.py index ef91119fdfa60..187d2e775f613 100644 --- a/metadata-ingestion/setup.py +++ b/metadata-ingestion/setup.py @@ -111,7 +111,8 @@ def get_long_description(): "kafka-connect": sql_common | {"requests", "JPype1"}, "ldap": {"python-ldap>=2.4"}, "looker": looker_common, - "lookml": looker_common | {"lkml>=1.1.0", "sql-metadata==2.2.2"}, + # lkml>=1.1.2 is required to support the sql_preamble expression in LookML + "lookml": looker_common | {"lkml>=1.1.2", "sql-metadata==2.2.2"}, "metabase": {"requests"}, "mode": {"requests", "sqllineage"}, "mongodb": {"pymongo>=3.11"}, diff --git a/metadata-ingestion/tests/integration/lookml/lkml_samples/nested/included_sql_preamble.model.lkml b/metadata-ingestion/tests/integration/lookml/lkml_samples/nested/included_sql_preamble.model.lkml new file mode 100644 index 0000000000000..b7c7a4ef73106 --- /dev/null +++ b/metadata-ingestion/tests/integration/lookml/lkml_samples/nested/included_sql_preamble.model.lkml @@ -0,0 +1,10 @@ +connection: "my_connection" + +explore: included_sql_preamble { + sql_preamble: + CREATE TEMP FUNCTION CONCAT_VERBOSE(a STRING, b STRING) + RETURNS STRING AS ( + CONCAT(a, b) + ); + ;; +}