Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParitionKey required on sum #8

Open
mregni opened this issue Jul 24, 2019 · 1 comment
Open

ParitionKey required on sum #8

mregni opened this issue Jul 24, 2019 · 1 comment

Comments

@mregni
Copy link

mregni commented Jul 24, 2019

Hi, thanks for the nice store procedure!

One quick question. I'm using this one on a shared CosmosDB with partition key 'pk', when I query my db with the following code I get an error:

"System.Private.CoreLib: Exception while executing function: Horizontal. Microsoft.Azure.DocumentDB.Core: PartitionKey value must be supplied for this operation."

Any idea how I can fix this?

string cubeConfigString = @"{
        cubeConfig: {
        groupBy: 'startDateTime', 
        field: 'timeserie', 
        f: 'sum'
    }, 
    filterQuery: 'SELECT * FROM c'
}";
Object cubeConfig = JsonConvert.DeserializeObject<Object>(cubeConfigString);
var result = await client.ExecuteStoredProcedureAsync<dynamic>(uri + "/sprocs/cube", cubeConfig);
@adamlepkowski
Copy link

adamlepkowski commented Aug 30, 2019

dynamic result = await this.Client.ExecuteStoredProcedureAsync<dynamic>("db", "collection", "cube", new RequestOptions() {PartitionKey = new PartitionKey("PK key vaule")}, new[] {config});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants