Prisma1: [Mongo] prisma export => 'The connector is missing the import / export capability.'

Created on 3 Jan 2019  路  3Comments  路  Source: prisma/prisma1

Hi,
The export function on MongoDB is not available? Or am I wrong somewhere?

[root@server prisma]# prisma export -e .
  config CWD /srv/activity-back/src/prisma +0ms
  config HOME /root +2ms
  config definitionDir /srv/activity-back/src/prisma +0ms
  config definitionPath /srv/activity-back/src/prisma/prisma.yml +0ms
  cli { isGlobal: true } +0ms
  StatusChecker setting status checker +0ms
  cli command id export +4ms
  cli:plugincache Got plugin from cache +0ms
  cli:plugincache /root/.cache/prisma/plugins.json +0ms
  cli:plugincache Got plugin from cache +1ms
  cli:plugincache /root/.cache/prisma/plugins.json +0ms
  plugins findCommand prisma-cli-core +0ms
  plugin requiring command +0ms
  cli-engine:plugins:manager requiring /usr/lib/node_modules/prisma/node_modules/prisma-cli-core +0ms
  cli-engine:plugins:manager required +525ms
  plugin required command +526ms
  StatusChecker setting status checker +543ms
  prisma definition making cluster here +0ms

Downloading nodes...  client Downloading from http://localhost:4466/export +0ms
  client {"fileType":"nodes","cursor":{"table":0,"row":0,"field":0,"array":0}} +0ms
  Exporter { errors:
  Exporter    [ { message: 'The connector is missing the import / export capability.',
  Exporter        requestId: 'local:cjqh3iln7000j094818is8so9' } ] } +0ms
 !
Error: [object Object]
    at Exporter.<anonymous> (/usr/lib/node_modules/prisma/node_modules/prisma-cli-core/src/commands/export/Exporter.ts:121:15)
    at step (/usr/lib/node_modules/prisma/node_modules/prisma-cli-core/dist/commands/export/Exporter.js:32:23)
    at Object.next (/usr/lib/node_modules/prisma/node_modules/prisma-cli-core/dist/commands/export/Exporter.js:13:53)
    at fulfilled (/usr/lib/node_modules/prisma/node_modules/prisma-cli-core/dist/commands/export/Exporter.js:4:58)
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
Exiting with code: 1

Versions :

  • prisma CLI: prisma/1.23.2 (linux-x64) node-v11.4.0
  • Prisma Server: docker prismagraphql/prisma:1.23
  • MongoDB : docker mongo:3.6
kinfeature rf0-needs-spec areconnectomongo

Most helpful comment

That is correct, Import/Export is currently not available for the Mongo connector. The Normalized Data Format (NDF) we are using for the SQL connectors during Import/Export would incur a very heavy performance penalty when using it with the Mongo connector.

We therefore will have to come up with a new Import/Export NDF that hopefully is performant and can be shared between all Prisma connector.

That will take us some time, so until that is this capability will not be available for the Mongo connector.

All 3 comments

That is correct, Import/Export is currently not available for the Mongo connector. The Normalized Data Format (NDF) we are using for the SQL connectors during Import/Export would incur a very heavy performance penalty when using it with the Mongo connector.

We therefore will have to come up with a new Import/Export NDF that hopefully is performant and can be shared between all Prisma connector.

That will take us some time, so until that is this capability will not be available for the Mongo connector.

@do4gr So is there any workaround to import data to MongoDB which has ability to override @id @createdAt and @updatedAt ? Is that safe to remove these tag and add it later after importing data?

You could create the datamodel you would like to have and then populate it with sample data so that Prisma sets up the db structure it expects. Then you could import the data you want directly into Mongo in that structure without using Prisma. Afterwards Prisma should be able to just query and mutate that data.

Currently there is no way to except for Import to influence the id, createdAt, updatedAt fields using Prisma directly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlessandroAnnini picture AlessandroAnnini  路  3Comments

notrab picture notrab  路  3Comments

sorenbs picture sorenbs  路  3Comments

Fi1osof picture Fi1osof  路  3Comments

schickling picture schickling  路  3Comments