intakedesk / PowerBI-General

Placeholder for issues migrated from Jira
1 stars 0 forks source link

Repair Azure Notification LEADS, not matching Campaigns #610

Closed jesusitd closed 4 years ago

jesusitd commented 4 years ago

There was a wrong date in Cases table, talc_facility1_date_start causing the refresh to break.

There must be a problem with refresh-daily function, so I'm debugging it.

Also, activated Azure App Insights for this resource.

jesusitd commented 4 years ago

image Last refresh long ago

jesusitd commented 4 years ago

FOUND ERROR: LeadVendors table is not available anymore in the mode. Took it out from refresh-daily routine:

var refreshTask = new AnalysisServicesRefreshTask()
            {
                modelName = "azure-as-tortvision",
                targetElements = new List<TargetElement>
                    {
                        new TargetElement{targetType = "table", tableName = "LeadVendors"},  // ** THIS LINE OUT**
                        new TargetElement{targetType = "table", tableName = "LeadVendorCampaigns"},
                        new TargetElement{targetType = "table", tableName = "LeadVendorAds"},
                    }
            };

Repair logError line (73) in as-model-process's HttpGeneral that was not logging the error properly:

catch (Exception e)
{
    azureAsServer.Disconnect();
    log.LogError(0, e, "[HTTP Refresher]: An exception occurred while adding the Target Elements to refresh.");
    return req.CreateResponse(HttpStatusCode.NotFound, $"A {targetElement.targetType} was not found:\r\n{e}");
}
jesusitd commented 4 years ago

Done.