airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Enhance Tableau Sensor Logs to Include Friendly Object Names

Open Atharv625 opened this issue 8 months ago • 1 comments

This PR introduces an improvement to the TableauHook by enhancing its logging functionality. It modifies the job status logging to include the object type (e.g., Workbook, Datasource) and object name (friendly name) along with the job's finish code. This modification makes it easier for users to identify which specific Tableau object a job is associated with, improving visibility and traceability, particularly in environments with many concurrent jobs.

The changes are primarily aimed at improving user experience and debugging efficiency, especially when handling multiple Tableau jobs of different types.

Changes: Enhanced Job Logging:

The job’s logs now show the type and name of the associated Tableau resource (e.g., Workbook, Datasource) alongside the job’s finish code and ID.

Example of previous log:

pgsql Copy Edit [2025-04-23, 17:24:23 UTC] {tableau.py:73} INFO - Current finishCode is SUCCESS (0) New log output with object type and name:

pgsql Copy Edit [2025-04-23, 17:24:23 UTC] {tableau.py:73} INFO - Current finishCode is SUCCESS (0) for Workbook 'Sales Report' Job Details Fetching:

Introduced a helper method get_job() that returns job details in a structured format, including resource type, object name, object ID, and finish code.

Job State Wait Function:

The wait_for_state() method waits until the job reaches the target state (e.g., SUCCESS, ERROR, CANCELED) and provides more informative logs during the process.

Closes: #49671

Atharv625 avatar Apr 26 '25 09:04 Atharv625

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 17 '25 00:06 github-actions[bot]