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

The "PartitionKey" needs to be removed from the Queries in Lab 16/17 as when it is included, zero results are returned. #61

Open
gregoryagu opened this issue Nov 24, 2024 · 0 comments

Comments

@gregoryagu
Copy link

Module: dp-420

Lab/Demo: 16/17 (same code is used on both labs)

Description of issue: There are coding issues that prevent the code from running as expected.

Repro steps:

1, Run the lab as instructed. No items are found in the queries.

The issue is that the PartitionKey parameter is included with the queries. With this removed, the queries run as expected. Example:

Line 661:
await productContainer.ReplaceItemAsync(
//partitionKey: new PartitionKey(categoryId),
id: product.id,
item: product);

When line 662 is commented out, it runs as expected.

Line 198 through 201 needs to be commented out:

FeedIterator resultSet = container.GetItemQueryIterator(
new QueryDefinition(sql)
.WithParameter("@id", customerId));
//requestOptions: new QueryRequestOptions()
//{
// PartitionKey = new PartitionKey(customerId)
//});

There are many other places in the file that use the same parameter that also need to be commented out.

Once I did this, I could run the lab as expected.

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

1 participant