Couchbase XDCR Advance filtering- How to configure dynamic date range in filter expression - couchbase

Is there any possible mechanism by which we can configure XDCR filter expression with dynamic date range in couchbase?
example can be like configuring filter expression for replicating entities older than year.
DATE_DIFF_STR(NOW_STR(), createdDate,"day") > 365
As per documentation it seems N1QL date functions are not supported
https://docs.couchbase.com/server/current/xdcr-reference/xdcr-filtering-expressions.html
says "N1QL date functions are not supported by XDCR Advanced Filtering. For information on N1QL date functions, see the N1QL page for Date Functions"
Please suggest if any alternative of N1QL date function can be used while configuring XDCR filter expression to filter entities based on interval of time between the current date and the date of creation field in the given document.

Related

Uploaded CSV file shows Date column as strings, how to convert to Dates for AutoAI use?

I was trying out the AutoAI feature on the IBM cloud with a CSV that only has two columns: a date column and a change column (1 or 0). When I upload it, as a data asset, it sees the Date column as a string. Even after going through data refinery and converting it to a date, when AutoAI reads the file, it still sees it as a column of strings.
How do I make AutoAI recognize the date column as a column?
Blockquote
Unfortunately , date recognition doesn't work on AutoAI at this moment. However, next year there is going to be an update of the autoai service where you will be able to have that feature. If you want to test it, there is a demo version of that: https://autoai.mybluemix.net/home
Blockquote
Just to add a comment to Aleksandar's comment regarding the AutoAI Demo: it is a research demo thus it is not exposed to the general public. It needs further authorization (either an IBM w3id or a special login/pwd through an IBM sales representative).
And to answer the question, we are fully aware the user needs for the TS dataset and the Date/Time detection function, and it will be out very soon.
Unfortunately , date recognition doesn't work on AutoAI at this moment. However, next year there is going to be an update of the autoai service where you will be able to have that feature. If you want to test it, there is a demo version of that: https://autoai.mybluemix.net/home
The time series support is not in place yet. There is on-going effort to have first version available this year.
There is workaround option but not perfect (AutoAI will NOT treat data as timeseries):
do the preprocessing / features creation on your own (create features like year, month, day, week etc.)
pass such preprocessed data to AutoAI
Drawbacks: it will not be treated as ts data. Model validation (cross-validation), folds building will not take into account time order what may lead to unreliable metrics values.

How to get today's inserted documents in Couchbase?

I want to get all the documents which were inserted today in couchbase. My document doesn't has any createdAt timestamp. Can someone please guide on how this can be achieved without adding any timestamp to document?
There are several N1QL date functions you can use to insert the current timestamp in a range of formats. You can find out more here:
https://docs.couchbase.com/server/current/n1ql/n1ql-language-reference/datefun.html#fn-date-clock-local

In SSRS how to Disable future dates after today in the date picker calendar

Could someone please help me out in this, on how do i freeze the future dates than the current date in the date picker calendar in SSRS date parameter.
By default, there is no way to disable the future dates for the Date pick calendar in SQL server reporting services. But, you can do something to validate the date parameter value before report rendered, if the date value beyonds now, a message is shown to prompt the users the date entered invalidated, otherwise, the report works normally based on the date parameter selected.
Read this thread http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/8736ed6d-27f8-49ce-bbfa-718f4f4daa45/ for some workarounds to achieve this.I recommad the 1st one of the ways provided by Lukasz Pawlowski. Please don't use the messbox way, which desn't work in web due to it is only supported in window form platform.

Orion Context broker - query

In version 0.23 of Orion context broker.
Can I query the context for entities with a certain value on an attribute? How?
Can I query for entities generated at a certain time range? How?
For geolocation Filter. Is there any limit to the polygon vertices besides request size of 1MG?
thanks
Regarding attribute value filters, have a look to this other Q&A post.
Regarding querying for entities generated at a certain time range, we are planning to include that as the dateModified pseudo-attribute ("pseudo" in the sense that is not an attribute to be managed by the NGSI client, but by Orion itself), so you could do a query like this one to get all the entities modified from January 1st, 2015 to January 12th, 2015:
GET /v2/entities?q=dateModified==2015-01-01..2015-01-12
That functionality is not yet implemented, but as workaround your application could manage an attribute with the same semantics. Eg. you could use an entity attribute named myDate storing the date as a timestamp and do the same query in the following way:
GET /v2/entities?q=myDate==1420070400..1421020800
Note: 2015-01-01 equals to 1420070400 and 2015-01-12 equals to 1421020800, the following page may help: http://www.timestampgenerator.com
Regarding the limits of the polygon areas in geo-queries, we haven't found a limit so far. However, if you test with a large number and find a limit, please tell us about it.

SSRS - Is there a way to restrict date/time input parameters to date only? (Not report output field format.)

I am writing an SSRS report that has several parameters including a couple of date fields. I do not want the user to be able to enter time information in either date field, but SSRS only has the Date/Time data type. Is there a way to force these report parameters to act as date only, and can I set a specific format (e.g., dd/mm/yyyy)? I would like to keep the built-in date-picker-calendar functionality.
I do not want to write my own report parameter web page because if I did then this one report would be the odd one out given that all of our other reports (which don't use date parameters) work fine with the built-in SSRS parameter entry functionality.
Perhaps the answer is that you can't do it with the built-in options, but that seems crazy - how could something so obvious have been overlooked?
The Google and Stackoverflow searches I've done only gave me ways to set the format in the report output (actually there are a number of cases where people have asked a question similar to mine and only received answers about setting the output format).
The problem is that you are using parameters that get timestamp information.
For example, if you are using Now() in your expressions- you will be asking for the current date AND the current time. However, if you use Today()- you will only be asking for the current date.
=Today() 'returns date only
=Now() 'returns date and current timestamp
Useful references:
http://msdn.microsoft.com/en-us/library/ms157328(v=sql.90).aspx
http://msdn.microsoft.com/en-us/library/ms157328.aspx
To answer my own question based on research I've done since asking it: it seems it is not possible to control how SSRS handles user entry of date/time values in parameters. If there is a need to restrict to date (or time) only or do cross-field validation then you need to implement your own front-end - which unfortunately for my specific business case doesn't help.
In my experience it has only given me the date and time when the filed you are selecting from contains both date and time. I have found if I am selecting on a date only field then I only get the date in the parameter
There is a way, but it will require you to CAST your date as Varchar(10) in your parameter dataset.
Next,You'll have to choose "Data Type:" as Text under Parameters section.
Again, you'll have to make sure your SQL code re-converts it into date again. I do not prefer this way, but users really wanted to see date without time.
Let me know if you'd like screenshot or more detail.