2

Is there a way I can mass update Data Extension names? I have a ton of them which I need to rename. Can SSJS or any API call be used?

2

You can do it using the WSProxy

0
2

Yes, best done with SSJS and WSProxy Update. This example retrieves the DE Customer Keys then uses that to update the Name. I tested using a Cloudpage, but depending on the number of DEs you need to update, it may be better to use a Script Activity in Automation Studio.

<script runat="server">
    Platform.Load("core","1.1.5");
    var prox = new Script.Util.WSProxy();    

    var des = ['DEName0','DEName1','DEName2'];

    for (var i=0; i<des.length; i++) {
        var filter = {
            Property: "Name",
            SimpleOperator: "equals",
            Value: des[i]
        };
        // Retrieve DE Customer Keys
        var data = prox.retrieve("DataExtension", ["CustomerKey"], filter);
        Write("<br>DE key: " + data.Results[0].CustomerKey);
        var de = {
            CustomerKey: data.Results[0].CustomerKey,
            Name: 'NewDEName' + i
        };
        //Update DE Name
        var resp = prox.updateItem("DataExtension", de);
        Write("<br>Response: " + resp.Results[0].StatusMessage);
    }
</script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.