Fix publishing udfs that use backticks in identifiers (#4225)
* Fix publishing udfs that use backticks in identifiers * Update bigquery_etl/routine/parse_routine.py Co-authored-by: Sean Rose <1994030+sean-rose@users.noreply.github.com> --------- Co-authored-by: Sean Rose <1994030+sean-rose@users.noreply.github.com>
This commit is contained in:
Родитель
13d7a690b1
Коммит
f1f552ef47
|
@ -191,7 +191,12 @@ class RawRoutine:
|
|||
routines = get_routines(project)
|
||||
dependencies = []
|
||||
for udf in routines:
|
||||
if udf["name"] in "\n".join(definitions):
|
||||
udf_re = re.compile(
|
||||
r"\b"
|
||||
+ r"\.".join(f"`?{name}`?" for name in udf["name"].split("."))
|
||||
+ r"\("
|
||||
)
|
||||
if udf_re.search("\n".join(definitions)):
|
||||
dependencies.append(udf["name"])
|
||||
|
||||
dependencies.extend(re.findall(TEMP_UDF_RE, "\n".join(definitions)))
|
||||
|
|
Загрузка…
Ссылка в новой задаче