Question

I need to synchronize the columns of a TABLE with those of a metadata view when a scheduled process executes at a specific time each day. How can I achieve this synchronization effectively?

  • 10 April 2024
  • 5 replies
  • 36 views

Badge +1

I need to synchronize the columns of a TABLE with those of a metadata view when a scheduled process executes at a specific time each day. How can I achieve this synchronization effectively?


5 replies

Userlevel 6
Badge +26

Hi @RTGAKHILA 

I could not follow your requirements.

Can you please elaborate or rephrase?

Cheers!

Badge +1

i have a custom metadata view named ABC_VIEW in that i have columns like sms, phone, Id and i have two records in that view so i want to update that data with my table for example XYZ is my table name and it has keys mobile,sms,id so now i want to update that view data with this table every day at 8 AM for that i want to schedule a schedule process to run every day at required time so in that case i want xml body to acheive this here the xml that i wrote but its not working.

<perform_mass_insert>
  <parameters>
    <select>
      <hierarchy_select>
        <primary_table>ABC_VIEW</primary_table>
        <attrs>
          <attr>ABC_VIEW.task_id</attr>
          <attr>ABC_VIEW.sms_message</attr>
          <attr>ABC_VIEW.phone_number</attr>
        </attrs>
        <from>
          <table>ABC_VIEW</table>
        </from>
        <where />
      </hierarchy_select>
    </select>
    <update>
      <update_XYZ>
        <XYZ>
          <task_id xpath="task_id"></task_id>
          <sms_message xpath="sms_message"></sms_message>
          <mobile_number xpath="mobile_number"></mobile_number>
          <event_type>NOTIFY</event_type>
          <insert_update is_initialized="False" />
        </XYZ>
     </update_XYZ>
    </update>
  </parameters>
</perform_mass_insert>

Userlevel 6
Badge +26

Hi @RTGAKHILA 

What is perform_mass_insert? It is not a basline MPM.

Do you have a customisation?

Cheers!

Badge +1

i was not sure what exactly it is i just gone thorough fsm old conversion and kept it , if you know how to do that please guide me with an example

Userlevel 6
Badge +26

Hi @RTGAKHILA 

You cannot update a view.

A view is a virtual table created based on an SQL query that refers to other tables in the database. Unlike concrete tables, views do not store rows and columns on disk. Instead, they contain the SQL query itself.

So if you want the values in that view to get updated you will need to update the table that view is based on. For that, you can use an ‘Update Message’ or a ‘Mass Update Message’ depending on the use case and required functionality.

Also, check if you have a custom MPM named perform_mass_insert. It is a common customisation that was implemented in many FSM solutions.

Cheers!

Reply