How to Pivot

UserBird
UserBird Dataiker, Alpha Tester Posts: 535 Dataiker

Hi all,

I'm new to DSS and trying to work around the pivot in prepare recipe.

Sample test case:

The first 2 tables show the sample input and output that I require. The third image shows the setting I've applied on my the pivot formula.

Real case scenario:

Multiple characteristic columns to pivot on e.g. Company, Company type, Company Location etc.

12 unique values in the "Month" column.

I've applied the pivot step by step on all the characteristic columns. On running the particular recipe I am getting a blank output. Also, only 4 out of the 12 unique values are visible in the column headers. Any clue as to what I'm doing wrong?

Would appreciate any help! Thanks in advance.

Answers

  • Clément_Stenac
    Clément_Stenac Dataiker, Dataiku DSS Core Designer, Registered Posts: 753 Dataiker
    Hi,

    The Pivot preparation processor is fairly limited and only works if the input data is already sorted *by the index column*, ie the Company in your case.

    We are going to add a more generalistic pivot recipe in the coming months. In the meantime, you'd have to do this using specific code, in Python or Spark for example.
Setup Info
    Tags
      Help me…