简体   繁体   中英

Azure Data Factory DataFlow Error: Key partitioning does not allow computed columns

参数

源设置

优化

We have a generic dataflow that works for many tables, the schema is detected at runtime. We are trying to add a Partition Column for the Ingestion or Sink portion of the delta.

We are getting error: Azure Data Factory DataFlow Error: Key partitioning does not allow computed columns Job failed due to reason: at Source 'Ingestion'(Line 7/Col 0): Key partitioning does not allow computed columns

Can we pass the partition column as a parameter to a generic dataflow?

Can we pass the partition column as a parameter to a generic dataflow?

I tried your scenario and got similar error.

在此处输入图像描述

There is a limitation of key partition method is we cannot apply any calculation to the partition column while declaring it. Instead, this must be created in advanced, either using derived column or read in from source.

To resolve this, you can try following steps -

  • First, I created a pipeline parameter with datatype string and gave column name as value.在此处输入图像描述

  • Click on Dataflow >> Go to Parameter >> In value of parameter select Pipeline expression >> and pass the above created parameter.在此处输入图像描述

OUTPUT:

It is taking it as partition key column and partitioning data accordingly.在此处输入图像描述

Reference : How To Use Data Flow Partitions To Optimize Spark Performance In Data Factor

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM