Please tell me how to use the case statement in a synapse data flow.

NishimuraChinatsu-9854 756 Reputation points
2022-12-21T10:33:03.35+00:00

I would like to reproduce the following CASE statement in a SYNAPSE data flow.

CASE
WHEN A = '00000000'
THEN NULL
ELSE TO_DATE(A, 'YYYYMMDD')
END AS "release_date"

I would like to know how to do it, whether it is a conditional branch of the data flow or a derived column.

Thank you in advance.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,385 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Subashri Vasudevan 11,231 Reputation points
    2022-12-21T15:46:26.163+00:00

    Hi @NishimuraChinatsu-9854

    You can use a derived column transformation, and use either iif() or case().

    Reference: MS
    Similar thread: Here
    Video Reference: yd511kgV78U

    Please let us know if it helps.

    Thanks

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.