question

Upvotes
Accepted
68 3 4 8

No extractions associated

Hello everybody,

If the extraction I created (List<InstrumentIdentifier>, InstrumentList, ReportTemplate, ReportExtraction, Schedule) shows "No extractions are associated with this schedule" in the web interface on the page of the schedule, what is the missing object ?

(missing can mean improperly linked to other objects, of course)

It worked good so long I recalled the objects I created on the web interface, but after re-creating everything by code I have this error.

tick-history-rest-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
68 3 4 8

Hello,

Some instructions were not necessary, if compared to the code provided by the demo application. But let us admit this was not really the point.

In fact, it appears the problem was rather on the side of the ReportTemplate : I forgot to give conditions, which for sure returned far too many data. Is anybody able to precise what conditions are taken in account when launching requests through the web interface ?

If you type the name of a ReportTemplate followed by a point, the intellisense does not propose you condition, but when creating the ReportTemplate you can provide it, this way :

reportTemplate = new TickHistoryIntradaySummariesReportTemplate
{
    Name = strReportTemplateName,
    Condition = new TickHistoryIntradaySummariesCondition()
    {
        QueryStartDate = DateTime.Parse("2016-09-29T00:00:00.000-05:00"),
        QueryEndDate = DateTime.Parse("2016-12-29T00:01:00.000-05:00"),
        ReportDateRangeType = ReportDateRangeType.Range
    }
};

After that, in another thread was said that it is not mandatory to delete the objects, and you can get them back later. For sure, but maybe that needs to spend more time to know exactly what properties need to be updated when calling the object again.

__

Perhaps I forgot a little, during the day I spent a lot of time to send asynchronous requests by code, which did not generate an exception at execution of the code, but then the extraction failed.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
68 3 4 8

Some more elements ...

I created another schedule from the web interface, with the same list and the same report, and it worked good.

So, I shall have to verify if there is a problem with the schedule.

This is the code that defines it :

   string strScheduleName = "IntraDaySummariesSchedule";

    Schedule schedule = this.FindScheduleByName(extractionsContext, strScheduleName);
    if (schedule == null)
    {
        schedule = new Schedule()
        {
            ListId = il.ListId,
            Name = strScheduleName,
            ReportTemplate = rt,
            ReportTemplateId = rt.ReportTemplateId,
            OutputFileName = "OutputIntraDaySummaries"
        };
        TimeTrigger t = new TimeTrigger();
        t.At.Add(new ThomsonReuters.Dss.Api.HourMinute() { Hour = hour, Minute = minutes });

        schedule.Trigger = t;
        schedule.Recurrence = ScheduleRecurrence.CreateSingleRecurrence(re.ExtractionDateUtc, false);
        extractionsContext.ScheduleOperations.Create(schedule);
        schedule.ReportTemplate = rt;
        schedule.ReportTemplateId = rt.ReportTemplateId;
    }

    re.IsTriggered = true;
    ExtractedFile ef = new ExtractedFile();
    ef.ExtractedFileName = "OutputFileIntraDaySummaries";
    ef.ScheduleId = schedule.ScheduleId;
    re.FullFile = ef;
    re.ScheduleId = schedule.ScheduleId;
    re.ScheduleName = schedule.Name;
    schedule.NextExtraction = re;

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea