Migrate from H2 to PostgreSQL

Have metabase 0.19.1 running fine, on H2.

Tried to migrate to a newly created psql database, and get fk violation errors on table raw_column. Running command:

java -jar metabase.jar load-from-h2

Below is the full output.

Thanks,

output:

arcims@beja115:/opt/metabase$ java -jar metabase.jar load-from-h2
08-08 16:26:24 INFO metabase.db :: Verifying postgres Database Connection ...
08-08 16:26:24 DEBUG metabase.driver :: Registered driver :postgres 
08-08 16:26:24 INFO metabase.db :: Verify Database Connection ... :white_check_mark:
08-08 16:26:58 INFO metabase.db :: Database Migrations Current ... :white_check_mark:
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier '/mchange-commons.properties' could not be found. Skipping.", exception -> null]
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier '/mchange-log.properties' could not be found. Skipping.", exception -> null]
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier '/c3p0.properties' could not be found. Skipping.", exception -> null]
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier '/mchange-commons.properties' could not be found. Skipping.", exception -> null]
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier '/mchange-log.properties' could not be found. Skipping.", exception -> null]
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier '/c3p0.properties' could not be found. Skipping.", exception -> null]
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier 'hocon:/reference,/application,/c3p0,/' could not be found. Skipping.", exception -> null]
08-08 16:26:59 INFO db.migrations :: Running all necessary data migrations, this may take a minute.
08-08 16:26:59 INFO db.migrations :: Running data migration 'set-card-database-and-table-ids'...
08-08 16:26:59 INFO db.migrations :: Running data migration 'set-mongodb-databases-ssl-false'...
08-08 16:26:59 INFO db.migrations :: Running data migration 'set-default-schemas'...
08-08 16:26:59 INFO db.migrations :: Running data migration 'set-admin-email'...
08-08 16:26:59 INFO db.migrations :: Running data migration 'remove-database-sync-activity-entries'...
08-08 16:26:59 INFO db.migrations :: Running data migration 'remove-duplicate-fk-entries'...
08-08 16:26:59 INFO db.migrations :: Running data migration 'update-dashboards-to-new-grid'...
08-08 16:26:59 INFO db.migrations :: Running data migration 'migrate-field-visibility-type'...
08-08 16:26:59 INFO db.migrations :: Running data migration 'fix-dashboard-cards-without-positions'...
08-08 16:26:59 INFO db.migrations :: Running data migration 'migrate-fk-metadata'...
08-08 16:26:59 INFO db.migrations :: Running data migration 'create-raw-tables'...
08-08 16:26:59 INFO db.migrations :: Finished running data migrations.
Transfering 2 instances of Database....[OK]
Transfering 2198 instances of RawTable...........[OK]
Transfering 22514 instances of RawColumn...............................................................................[OK]
Transfering 173 instances of RawColumn....BatchUpdateException:
Message: Batch entry 8 INSERT INTO raw_column ( "column_type", "raw_table_id", "name", "fk_target_column_id", "updated_at", "details", "active", "id", "is_pk", "created_at" ) VALUES ( NULL, 2098, 'id', 25808, '2016-08-08 14:50:43.709000 +01:00:00', '{"base-type":"BigIntegerField"}', '1', 22456, '1', '2016-05-19 18:03:20.021000 +01:00:00' ) was aborted. Call getNextException to see the cause.
SQLState: 23503
Error Code: 0
PSQLException:
Message: ERROR: insert or update on table "raw_column" violates foreign key constraint "fk_rawcolumn_fktarget_ref_rawcolumn"
Detail: Key (fk_target_column_id)=(25808) is not present in table "raw_column".
SQLState: 23503
Error Code: 0
java.sql.BatchUpdateException: Batch entry 8 INSERT INTO raw_column ( "column_type", "raw_table_id", "name", "fk_target_column_id", "updated_at", "details", "active", "id", "is_pk", "created_at" ) VALUES ( NULL, 2098, 'id', 25808, '2016-08-08 14:50:43.709000 +01:00:00', '{"base-type":"BigIntegerField"}', '1', 22456, '1', '2016-05-19 18:03:20.021000 +01:00:00' ) was aborted. Call getNextException to see the cause.
at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2743)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1928)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2892)
at clojure.java.jdbc$execute_batch.invokeStatic(jdbc.clj:426)
at clojure.java.jdbc$execute_batch.invoke(jdbc.clj:419)
at clojure.java.jdbc$db_do_execute_prepared_statement$fn__2785.invoke(jdbc.clj:792)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:637)
at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:598)
at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585)
at clojure.java.jdbc$db_do_execute_prepared_statement.invokeStatic(jdbc.clj:791)
at clojure.java.jdbc$db_do_execute_prepared_statement.invoke(jdbc.clj:778)
at clojure.java.jdbc$db_do_prepared.invokeStatic(jdbc.clj:814)
at clojure.java.jdbc$db_do_prepared.invoke(jdbc.clj:795)
at clojure.java.jdbc$insert_cols_BANG_.invokeStatic(jdbc.clj:1069)
at clojure.java.jdbc$insert_cols_BANG_.invoke(jdbc.clj:1061)
at clojure.java.jdbc$insert_multi_BANG_.invokeStatic(jdbc.clj:1110)
at clojure.java.jdbc$insert_multi_BANG_.invoke(jdbc.clj:1093)
at metabase.cmd.load_from_h2$insert_entity_BANG_$fn__25145.invoke(load_from_h2.clj:104)
at metabase.cmd.load_from_h2$insert_entity_BANG_.invokeStatic(load_from_h2.clj:103)
at metabase.cmd.load_from_h2$insert_entity_BANG_.invoke(load_from_h2.clj:85)
at metabase.cmd.load_from_h2$insert_self_referencing_entity_BANG_.invokeStatic(load_from_h2.clj:124)
at metabase.cmd.load_from_h2$insert_self_referencing_entity_BANG_.invoke(load_from_h2.clj:112)
at metabase.cmd.load_from_h2$load_from_h2_BANG_$fn__25228$fn__25229.invoke(load_from_h2.clj:156)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:613)
at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:629)
at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:598)
at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585)
at metabase.cmd.load_from_h2$load_from_h2_BANG_$fn__25228.invoke(load_from_h2.clj:148)
at metabase.cmd.load_from_h2$load_from_h2_BANG_.invokeStatic(load_from_h2.clj:147)
at metabase.cmd.load_from_h2$load_from_h2_BANG_.invoke(load_from_h2.clj:136)
at clojure.lang.Var.invoke(Var.java:379)
at metabase.core$fn__30418.invokeStatic(core.clj:240)
at metabase.core$fn__30418.doInvoke(core.clj:238)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invokeStatic(core.clj:646)
at clojure.core$apply.invoke(core.clj:641)
at metabase.core$run_cmd$fn__30421.invoke(core.clj:247)
at metabase.core$run_cmd.invokeStatic(core.clj:247)
at metabase.core$run_cmd.doInvoke(core.clj:242)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$apply.invoke(core.clj:641)
at metabase.core$_main.invokeStatic(core.clj:259)
at metabase.core$_main.doInvoke(core.clj:255)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at metabase.core.main(Unknown Source)
Command failed with exception: Batch entry 8 INSERT INTO raw_column ( "column_type", "raw_table_id", "name", "fk_target_column_id", "updated_at", "details", "active", "id", "is_pk", "created_at" ) VALUES ( NULL, 2098, 'id', 25808, '2016-08-08 14:50:43.709000 +01:00:00', '{"base-type":"BigIntegerField"}', '1', 22456, '1', '2016-05-19 18:03:20.021000 +01:00:00' ) was aborted. Call getNextException to see the cause.

Seems to be a bug.

Can you pull up the rows in

SELECT * FROM raw_column 
WHERE id in (22456, 25808)

from your metabase application database (i.e. the H2 file)?

ok, how do I query the H2 file?

really strange, I opened the metabase.db.h2.db with razorsql and with h2 console, and neither showed any tables in public schema... but I can see my queries in metabase gui.

H2 console command: java -jar h2-1.4.192.jar

Then opened the file with:

Database tree and query table not found error:

that’s strange…
do you see any tables whatsoever?

I just checked on my local machine and pulled up raw_column without any trouble. Are you on windows?

You can also add a Metabase database connection to the h2 file itself and use Metabase to poke around the table :wink:

Hi Sameer. What would be the connection string? Can’t seem to make it work…

Nevermind, got it.

hmm, got this error: Running SQL queries against H2 databases using the default (admin) database user is forbidden.

hmmm… I totally forgot about that.

We actually prevent an MB instance from reading its own database to prevent security issues. Just realized I’d been using a separate MB instance (the mac app) locally.

I think we’ve narrowed down the cause of this https://github.com/metabase/metabase/issues/3151#issuecomment-239545622 and are trying to figure out a fix.

Just to document the connection string that worked:

Notice the file must be "metabase.db". Otherwise it will create a new db and so you won't see any tables.
IFEXISTS=TRUE helps to ensure you really are connecting to your file db.

