Peter Peter
07/14/2020, 12:18 PM10:33:16 | Concurrency: 1 threads (target='dev')
10:33:16 |
10:33:16 | 1 of 4 START table model dbt_test.add_rid............................ [RUN]
10:33:28 | 1 of 4 OK created table model dbt_test.add_rid....................... [SELECT 161069 in 11.75s]
10:33:28 | 2 of 4 START table model dbt_test.union.............................. [RUN]
10:33:36 | 2 of 4 OK created table model dbt_test.union......................... [SELECT 159280 in 7.86s]
10:33:36 | 3 of 4 START table model dbt_test.union_join_test.................... [RUN]
* Deprecation Warning: The adapter function `adapter.get_columns_in_table` is
deprecated and will be removed in a future release of dbt. Please use
`adapter.get_columns_in_relation` instead.
Documentation for get_columns_in_relation can be found here:
   <https://docs.getdbt.com/docs/adapter>
10:33:36 | 3 of 4 ERROR creating table model dbt_test.union_join_test........... [ERROR in 0.22s]
10:33:36 | 4 of 4 START table model dbt_test.union_join......................... [RUN]
10:33:50 | 4 of 4 OK created table model dbt_test.union_join.................... [SELECT 159280 in 14.28s]
10:33:50 |
10:33:50 | Finished running 4 table models in 35.12s.
 
When I run from DbtShellTask for the same dbt workflow I get this message:
 
July 14th 2020 at 7:37:14am | prefect.DbtShellTask
ERROR lens
Command failed with exit code 1: Done. PASS=3 WARN=0 ERROR=1 SKIP=0 TOTAL=4
 
Trying to make it easier to track down the error. Is there anyway to include these full error messages?
 
Here is a sample of how I am doing this. I was hoping return_all would return all messages from dbt.
 
with Flow(name="dbt_flow") as flow:
   task = DbtShellTask(
       profile_name='default',
       environment='dev',
       dbt_kwargs={
               'type': 'postgres',
               'threads': 1,
               'host': 'IP',
               'port': 5433,
               'user': 'username',
               'pass': 'docker',
               'dbname': 'actualDbName',
               'schema': 'dbt_test'
       },
       overwrite_profiles=True,
       profiles_dir='Actual Path', return_all=True
   )(command='dbt run' )
 
flow.register()
 
Any help would be great.
 
Pjosh
07/14/2020, 12:33 PMpip install git+<https://github.com/PrefectHQ/prefect.git@shelltask_stderr>Peter Peter
07/14/2020, 1:02 PMjosh
07/14/2020, 1:05 PM