lastvalue not updating when setting up UPSERT
I'm using Workbench 5 to set up some new datasets, on transactional tables which are updated often.
I'm testing this on a simple example, and have followed the guides https://knowledge.domo.com/Connect/Connecting_to_Data_Using_Workbench_5/Using_Upsert_in_Workbench_5 , Section How Do I Change Data Capture in https://knowledge.domo.com/Connect/Connecting_to_Data_Using_Workbench_5/13Workbench_5_FAQs and also from this post https://dojo.domo.com/t5/Workbench/How-do-I-use-lastvalue-variable-in-workbench-4/m-p/9244#M188
My query is set as this:
select id, last_updated, skills
from domo_test
where last_updated > !{lastvalue:last_updated}!
order by last_updated
I created the dataset using an initial value last_updated as to_Date('01/01/2015','dd/mm/yyyy') as the per the documentation. Once loaded, I changed the Update Method to Append, and selected the ID as my Upsert key on the schema tab.
When I run the job, there is no change in the query - I cannot see any change to the variable , it remains with the intial date set, and continues to load the same query with the intial date.
Using the solution in https://dojo.domo.com/t5/Workbench/How-do-I-use-lastvalue-variable-in-workbench-4/m-p/9244#M188 also does not work - if I set the value of the variable to !{lastvalue:last_updated}! and run the job it ends up in an infinite loop.
How is the lastvalue variable set, and can this be seen anywhere in Workbench?
Best Answer
-
Found the solution.
Even though the replacement variables work to replace the initial value irrespective of case, the lastvalue does not update unless the case of the column name exactly matches the name on the schema tab.
For my example, whilst last_updated ran fine initially, the lastvalue would only be updated if I named the column LAST_VALUE in both the query and the replacement variables.
0
Answers
-
Found the solution.
Even though the replacement variables work to replace the initial value irrespective of case, the lastvalue does not update unless the case of the column name exactly matches the name on the schema tab.
For my example, whilst last_updated ran fine initially, the lastvalue would only be updated if I named the column LAST_VALUE in both the query and the replacement variables.
0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 602 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 691 Beast Mode
- 43 App Studio
- 39 Variables
- 658 Automate
- 170 Apps
- 441 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 386 Distribute
- 111 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 112 Manage
- 109 Governance & Security
- 8 Domo University
- 30 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive