Skip to content

Instantly share code, notes, and snippets.

public async Task<IActionResult> Post([FromBody] WeatherChange weatherChange)
{
try
{
await _daprClient.SaveStateAsync("mongostatestore", "weather", weatherChange);
}
catch (Exception e)
{
return BadRequest();
public async Task<IActionResult> Post([FromBody] WeatherChange weatherChange)
{
try
{
await _daprClient.SaveStateAsync("mongostatestore", "weather", weatherChange);
}
catch (Exception e)
{
return BadRequest();
[HttpPost]
[Route("/saveWeatherState")]
public async Task<IActionResult> Post([FromBody] WeatherChange weatherChange)
{
try
{
await _daprClient.SaveStateAsync("mongo", "admin", weatherChange);
}
catch (Exception e)
Microsoft.Hosting.Lifetime: Information: Now listening on: http://127.0.0.1:5300
info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://127.0.0.1:5300
Microsoft.Hosting.Lifetime: Information: Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
Microsoft.Hosting.Lifetime: Information: Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers().AddDapr(builder => builder.UseHttpEndpoint(Configuration.GetValue<string>("DAPR_HTTP_ENDPOINT"))
.UseGrpcEndpoint(Configuration.GetValue<string>("DAPR_GRPC_ENDPOINT")));
services.AddControllers();
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "DaprAdventures.SaveStateService", Version = "v1" });
});
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"DAPR_HTTP_ENDPOINT": "http://localhost:5380",
@kshitijcode
kshitijcode / parameters
Created November 27, 2021 10:33
Pipeline Parameters
## Base Path of File
"basePath": base_path,
"filePath": "employee_*.parquet",
## Target Table
"targetTable": target_table,
# Bad table Data
"badDataTable": "bad_employees",
# ADLS Container Name
"containerName": container_name,
# Storage Account Name
"SourceTableSchemaName":"dbo",
"SourceTableName":table_raw,
"SinkTableSchemaName":"dbo",
"SinkTableName": table_curated,
"HasIncrementalData":"false"
"sourceDatabase": database,
.
├── data
├── dataconnectors
│ └── __pycache__
├── tests
└── utils
.
├── README.md
├── data
│ └── employee_sample_integration_test.parquet
├── dataconnectors
│ └── adls.py
├── requirements.txt
├── tests
│ ├── conftest.py
│ └── test_master_pipeline_e2e.py