Greenplum madlib schema qualification error
search cancel

Greenplum madlib schema qualification error

book

Article ID: 296492

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

The madlib function weakly_connected_components returns a syntax error similar to the following:
select madlib.weakly_connected_components(
   'sch_finance.tab_id_vertex',
   'id',
   'sch_finance.tab_id_edge',
   'src=src,dest=dest',
   'sch_finance.tab_id_wcc' --- This is an output table.
); 

ERROR: plpy.SPIError: syntax error at or near "."(Where Traceback (most recent call last): 
PL/Python function "weakly_connected_components", line 21, in <module>
return wcc.wcc(**globals())
PL/Python function "weakly_connected_components", line 296, in wcc
PL/Python function "weakly_connected_components"; Position 87; "ALTER TABLE __madlib_temp_newupdate18934479_1579437424_56662348__ RENAME TO sch_finance.tab_id_wcc; File plpython.c; Line 5038; Routine PLy_elog; )


Environment

Product Version: 5.23

Resolution

This is caused by specifying the output_table parameter with a schema name. It is not possible to specify the schema name in the output_table parameter.

The parameter needs to be just the table name.

The schema will be determined by the search_path GUC.

See https://madlib.apache.org/docs/v1.16/group__grp__wcc.html for details on the function.