Projection Error Message
-
quinta-feira, 6 de outubro de 2011 15:06
Hello,
i tried to minimize the selected data using projection:
http://blogs.msdn.com/b/windowsazurestorage/archive/2011/09/15/windows-azure-tables-introducing-upsert-and-query-projection.aspx
I tried the anonymus Version:
DateTime interval = DateTime.UtcNow.AddDays(-14).Date;
var query = from data in _Context.CreateQuery<CloudUserSelectEntity>(_CloudUserSelectTable)
where data.CreateDate >= interval && data.IsContract == false
select new
{
data.PartitionKey
};foreach (var cude in query)
and the type based version:
{
System.Diagnostics.Debug.Print(cude.PartitionKey);
}DateTime interval = DateTime.UtcNow.AddDays(-14).Date;
var query = from data in _Context.CreateQuery<CloudUserSelectEntity>(_CloudUserSelectTable)
where data.CreateDate >= interval && data.IsContract == false
select new CloudUserSelectEntity
{
PartitionKey = data.PartitionKey
};foreach (CloudUserSelectEntity cude in query)
{
System.Diagnostics.Debug.Print(cude.PartitionKey);
}but it always gives me an error: [One of the request inputs is not valid.]
Query: {http://127.0.0.1:10002/devstoreaccount1/CloudUserSelect()?$filter=(CreateDate ge datetime'2011-09-22T00:00:00Z') and (IsContract eq false)&$select=PartitionKey}
It also does not work if the where clause is removed.
If i select the whole Entity:
DataServiceQuery<CloudUserSelectEntity> dsq = (from data in _Context.CreateQuery<CloudUserSelectEntity>(_CloudUserSelectTable)
where data.CreateDate >= interval && data.IsContract == false
select data) as DataServiceQuery<CloudUserSelectEntity>;this works.
Target Framework is v4, i am using Development storage.
Any Ideas or did i missed something?
Thanks Martin
Todas as Respostas
-
quinta-feira, 6 de outubro de 2011 17:46
Hi,
Please note that projections are still not supported in the development storage (http://msdn.microsoft.com/en-us/library/dd179421.aspx). That could be the reason of this error.
Hope this helps.
Thanks
Gaurav Mantri
Cerebrata Software
-
sexta-feira, 7 de outubro de 2011 08:40
Hi,
thanks for your hint, i missed that.
I tried to use the Azure Environment, from my development machine but it gives me the same error for the request:
{https://xxx.table.core.windows.net/CloudUserSelect()?$filter=(CreateDate ge datetime'2011-09-23T00:00:00Z') and (IsContract eq false)&$select=PartitionKey}
There is no difference if i remove the params or select PartitionKey and RowKey.
Thanks,
Martin
-
segunda-feira, 10 de outubro de 2011 02:02
Hi Martin,
Can you give us the error details? Please send the below info to jharidas @ microsoft.
1> Account name, Request id (x-ms-request-id header in response), date time of teh request
2> error details
We will have a look and get back.
-Jai
-
terça-feira, 21 de fevereiro de 2012 08:35
Sorry - realized that we did not close this thread. The problem here was that the version 2011-08-18 was not being set using the sending request event.
- Sugerido como Resposta Jai HaridasMicrosoft Employee terça-feira, 21 de fevereiro de 2012 08:38
- Marcado como Resposta sys1 quarta-feira, 22 de fevereiro de 2012 17:11

