Loading Metabase dumps not working property

  • Please take a look at this question yaml file created by the dump:

question_sample.yaml

dataset_query:
  database: /databases/db
  query:
    source-table: /databases/db/schemas/CLIENT/tables/table_name1
    filter:
		...
    aggregation:
		...
    breakout:
		...
    joins:
    - fields: all
      source-table: /databases/db/schemas/CLIENT/tables/table_name2
      condition:
      - =
      - - field-id
        - /databases/db/schemas/CLIENT/tables/table_name1/fields/userid
      - - joined-field
        - table_name2
        - - field-id
          - /databases/db/schemas/CLIENT/tables/table_name2/fields/userid
      alias: table_name2
    order-by:
    - - asc
      - - binning-strategy
        - - joined-field
          - table_name2
          - - field-id
            - /databases/db/schemas/CLIENT/tables/table_name2/fields/demo_age
        - default
  type: query
  • When loading the dump, this question is broken, here is the dataset_query created after loading the dump. Please notice source-table value inside Joins key is not numeric
{
	"database": 1,
	"query": {
		"source-table": 51,{
	"database": 1,
	"query": {
		"source-table": 51,
		"filter": ...,
		"breakout": ...,
		"joins": [{
			"fields": "all",
			"source-table": "/databases/db/schemas/CLIENT/tables/table_name2",
			"condition": ["=", ["field-id", 888],
				["joined-field", "table_name2", ["field-id", 794]]
			],
			"alias": "table_name2"
		}],
		]
	}
  • User gets displayed this error message:

Value does not match schema: {:query {:joins [{:source-table (not (matches-some-precondition? a-java.lang.String))}]}}

  • This question uses a join between 2 tables. Other questions with 1 single table data had no issues getting imported.

Thanks in advance

Hi @rodxyz
Please post “Diagnostic Info” from Admin > Troubleshooting.
I have no idea what you’re doing or trying to do, so perhaps you should start with explaining that.

Hi @flamber,

I am following this guide to create a dump from an instance and load it into another

  • Create dump
    java -jar metabase.jar dump [dump_name] --user [example@example.com]

This generated the yaml files structure

  • Loading dump

java -jar metabase.jar load [my_dump] --mode [skip/update] --on-error

This loads the yaml files into metabase metadata

Diagnostic Info. We are using Metabase Enterprise on Trial

{
  "browser-info": {
    "language": "en-US",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "ANSI_X3.4-1968",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.7+10-LTS",
    "java.vendor": "Oracle Corporation",
    "java.vendor.url": "http://java.oracle.com/",
    "java.version": "11.0.7",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.7+10-LTS",
    "os.name": "Linux",
    "os.version": "4.14.158-129.185.amzn2.x86_64",
    "user.language": "en",
    "user.timezone": "UTC"
  },
  "metabase-info": {
    "databases": [
      "presto"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "9.6.16"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.2.8"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2020-04-29",
      "tag": "v1.35.3",
      "branch": "enterprise-release-1.35.x",
      "hash": "10740ae"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

@rodxyz
When using the Enterprise Edition, please contact support via email.
Latest release is 1.35.4.1
Do you see any errors during the load? I’m going to try to reproduce.

Thank you @flamber

Please try using a question that joins 2 tables. Single table data question were loaded successfully.