Skip to main content
Solved

DirectQuery For Future Datapoints


Ben Brandt
MVP

Hello!

I am querying for DataPoints using the PostgreSQL Gateway, which I assume will have the same behavior as the DirectQuery feature built on the PostgreSQL Gateway.  What I am noticing is that I am not able to retrieve any DataPoints for future dates.  Is this intended or a bug?  Most of the data we produce and manage is in the future, so this would be an important feature for us if it could be supported.  Thanks!

 

Query results returned in Azure Data Studio from PostgreSQL gateway:

In CDF these time series have datapoints representing predictions far out into the future:

 

Best answer by Einar Omang

I think this is because querying for datapoints defaults to fetching everything before current time. You can specify a max time, and it will use that instead. To translate that to the postgres gateway, try adding a condition on max time, like `time_stamp < ‘2030-01-01T00:00:00`.

View original
Did this topic help you find an answer to your question?

I think this is because querying for datapoints defaults to fetching everything before current time. You can specify a max time, and it will use that instead. To translate that to the postgres gateway, try adding a condition on max time, like `time_stamp < ‘2030-01-01T00:00:00`.


Ben Brandt
MVP

Wow! It works!  You’re my hero, @Einar Omang !

All we need to do is include a upper and lower bound for time_stamp in the query.  Thanks!

 


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings