hoverinc / tableau-utilities

A module and CLI Utility for managing Tableau objects, locally, and in Tableau Online.
MIT License
4 stars 1 forks source link

Fix airflow example for Airflow 2.0 #8

Closed jaybythebay closed 1 year ago

jaybythebay commented 2 years ago

@JustinGrilli Here are a couple of changes. I don't have the DAG working yet and I'm getting this error in Airflow UI:

Broken DAG: [/usr/local/airflow/dags/tableau/tableau_datasource_update.py] Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/airflow/models/baseoperator.py", line 188, in apply_defaults
    result = func(self, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/airflow/models/baseoperator.py", line 535, in __init__
    raise AirflowException(
airflow.exceptions.AirflowException: Invalid arguments were passed to TableauDatasourceTasks (task_id: add_tasks_salesforce_opportunity). Invalid arguments were:
**kwargs: {'snowflake_conn_id': 'snowflake_tableau_datasource', 'tableau_conn_id': 'tableau_default', 'datasource_name': 'Salesforce Opportunity', 'project': 'All', 'column_cfg': {'Salesforce Opportunity': {'Salesforce Account Id': {'description': 'The 18 

Once we figure that out I'll add any other changes here.

JustinGrilli commented 2 years ago

@jaybythebay Let me know when you are ready for review on this PR :)

As I recall from our last meeting, that there are some more changes you'd want to add here, to make it compatible with Airflow 2.0

jaybythebay commented 2 years ago

@JustinGrilli will do. Will those changes I made be ok for Airflow 1.0 or do we need to deal with versions?

JustinGrilli commented 2 years ago

The changes we went over together should be fine for 1.0. Even if it is not tho, I would prefer this example be as up-to-date with the latest Airflow as possible anyway. In-fact, if you want to add a comment to the top of this example saying something to the effect of:

Last tested and working Airflow version: 2.x.x

That might be good too 😄 Thanks! @jaybythebay

jaybythebay commented 2 years ago

@JustinGrilli This is ready to merge if it looks good to you.

jaybythebay commented 1 year ago

@JustinGrilli I'm closing this out. Sounds like you have things working on 2.0 an d any refactoring will use your new stuff.