2

I'm using a pipeline to copy data from CosmoDB to a Azure Data Lake, this within a Data Factory. I'm using the MongoDB API instead of the SQL.

There is a field in which we can enter a Filter expression, in the manuals there is specified that we have to use them in Strict mode instead Shell mode.

As I'm totally new to Cosmo/Mongo I need some help for retrieving the top x records.

As a Sample, this filter works {"TrainKey.TrainNumber" : {$eq: 11332 }}.

But now I tried several option with {$limit: 100} or {limit(100)}, but none of them works.

Could anybody point me to the right direction?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Harry Leboeuf
  • 723
  • 12
  • 30

1 Answers1

1

Follow the strict mode in the mongo db manual,still no luck as same as you.However, you could configure cursorMethods.limit(link) to implement $limit feature.

enter image description here

I tested it on my side and it works.

enter image description here

Jay Gong
  • 23,163
  • 2
  • 27
  • 32