1 Like

I’ve just upgraded from 0.19 to 0.20 and decided it was time to migrate from H2 to PostgreSQL as well. Unfortunately I run into a very similar issue:

Temporarily disabling DB constraints...
[OK]
Transfering 4 instances of Database....BatchUpdateException:
 Message: Batch entry 0 INSERT INTO metabase_database ( "description", "organization_id", "name", "caveats", "is_full_sync", "updated_at", "details", "is_sample", "id", "engine", "created_at", "points_of_interest" ) VALUES ( NULL, NULL, 'prod - discover', NULL, '1', '2016-05-18 23:29:50.494000 +00:00:00', '{"host":"localhost","port":13306,"dbname":"stashimi-discovery","user":"metabase","password":"ESJgNumEcL7D6Dx3hDAcJ9AQ "}', '0', 34, 'mysql', '2016-05-18 23:26:14.377000 +00:00:00', NULL ) was aborted.  Call getNextException to see the cause.
 SQLState: 42703
 Error Code: 0
PSQLException:
 Message: ERROR: column "organization_id" of relation "metabase_database" does not exist
  Position: 48
 SQLState: 42703
 Error Code: 0
java.sql.BatchUpdateException: Batch entry 0 INSERT INTO metabase_database ( "description", "organization_id", "name", "caveats", "is_full_sync", "updated_at", "details", "is_sample", "id", "engine", "created_at", "points_of_interest" ) VALUES ( NULL, NULL, 'prod - discover', NULL, '1', '2016-05-18 23:29:50.494000 +00:00:00', '{"host":"localhost","port":13306,"dbname":"stashimi-discovery","user":"metabase","password":"ESJgNumEcL7D6Dx3hDAcJ9AQ "}', '0', 34, 'mysql', '2016-05-18 23:26:14.377000 +00:00:00', NULL ) was aborted.  Call getNextException to see the cause.
	at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2743)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1928)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2892)
	at clojure.java.jdbc$execute_batch.invokeStatic(jdbc.clj:426)
	at clojure.java.jdbc$execute_batch.invoke(jdbc.clj:419)
	at clojure.java.jdbc$db_do_execute_prepared_statement$fn__2805.invoke(jdbc.clj:792)
	at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:637)
	at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585)
	at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:598)
	at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585)
	at clojure.java.jdbc$db_do_execute_prepared_statement.invokeStatic(jdbc.clj:791)
	at clojure.java.jdbc$db_do_execute_prepared_statement.invoke(jdbc.clj:778)
	at clojure.java.jdbc$db_do_prepared.invokeStatic(jdbc.clj:814)
	at clojure.java.jdbc$db_do_prepared.invoke(jdbc.clj:795)
	at clojure.java.jdbc$insert_cols_BANG_.invokeStatic(jdbc.clj:1069)
	at clojure.java.jdbc$insert_cols_BANG_.invoke(jdbc.clj:1061)
	at clojure.java.jdbc$insert_multi_BANG_.invokeStatic(jdbc.clj:1110)
	at clojure.java.jdbc$insert_multi_BANG_.invoke(jdbc.clj:1093)
	at metabase.cmd.load_from_h2$insert_entity_BANG_$fn__30770.invoke(load_from_h2.clj:125)
	at metabase.cmd.load_from_h2$insert_entity_BANG_.invokeStatic(load_from_h2.clj:124)
	at metabase.cmd.load_from_h2$insert_entity_BANG_.invoke(load_from_h2.clj:106)
	at metabase.cmd.load_from_h2$load_data_BANG_.invokeStatic(load_from_h2.clj:140)
	at metabase.cmd.load_from_h2$load_data_BANG_.invoke(load_from_h2.clj:134)
	at metabase.cmd.load_from_h2$load_from_h2_BANG_$fn__30850.invoke(load_from_h2.clj:209)
	at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:613)
	at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585)
	at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:629)
	at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585)
	at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:598)
	at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585)
	at metabase.cmd.load_from_h2$load_from_h2_BANG_.invokeStatic(load_from_h2.clj:206)
	at metabase.cmd.load_from_h2$load_from_h2_BANG_.invoke(load_from_h2.clj:199)
	at clojure.lang.Var.invoke(Var.java:379)
	at metabase.core$fn__31589.invokeStatic(core.clj:209)
	at metabase.core$fn__31589.doInvoke(core.clj:207)
	at clojure.lang.RestFn.invoke(RestFn.java:397)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.core$apply.invokeStatic(core.clj:646)
	at clojure.core$apply.invoke(core.clj:641)
	at metabase.core$run_cmd$fn__31592.invoke(core.clj:216)
	at metabase.core$run_cmd.invokeStatic(core.clj:216)
	at metabase.core$run_cmd.doInvoke(core.clj:211)
	at clojure.lang.RestFn.invoke(RestFn.java:410)
	at clojure.lang.AFn.applyToHelper(AFn.java:154)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.core$apply.invokeStatic(core.clj:648)
	at clojure.core$apply.invoke(core.clj:641)
	at metabase.core$_main.invokeStatic(core.clj:228)
	at metabase.core$_main.doInvoke(core.clj:224)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at metabase.core.main(Unknown Source)
