In Tableau Prep I have an output table that I want to import into an Oracle database.
In that output table, there's a column (file_date) with a date value (ex.: '2021-01-01'). The date value is the same for all rows.
Output table:
I need to write a custom SQL query (in Tableau Prep) that checks if my Oracle table already has any rows where the date = '2021-01-01'. If so, all rows need to be deleted before I import the new data.
Table_1:
Something like:
DELETE FROM table_1 WHERE date_column = '2021-01-01';
After checking it will find that the 1st row has the date = '2021-01-01' and deletes that row.
Table_1 after:
As the date changes every time new files come up, manually entering the date in the query is not a possibility. Is there any way to use a value from my table in a custom SQL query?
I'm aware that Tableau Desktop allows for the creation of parameters, but that's not available in Tableau Prep.