Skip to content

Commit

Permalink
Fix database schema DDL statements after update to MLflow 2.13
Browse files Browse the repository at this point in the history
New models / tables have been added.

- trace_info
- trace_tags
- trace_request_metadata
  • Loading branch information
amotl committed May 21, 2024
1 parent 04674c1 commit 1fa677f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
25 changes: 25 additions & 0 deletions mlflow_cratedb/adapter/ddl/cratedb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,28 @@ CREATE TABLE IF NOT EXISTS "tags" (
"run_uuid" TEXT NOT NULL,
PRIMARY KEY ("key", "run_uuid")
);

CREATE TABLE IF NOT EXISTS "trace_info" (
"request_id" TEXT NOT NULL,
"experiment_id" BIGINT,
"timestamp_ms" BIGINT NOT NULL,
"execution_time_ms" BIGINT NOT NULL,
"status" TEXT,
PRIMARY KEY ("request_id")
);

CREATE TABLE IF NOT EXISTS "trace_tags" (
"key" TEXT,
"value" TEXT NOT NULL,
"request_id" TEXT NOT NULL,
"trace_info" BIGINT,
PRIMARY KEY ("request_id", "key")
);

CREATE TABLE IF NOT EXISTS "trace_request_metadata" (
"key" TEXT,
"value" TEXT NOT NULL,
"request_id" TEXT NOT NULL,
"trace_info" BIGINT,
PRIMARY KEY ("request_id", "key")
);
3 changes: 3 additions & 0 deletions mlflow_cratedb/adapter/ddl/drop.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ DROP TABLE IF EXISTS "registered_model_aliases";
DROP TABLE IF EXISTS "registered_model_tags";
DROP TABLE IF EXISTS "runs";
DROP TABLE IF EXISTS "tags";
DROP TABLE IF EXISTS "trace_info";
DROP TABLE IF EXISTS "trace_tags";
DROP TABLE IF EXISTS "trace_request_metadata";

0 comments on commit 1fa677f

Please sign in to comment.