← 返回首页
fix: Bigquery dataset create table disposition by danbaron63 · Pull Request #4649 · feast-dev/feast · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (5) All 1 file type selected Viewed files
Conversations
Failed to load comments. Retry
Loading
Jump to
Jump to file
Failed to load files. Retry
Loading
Diff view
Unified
Split
Hide whitespace
Apply and reload
Show whitespace
Diff view
Unified
Split
Hide whitespace
Apply and reload
  • sdk/python
    • feast/infra/offline_stores
    • tests
9 changes: 8 additions & 1 deletion sdk/python/feast/infra/offline_stores/bigquery.py
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ def get_historical_features(
dataset_project,
config.offline_store.dataset,
config.offline_store.location,
config.offline_store.table_create_disposition,
)

entity_schema = _get_entity_schema(
Expand Down Expand Up @@ -670,6 +671,7 @@ def _get_table_reference_for_new_entity(
dataset_project: str,
dataset_name: str,
dataset_location: Optional[str],
table_create_disposition: str,
) -> str:
"""Gets the table_id for the new entity to be uploaded."""

Expand All @@ -679,8 +681,13 @@ def _get_table_reference_for_new_entity(

try:
client.get_dataset(dataset.reference)
except NotFound:
except NotFound as nfe:
# Only create the dataset if it does not exist
if table_create_disposition == "CREATE_NEVER":
raise ValueError(
f"Dataset {dataset_project}.{dataset_name} does not exist "
f"and table_create_disposition is set to {table_create_disposition}."
) from nfe
client.create_dataset(dataset, exists_ok=True)

table_name = offline_utils.get_temp_entity_table_name()
Expand Down
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -575,9 +575,9 @@ def construct_test_environment(
}

if not isinstance(offline_creator, RemoteOfflineOidcAuthStoreDataSourceCreator):
environment = Environment(**environment_params)
environment = Environment(**environment_params) # type: ignore
else:
environment = OfflineServerPermissionsEnvironment(**environment_params)
environment = OfflineServerPermissionsEnvironment(**environment_params) # type: ignore
return environment


Expand Down
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@ def create_logged_features_destination(self) -> LoggingDestination:
def teardown(self):
raise NotImplementedError

@staticmethod
def xdist_groups() -> list[str]:
return []
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ def __init__(self, project_name: str, *args, **kwargs):
self.server_port: int = 0
self.proc = None

@staticmethod
def xdist_groups() -> list[str]:
return ["keycloak"]

Expand All @@ -464,10 +465,10 @@ def setup(self, registry: RegistryConfig):
entity_key_serialization_version=2,
)

repo_path = Path(tempfile.mkdtemp())
with open(repo_path / "feature_store.yaml", "w") as outfile:
repo_base_path = Path(tempfile.mkdtemp())
with open(repo_base_path / "feature_store.yaml", "w") as outfile:
yaml.dump(config.model_dump(by_alias=True), outfile)
repo_path = str(repo_path.resolve())
repo_path = str(repo_base_path.resolve())

include_auth_config(
file_path=f"{repo_path}/feature_store.yaml", auth_config=self.auth_config
Expand All @@ -486,7 +487,7 @@ def setup(self, registry: RegistryConfig):
]
self.proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
)
) # type: ignore

_time_out_sec: int = 60
# Wait for server to start
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/tests/utils/auth_permissions_util.py
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def default_store(

fs = FeatureStore(repo_path=repo_path)

fs.apply(permissions)
fs.apply(permissions) # type: ignore

return fs

Expand Down
Toggle all file notes Toggle all file annotations

Footer

© 2026 GitHub, Inc.