Has anyone gotten replacement variables to work with the ODBC connector on a consistent basis

I am trying to utilize replacement variables on ODBC connector queries to move towards incremental APPEND queries instead of REPLACE queries.

However, it is taking multiple attempts to get the workbench to save the replacement variable. Without saving it, I keep getting "Replacement parameter does not exist for column XXX"

It seems very strange that such a powerful feature works so poorly, and does not seem to have much (if any attention from Domo.)

Tagged:

Comments

  • I have noticed it being a bit finicky in the past trying to save the replacement variable but I had the most success when pressing enter after typing in the replacement variable value and then saving the workbench job.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • swagner
    swagner Contributor

    This doesn't work for me… frustrating…

  • i think I finally have it working consistently.. After setting the replacement variable value, go back to the query, make an insignificant change (add/remove a space at the end of a line), and apply.

  • We use replacement variables in Workbench jobs. The three critical things you need to make sure it works:

    • The column you want to use as a replacement variable (last modified date, PK, whatever) must be in a SELECT clause, a WHERE clause, and an ORDER BY clause in the query. I usually have the WHERE clause commented out for the first load. The WHERE clause will look like this: WHERE [id] > !{lastvalue:id}!
      • If you're using a string or datetime column, you need to wrap the variable in single quotation marks, like this: '{!lastvalue:modified_datetime}!'
    • The column must be specified in the Replacement Variables tab. (e.g. column = [id] and value = 'lastvalue'
    • The job must run once as a replace to load the data and capture a value for the variable. Once this is done, I take out the comment on the WHERE clause.

    A little involved, but works.