Skip to content

Commit e1af008

Browse files
authored
make sql a cached property in BigQueryInsertJobOperator (#33218)
Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
1 parent d45781f commit e1af008

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

β€Žairflow/providers/google/cloud/operators/bigquery.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import enum
2222
import json
2323
import warnings
24+
from functools import cached_property
2425
from typing import TYPE_CHECKING, Any, Iterable, Sequence, SupportsAbs
2526

2627
import attr
@@ -2737,7 +2738,7 @@ def __init__(
27372738
self.deferrable = deferrable
27382739
self.poll_interval = poll_interval
27392740

2740-
@property
2741+
@cached_property
27412742
def sql(self) -> str | None:
27422743
try:
27432744
return self.configuration["query"]["query"]

0 commit comments

Comments
 (0)