Command failed with exception: Batch entry 0 INSERT INTO metabase_database ( "description", "organization_id", "name", "caveats", "is_full_sync", "updated_at", "details", "is_sample", "id", "engine", "created_at", "points_of_interest" ) VALUES ( NULL, NULL, 'prod - discover', NULL, '1', '2016-05-18 23:29:50.494000 +00:00:00', '{"host":"localhost","port":13306,"dbname":"stashimi-discovery","user":"metabase","password":"ESJgNumEcL7D6Dx3hDAcJ9AQ "}', '0', 34, 'mysql', '2016-05-18 23:26:14.377000 +00:00:00', NULL ) was aborted.  Call getNextException to see the cause.

I successfully ran 0.20 with H2 and played a bit around with it. Then I’ve tried another migration to Postgres and the error slightly changed:

10-14 20:27:42 INFO metabase.db :: Verifying postgres Database Connection ...
10-14 20:27:42 DEBUG metabase.driver :: Registered driver :postgres 🚚
10-14 20:27:42 INFO metabase.db :: Verify Database Connection ... ✅
10-14 20:27:42 INFO metabase.db :: Running Database Migrations...
10-14 20:27:42 INFO metabase.db :: Setting up Liquibase...
10-14 20:27:50 INFO metabase.db :: Liquibase is ready.
10-14 20:27:50 INFO metabase.db :: Checking if Database has unran migrations...
10-14 20:29:01 INFO metabase.db :: Database Migrations Current ... ✅
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier '/mchange-commons.properties' could not be found. Skipping.", exception -> null]
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier '/mchange-log.properties' could not be found. Skipping.", exception -> null]
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier '/c3p0.properties' could not be found. Skipping.", exception -> null]
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier '/mchange-commons.properties' could not be found. Skipping.", exception -> null]
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier '/mchange-log.properties' could not be found. Skipping.", exception -> null]
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier '/c3p0.properties' could not be found. Skipping.", exception -> null]
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier 'hocon:/reference,/application,/c3p0,/' could not be found. Skipping.", exception -> null]
10-14 20:29:01 INFO db.migrations :: Running all necessary data migrations, this may take a minute.
10-14 20:29:01 INFO db.migrations :: Finished running data migrations.
Temporarily disabling DB constraints...
[OK]
Transfering 4 instances of Database....[OK]
Transfering 311 instances of RawTable.....[OK]
Transfering 9730 instances of RawColumn....................................[OK]
Transfering 6 instances of User....[OK]
Transfering 14 instances of Setting....[OK]
Transfering 311 instances of Table.....[OK]
Transfering 9730 instances of Field....................................[OK]
Transfering 1334 instances of FieldValues........[OK]
Transfering 1 instances of Segment....[OK]
Transfering 117 instances of Revision....[OK]
Transfering 628 instances of ViewLog......[OK]
Transfering 37 instances of Session....[OK]
Transfering 3 instances of Dashboard....[OK]
Transfering 30 instances of Card....[OK]
Transfering 5 instances of CardFavorite....[OK]
Transfering 17 instances of DashboardCard....[OK]
Transfering 2 instances of DashboardCardSeries....[OK]
Transfering 122 instances of Activity....[OK]
Transfering 4216 instances of QueryExecution..................[OK]
Transfering 3 instances of Pulse....[OK]
Transfering 17 instances of PulseCard....[OK]
Transfering 3 instances of PulseChannel....[OK]
Transfering 9 instances of PulseChannelRecipient....[OK]
Transfering 1 instances of Label....[OK]
Transfering 16 instances of CardLabel....[OK]
Transfering 3 instances of PermissionsGroup....BatchUpdateException:
 Message: Batch entry 0 INSERT INTO permissions_group ( "id", "name" ) VALUES ( 1, 'All Users' ) was aborted.  Call getNextException to see the cause.
 SQLState: 23505
 Error Code: 0
