5

I just realized that the datatype of the PK column of my data extension should be of type Text instead of Number (otherwise I can not link it to the ContactId).

The data extension is rather big with about one hundred columns and already populated. I tried duplicating it to be able to remove the PK column and then re-uploading the data into it. But the column does not seem to go away simply by manually deleting it.

How can I change the type of the PK column without manually recreating the data extension?

2 Answers 2

8

Your best bet is to do a 'Create from Existing' and choose the current DE.

enter image description here

This will prefill the field editing section with the existing fields/data types/etc. from your origianl DE. enter image description here

You can then change your data type from number to text and then 'create'. From there you just import in the data into this new DE and you are good to go.

There really is no way to edit an existing DE's primary key, so recreating is the only way to do it.

1
  • 1
    Oh, thank you so much! You just saved me a lot of time. Commented Jun 11, 2019 at 14:13
6

It's kind of surprising that different parts of Marketing Cloud have a different way of doing things, so it will be important to follow the instructions mentioned here:

  1. Go to Email Studio > Subscribers > Data extensions
  2. You should see a list of data extensions with the left panel showing the folder tree (if not hidden) and the blue Create button in the top right corner
  3. In the window select Standard Data Extension and click OK. In the first step called Properties select Create from Existing in the Creation Method dropdown.
  4. Proceed to the 3rd step called Fields and configure the fields as you please (including changing the data type, primary keys and nullable settings).
1
  • 1
    Thank you for your answer! You are correct. I, however, just had to accept the answer posted earlier than you here. Commented Jun 11, 2019 at 14:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .