Hi @Adolfo_Adrian,
I’ve not yet tested this on Power BI but I believe it seems to work on DBeaver assuming you just want to see the output from the view. For example from my test environment:
Initial data:
AtlasDataFederation testdb> show collections
collection
AtlasDataFederation testdb> db.collection.find()
[
{ _id: ObjectId("64accacd1c9d59c7264bbfdf"), a: 3 },
{ _id: ObjectId("64accacd1c9d59c7264bbfdd"), a: 1 },
{ _id: ObjectId("64accacd1c9d59c7264bbfde"), a: 2 },
{ _id: ObjectId("64accacd1c9d59c7264bbfe0"), a: 4 },
{ _id: ObjectId("64accacd1c9d59c7264bbfe1"), a: 5 }
]
View being created to match documents with {'a': 2}
:
AtlasDataFederation testdb> db.createCollection( "testViewColl", { viewOn: "collection", pipeline: [{ $match: { 'a':2 } }] } )
{ ok: 1 }
Verifying the view:
AtlasDataFederation testdb> db.runCommand({"listCollections":1})
{
ok: 1,
cursor: {
firstBatch: [
{
name: 'collection',
type: 'collection',
options: {},
info: { readOnly: true }
},
{
name: 'testViewColl',
type: 'view',
options: {
viewOn: 'collection',
pipeline: [ { '$match': { a: { '$eq': 2 } } } ]
},
info: { readOnly: true }
}
],
id: Long("0"),
ns: 'testdb.$cmd.listCollections'
}
}
AtlasDataFederation testdb> db.testViewColl.find()
[ { _id: ObjectId("64accacd1c9d59c7264bbfde"), a: 2 } ]
DBeaver table for the initial data:
DBeaver showing data for the view:
I’ll try test this out with Power BI connector when possible and update here with any information. But if you’re running into any issues so far let me know what the scenario / error messages are.
Regards,
Jason