Plugin Recipe Overwrite Output Schema not working

gblack686
Level 4
Plugin Recipe Overwrite Output Schema not working

In my plugin recipe i'm using the SQL Executor and passing overwrite_output_schema and I'm getting this error. 

Error in Python process: At line 512: <class 'Exception'>: Query failed: b'ERROR: column "index" is of type bigint but expression is of type character varying\n Hint: You will need to rewrite or cast the expression.'

I've also tried casting the column as varchar to no avail. 

Here is the index column

rank() over(partition by  customer_id, index_period order by date asc) as index

In the past I've resorted to going to the dataset schema and overriding the column there, but it only saved when changing the length not the type. 

 

0 Kudos
1 Reply
Liev
Dataiker Alumni

Hi @gblack686 

Please provide additional context to this question. For example:

- What is the schema on the output dataset?

- How your full query looks like (simplified version without confidential info)

- How the results are manipulated/stored into a Dataset

- The way that you write the index column should not retrieve a char type, so why is the column in the schema of this type?

Thank you!

0 Kudos