Skip to content

Commit

Permalink
Updating documentation for the Archive Data demo
Browse files Browse the repository at this point in the history
  • Loading branch information
TaleLearnCode committed Sep 12, 2021
1 parent 8aa5471 commit d4db657
Show file tree
Hide file tree
Showing 12 changed files with 126 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
################################################################################

/Demos/Common/Settings.cs
/Demos/Demonstrator/Settings.cs
Binary file modified .vs/Ch-Ch-Ch-Changes/v16/.suo
Binary file not shown.
Binary file modified .vs/Ch-Ch-Ch-Changes/v17/.suo
Binary file not shown.
2 changes: 1 addition & 1 deletion .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"\\Demos",
"\\Demos\\BasicChangeFeedDemo-31"
],
"SelectedNode": "\\Demos\\BasicChangeFeedDemo-31\\Function1.cs",
"SelectedNode": "\\Demos\\Ch-ch-ch-changes.sln",
"PreviewInSolutionExplorer": false
}
Binary file modified .vs/slnx.sqlite
Binary file not shown.
49 changes: 39 additions & 10 deletions Demos/DemoScript.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# Ch-ch-ch-changes: Tracing Changes in Azure Cosmos DB

0. [Setup](#setup)
1. [Basic Change Feed Demo](#basic-change-feed-demo)
2. Archiving Data
2. [Archiving Data](#archiving-data)
3. Denormalizing Data
4. Replicating Containers

All of these demos assume that a Cosmos DB account has been created using the Core (SQL) API.

---

## Setup
## Basic Change Feed Demo

#### Create Cosmos DB Account
Ensure that a Cosmos DB account is created using the Core (SQL) API
#### Prep-Work

#### Prepare for the Basic Change Feed Demo
1. Ensure that the 'Items' container is created via the "Quick Start" blade
2. Create the demo To Do items using the data below

Expand Down Expand Up @@ -68,9 +67,7 @@ Ensure that a Cosmos DB account is created using the Core (SQL) API
~~~

---

## Basic Change Feed Demo
#### Demo Steps

1. Navigate to Cosmos database
2. Open the 'Data Explorer' blade
Expand All @@ -85,4 +82,36 @@ Ensure that a Cosmos DB account is created using the Core (SQL) API
11. Change the LogInformation to LogWarning (so it shows up better during the demo)
11. Start the Azure Function project
12. From the Azure Portal, make changes and show how it gets detected by the change feed
13. Show how deletes are not detected by the change feed
13. Show how deletes are not detected by the change feed

---

## Archiving Data

#### Prep-Work

1. Prepare the Azure Storage Blob container to accept the archived data
* Ensure that that the container is empty

2. Prepare the Azure Cosmos DB account to accept the data
* Ensure that there is a ~moveData~ database with an empty ~archival~ container

3. Add the following settings to the local.settings.json file within the ArchiveData-Function project:
* CosmosConnectionString
* StorageAccountName
* StorageAccountKey
* BlobContainerName

4. Ensure the following settings are present in the ignored Setting class in the Demonstrator project:
* MoveDataDatabasebaseName
* ArchivalContainerName
* DataFolderPath

#### Demo Steps

1. Talk about how we are going to stimulate the questions interaction scenario
2. Talk through the code within ArchiveData function
3. Navigate to the *archival* container in the *moveData* container to show that it is empty
4. Navigate to the *data-archival* container in the Azure Storage account to show that it is empty
5. Ensure that the ArchiveData-Function and Demonstrator projects are set to start
6. Run the demonstrator project and start the Archive Data demo and talk through what's happening
17 changes: 17 additions & 0 deletions Demos/Denormalize Data/DenormalizeData-Function/Settings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace TaleLearnCode.ChChChChanges.Functions
{
public static class Settings
{
public static string CosmosConnectionString => "AccountEndpoint=https://cosmos-changefeed-eus2.documents.azure.com:443/;AccountKey=uKC2Tv6E4tsm2icnd2L7udcSCKCeIA2J33h7c1ZPN6EoYUyVGFzZ1FsyGrXVhFXz8BVzXUF4LX8RKQAO57aFdg==;";
public static string MoveDataDatabasebaseName => "moveData";
public static string ArchivalContainerName => "stchangeseus2";
public static string DataFolderPath => @"C:\Repos\TaleLearnCode\Presentations\Ch-ch-ch-changes\Demos\Data\";

public static string ShindigManagerDatabaseName => "";
public static string PresentationsContainerName => "";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace TaleLearnCode.ChChChChanges.Functions
{
public static class Settings
{
public static string CosmosConnectionString => "AccountEndpoint=https://cosmos-changefeed-eus2.documents.azure.com:443/;AccountKey=uKC2Tv6E4tsm2icnd2L7udcSCKCeIA2J33h7c1ZPN6EoYUyVGFzZ1FsyGrXVhFXz8BVzXUF4LX8RKQAO57aFdg==;";
public static string MoveDataDatabasebaseName => "moveData";
public static string ArchivalContainerName => "stchangeseus2";
public static string DataFolderPath => @"C:\Repos\TaleLearnCode\Presentations\Ch-ch-ch-changes\Demos\Data\";

public static string OrderManagementDatabaseName => "";
public static string OrdersContainerName => "";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace TaleLearnCode.ChChChChanges.Functions
{
public static class Settings
{
public static string CosmosConnectionString => "AccountEndpoint=https://cosmos-changefeed-eus2.documents.azure.com:443/;AccountKey=uKC2Tv6E4tsm2icnd2L7udcSCKCeIA2J33h7c1ZPN6EoYUyVGFzZ1FsyGrXVhFXz8BVzXUF4LX8RKQAO57aFdg==;";
public static string MoveDataDatabasebaseName => "moveData";
public static string ArchivalContainerName => "stchangeseus2";
public static string DataFolderPath => @"C:\Repos\TaleLearnCode\Presentations\Ch-ch-ch-changes\Demos\Data\";

public static string OrderManagementDatabaseName => "";
public static string OrdersContainerName => "";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace TaleLearnCode.ChChChChanges.Functions
{
public static class Settings
{
public static string CosmosConnectionString => "AccountEndpoint=https://cosmos-changefeed-eus2.documents.azure.com:443/;AccountKey=uKC2Tv6E4tsm2icnd2L7udcSCKCeIA2J33h7c1ZPN6EoYUyVGFzZ1FsyGrXVhFXz8BVzXUF4LX8RKQAO57aFdg==;";
public static string MoveDataDatabasebaseName => "moveData";
public static string ArchivalContainerName => "stchangeseus2";
public static string DataFolderPath => @"C:\Repos\TaleLearnCode\Presentations\Ch-ch-ch-changes\Demos\Data\";

public static string OrderManagementDatabaseName => "";
public static string OrdersContainerName => "";
}
}
17 changes: 17 additions & 0 deletions Demos/Replicating Data/ReplicatingData-Function/Settings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace TaleLearnCode.ChChChChanges.Functions
{
public static class Settings
{
public static string CosmosConnectionString => "AccountEndpoint=https://cosmos-changefeed-eus2.documents.azure.com:443/;AccountKey=uKC2Tv6E4tsm2icnd2L7udcSCKCeIA2J33h7c1ZPN6EoYUyVGFzZ1FsyGrXVhFXz8BVzXUF4LX8RKQAO57aFdg==;";
public static string MoveDataDatabasebaseName => "moveData";
public static string ArchivalContainerName => "stchangeseus2";
public static string DataFolderPath => @"C:\Repos\TaleLearnCode\Presentations\Ch-ch-ch-changes\Demos\Data\";

public static string ShindigManagerDatabaseName => "";
public static string PresentationsByTagContainerName => "";
}
}
Empty file added Demos/local.settings
Empty file.

0 comments on commit d4db657

Please sign in to comment.