Replacement Variables in Amazon Athena Connector Queries
Hi,
I am new to Domo and struggling with Append mode updates in the Amazon Athena JDBC 2.0 Connector.
I have managed to get a base query running to pull data out of Athena correctly.
Now, I am trying to parameterise the query to Athena to only append a subset of rows which have been added since the last time the query ran.
My understanding is that I should be able to use a WHERE clause like:
WHERE date_parse(SUBSTRING(timestamp, 1, 19), '%Y-%m-%dT%H:%i:%s') > !{lastvalue:timestampasdatetime}!
which I am hoping would look in the last row of the data already in the table and find the timestampasdatetime column of that row and then use that value in the where clause of the next query to the same Athena table.
However, this does not seem to work. It looks like the !{lastvalue:timestampasdatetime}! is not being replaced with a proper value before being sent to Athena.
Can anyone advise how I can make this work?
Thanks in advance,
Richard.
Comments
-
Hi @rhardy ,
Here's some more info on the append method - you'd probably want upsert enabled for this connector to achieve what you're looking for, as it's available for the connector: https://knowledge.domo.com/Connect/Managing_DataSets/DataSet_Update_Methods
Here is documentation on the Amazon Athena connector - https://knowledge.domo.com/Connect/Connecting_to_Data_with_Connectors/Configuring_Each_Connector/Database_Connectors/Amazon_Athena%2F%2FAmazon_Athena_JDBC_2.0_Connector
I hope this helps!
0
Categories
- 10.5K All Categories
- 3 Connect
- 913 Connectors
- 250 Workbench
- 458 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 476 Datasets
- 183 Visualize
- 249 Beast Mode
- 2.1K Charting
- 11 Variables
- 16 Automate
- 354 APIs & Domo Developer
- 88 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 245 Distribute
- 62 Domo Everywhere
- 242 Scheduled Reports
- 20 Manage
- 41 Governance & Security
- 168 Product Ideas
- 1.2K Ideas Exchange
- 9 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive