Unable to run pipeline engagement tasks

Hi all

I’m having problems to run Engagement tasks. Running InsertToMysqlCourseActivityTask always exist with status 30 (error). It seems to be a problem injecting data into MySQL as it raise the following exception: ‘Cannot overwrite a table with an empty result set.’ Here is full InsertToMysqlCourseActivityTask log

Tracking the code, it seems that the insertion is done by CourseActivityPartitionTask, but if I run a similar hive query, it returns data and seems to do the insertion ok (see select log and overwrite log).

I am confused with the error message: if hive returns data properly, why SQL receives an empty result?

Thanks in advance for any help



Already tried to run the database migration process?

it’s something like manage.py migrate from insight

Hi @Yago

Remove the –overwrite-mysql parameter from your task and run it again, basically, your MySQL table is empty and you are trying to overwrite it, that’s why it’s throwing an error.

1 Like

Hi everyone. Thanks for your answers.

@sbernesto I tried to migrate insights, and in fact there where some missing migrations to do. But it doesn’t change the results. They are different projects so I believe that it should not affect one to another, but just in case it was nice to try…

@anjali Removing –overwrite-mysql flag fixes the terminal error, and indeed the process finished ok, but there were no changes in hive / SQL databases (course_activity table is empty) and insights frontend is failing :slightly_frowning_face: Here the complete log https://pastebin.com/3KjAvpAp

Someone suggest that tracking logs may not be right, but if I run a SELECT inside hive it retrieves data (https://pastebin.com/hSsmgXrk)

Thanks again for your help!

Hello @Yago

I think there is the date interval problem in this task, please check /var/lib/analytics-tasks/analyticstack/repo/override.cfg and find the calendar code block and extend the date interval.

Hope It helps you.

1 Like

Yeah, the problem was exactly in calendar code block, dates were wrong.

Many thanks @anjali!

1 Like