We have a Tableau view name ‘sales_data’, using Tabcmd I export data to csv then modify some in CSV then this csv push back into database from where same tableau view reads data, its a live connection
I run following commands in linux server
# Set environment variables
export TABLEAU_PASSWORD="PASSWORD"
# Define log file
LOG_FILE="/scripts/logs/logfile.log"
# Function to log messages to the log file
log_message() {
echo "$(date +"%Y-%m-%d %T") $1" >> "$LOG_FILE"
}
# Log in to Tableau server
log_message "Logging in to Tableau server"
tabcmd login --server "https://report.sales.net" --site "home" --username "user" --password "$TABLEAU_PASSWORD" >> "$LOG_FILE" 2>&1
# Export data
log_message "Exporting data"
tabcmd export -t sales "Planning/sales_data" --csv -f "/scripts/Report.csv" >> "$LOG_FILE" 2>&1
wait
# Log out from Tableau server
log_message "Logging out from Tableau server"
tabcmd logout >> "$LOG_FILE" 2>&1
# End of script
log_message "Script execution completed"
Command runs fine in linux server but if I ran same command after pushing modified CSV into DB, it give me data before modification not the latest. It give latest data if ran after atleast 2 hours.
When I ran same command in CMD local it give latest data.
How can I get latest data after pushed into DB using tabcmd?