MongoServerError: sqlGenerateSchema command not found

I try to connect to power BI, before, everything was correct but after I did copy of database - no.
So now I have two databases and when I try to connect I get error:

DataSource.Error: The table has no visible columns and cannot be queried.

I tried many different thing.

  1. File → Options and settings → Options → Data Load → Clear cache;
  2. Clear all global permission in Power BI
  3. Changed user to Full permission in mongo DB ( dbAdminAnyDatabase and atlasAdmin)
  4. Tried to set mongodb_max_varchar_length to 0. Login by admin via mongosh, changed db to adminm and tried to run db.adminCommand({setParameter: 1, mongodb_max_varchar_length: 0}) but got

MongoServerError: (Unauthorized) not authorized on admin to execute command { setParameter: 1, mongodb_max_varchar_length: 0, apiVersion: “1”, lsid: { …

  1. Tried to regenerate SQL schema, by db.runCommand({ sqlGenerateSchema: 1, sampleNamespaces: ["test.cars"], sampleSize: 2, setSchemas: true}) but got

MongoServerError: command not found

So before everything works correct because I made custom Data Federation now I try to use automatic Federation. Can someone help me?

mongo 6.1

As always - the right question always has an answer.

  1. I tried to connect to db directly not to federation.
  2. same issue with generate scheme - you have to use federation plus set SPECIAL permission for adminDb.
  3. And for set permission for specific database you have to use CUSTOM role

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.