Skip to main content

Community

Transformations: Ability to run Custom SQL; Ability to pass parameters to AgentPlugin

Please sign in to leave a comment.

Comments

1 comment

  • Mark Van de Wiel User

    Hi Rajpal,

    1. We support stored procedures on several platforms (https://fivetran.com/docs/hvr6/capabilities/620#othercapabilities). Could you use that as a wrapper around the SQL you want to run?

    2. You should do state management in the AgentPlugin code. E.g. if you want to transform certain rows then you could add a column to the table "transformed". You default this column to 0 or 'N'. For your load routine you would process all rows with "transformed" set to no, and update the value to yes (e.g. in a stored procedure).

    FYI we recently added an argument to Capture OnCaptureTableEndCycle (https://fivetran.com/docs/hvr6/action-reference/capture#oncapturetableendcycle). With this attribute you can force an AgentPlugin to run on the target based on a table you control. You can store any values you want to use for the execution of the plugin in the table you use to trigger the end of cycle. Then use a similar approach as described above to mark a row as processed.

    Hope this helps.
    Mark.