PSQLException:
 Message: ERROR: duplicate key value violates unique constraint "pk_permissions_group"
  Detail: Key (id)=(1) already exists.
 SQLState: 23505
 Error Code: 0
java.sql.BatchUpdateException: Batch entry 0 INSERT INTO permissions_group ( "id", "name" ) VALUES ( 1, 'All Users' ) was aborted.  Call getNextException to see the cause.
	at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2743)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1928)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2892)
	at clojure.java.jdbc$execute_batch.invokeStatic(jdbc.clj:426)
	at clojure.java.jdbc$execute_batch.invoke(jdbc.clj:419)
	at clojure.java.jdbc$db_do_execute_prepared_statement$fn__2805.invoke(jdbc.clj:792)
	at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:637)
	at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585)
	at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:598)
	at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585)
	at clojure.java.jdbc$db_do_execute_prepared_statement.invokeStatic(jdbc.clj:791)
	at clojure.java.jdbc$db_do_execute_prepared_statement.invoke(jdbc.clj:778)
	at clojure.java.jdbc$db_do_prepared.invokeStatic(jdbc.clj:814)
	at clojure.java.jdbc$db_do_prepared.invoke(jdbc.clj:795)
	at clojure.java.jdbc$insert_cols_BANG_.invokeStatic(jdbc.clj:1069)
	at clojure.java.jdbc$insert_cols_BANG_.invoke(jdbc.clj:1061)
	at clojure.java.jdbc$insert_multi_BANG_.invokeStatic(jdbc.clj:1110)
	at clojure.java.jdbc$insert_multi_BANG_.invoke(jdbc.clj:1093)
	at metabase.cmd.load_from_h2$insert_entity_BANG_$fn__30770.invoke(load_from_h2.clj:125)
	at metabase.cmd.load_from_h2$insert_entity_BANG_.invokeStatic(load_from_h2.clj:124)
	at metabase.cmd.load_from_h2$insert_entity_BANG_.invoke(load_from_h2.clj:106)
	at metabase.cmd.load_from_h2$load_data_BANG_.invokeStatic(load_from_h2.clj:140)
	at metabase.cmd.load_from_h2$load_data_BANG_.invoke(load_from_h2.clj:134)
	at metabase.cmd.load_from_h2$load_from_h2_BANG_$fn__30850.invoke(load_from_h2.clj:209)
	at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:613)
	at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585)
	at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:629)
	at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585)
	at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:598)
	at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585)
	at metabase.cmd.load_from_h2$load_from_h2_BANG_.invokeStatic(load_from_h2.clj:206)
	at metabase.cmd.load_from_h2$load_from_h2_BANG_.invoke(load_from_h2.clj:199)
	at clojure.lang.Var.invoke(Var.java:379)
	at metabase.core$fn__31589.invokeStatic(core.clj:209)
	at metabase.core$fn__31589.doInvoke(core.clj:207)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:646)
	at clojure.core$apply.invoke(core.clj:641)
	at metabase.core$run_cmd$fn__31592.invoke(core.clj:216)
	at metabase.core$run_cmd.invokeStatic(core.clj:216)
	at metabase.core$run_cmd.doInvoke(core.clj:211)
	at clojure.lang.RestFn.applyTo(RestFn.java:139)
	at clojure.core$apply.invokeStatic(core.clj:648)
	at clojure.core$apply.invoke(core.clj:641)
	at metabase.core$_main.invokeStatic(core.clj:228)
	at metabase.core$_main.doInvoke(core.clj:224)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at metabase.core.main(Unknown Source)
Command failed with exception: Batch entry 0 INSERT INTO permissions_group ( "id", "name" ) VALUES ( 1, 'All Users' ) was aborted.  Call getNextException to see the cause.

We fixed this yesterday - https://github.com/metabase/metabase/issues/3592

It will be in our patch release this coming week. Sorry for any hassle!

1 Like