Skip to content

Update db init#2052

Merged
shixiao-coder merged 5 commits into
datacommonsorg:masterfrom
shixiao-coder:update-db-init
Jun 1, 2026
Merged

Update db init#2052
shixiao-coder merged 5 commits into
datacommonsorg:masterfrom
shixiao-coder:update-db-init

Conversation

@shixiao-coder
Copy link
Copy Markdown
Contributor

This PR unlink the enable_embeddings flag with the init DB.
database initialization will always do init on Embedding related schema

@shixiao-coder shixiao-coder requested a review from gmechali June 1, 2026 19:43
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the database initialization in spanner_client.py to unconditionally set up the embedding schema, extracting the DDL reading and rendering logic into a new helper method. The review feedback points out a typo in the new method's name, recommends specifying the file encoding when reading the schema file, and suggests removing the now-unused enable_embeddings parameter from the initialize_database method signature.

Comment thread import-automation/workflow/ingestion-helper/spanner_client.py Outdated
Comment thread import-automation/workflow/ingestion-helper/spanner_client.py Outdated
Comment thread import-automation/workflow/ingestion-helper/spanner_client.py Outdated
Comment thread import-automation/workflow/ingestion-helper/spanner_client.py Outdated
Comment thread import-automation/workflow/ingestion-helper/spanner_client.py Outdated
Copy link
Copy Markdown
Contributor

@gmechali gmechali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one nit plus one small question discussed in person on API enablement and the CREATE MODEL but LGTM otherwise.

Comment thread import-automation/workflow/ingestion-helper/schema.sql
@shixiao-coder shixiao-coder merged commit 4c696ed into datacommonsorg:master Jun 1, 2026
13 checks passed
@shixiao-coder shixiao-coder deleted the update-db-init branch June 1, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants