I am new to MarkLogic and need help in a issue debugging. I have created a view with MarkLogic TDE and would like to get the count of records for some date range from that view.
I have checked the option of trying optic API in this.
Tried this XQuery which gives me an error saying the BookingCreateDt is not available in the view, but it actually exists in my template view.
Can you please spare some time to check the problem.
Query :
xquery version "1.0-ml";
import module namespace op=http://marklogic.com/optic at "/MarkLogic/optic.xqy";
op:from-view("GTM2_Shipment", "Shipment_View", "")
=> op:select(("Ancillary_QuotePrice", "transMode"))
=>op:where(
op:and((
op:eq(op:col('transMode'), 'Sea')
,
op:gt(op:col('BookingCreateDt'), '2022-03-21T15:03:20')
))
)
=>op:limit(1)
=>op:result()
And it returns this error -
[1.0-ml] SQL-NOCOLUMN: Column not found: BookingCreateDt