DotPi
DotPi

Reputation: 4137

Cockroach DB multi-tenancy IMPORT error for sql dump import

I am trying to import a sql dump into a cockroachdb and getting the following error:

 IMPORT is unsupported in multi-tenancy mode

I have created an instance of CockroachCloud Free hosted on Google cloud Platform and have successfully connected to it form my terminal. I am trying to follow the tutorial here to import spatial data (geojson) into a database I created called SpatialData.

After using ogr2ogr to convert the geojson file to a sql dump, I have hosted the sql dump on a Google Cloud Bucket and made it public. Here is the url for the file:

https://storage.googleapis.com/poi_roi/tanks.sql 

However when I try to IMPORT the the data as a table in my database, I am getting the aforementioned error when I execute either of:

IMPORT TABLE tanks FROM PGDUMP 'https://storage.googleapis.com/poi_roi/tanks.sql';

OR

IMPORT PGDUMP('https://storage.googleapis.com/poi_roi/tanks.sql');

Upvotes: 0

Views: 244

Answers (1)

Marc
Marc

Reputation: 21095

CockroachCloud Free is in Beta and is missing some features (the stated reason for still being in beta).

You can find more details in the FAQ which mentions restrictions in two answers. Both answers spell out the lack of support for IMPORT (emphasis mine):

Limitations of CockroachCloud Free:

CockroachCloud Free is currently in beta and there are capabilities we are still working on enabling, such as the ability to enable backups, to import data, and no-downtime upgrades to a paid tier. If you want to use any of these capabilities, try a 30-day trial of CockroachCloud.

Why is CockroachCLoud Free in Beta:

CockroachCloud Free is in beta while we work on adding core features like import and backups.

You will need to find an alternate way of loading your data such as creating the resources and inserting the data yourself.

Upvotes: 1

Related Questions