Skip to main content
pretty-up link, add marketing-cloud tag
Source Link
Adam Spriggs
  • 31.1k
  • 6
  • 44
  • 88

I'm trying to write a SSJS script in Automation Studio. I want to retrieve column values from one DE, clear that table, and write that column data to another one. (Among other things.) In a prior step, a CSV is imported to a table (SampleDE1.)

Retrieve data:

var holdingTank = DataExtension.Init("SampleDE1");
var filter = {SortOrder:1};
var data = holdingTank.Rows.Retrieve(filter);

var column1val = data[0].column1;
var column2val = data[0].column2;

Clear table:

holdingTank.Rows.Remove(["column1", column1val]);

This is where I am at so far, but it's not working. No records are being removed, there are no errors, and the automation says it's a success. What's going on? There is no console or any way to debug this that I'm aware of.

I'm referring to this page:    http://help.marketingcloud.com/en/documentation/exacttarget/content/server_side_javascript/server_side_javascript_syntax_guide/core_library_server_side_javascript_functions/data_extension_server_side_javascript_functions/Data Extension Server-Side JavaScript Functions

If for some reason these functions aren't supported in automation scripts, this'll be the second major roadblock to my project success placed by SalesForce.

I'm trying to write a SSJS script in Automation Studio. I want to retrieve column values from one DE, clear that table, and write that column data to another one. (Among other things.) In a prior step, a CSV is imported to a table (SampleDE1.)

Retrieve data:

var holdingTank = DataExtension.Init("SampleDE1");
var filter = {SortOrder:1};
var data = holdingTank.Rows.Retrieve(filter);

var column1val = data[0].column1;
var column2val = data[0].column2;

Clear table:

holdingTank.Rows.Remove(["column1", column1val]);

This is where I am at so far, but it's not working. No records are being removed, there are no errors, and the automation says it's a success. What's going on? There is no console or any way to debug this that I'm aware of.

I'm referring to this page:  http://help.marketingcloud.com/en/documentation/exacttarget/content/server_side_javascript/server_side_javascript_syntax_guide/core_library_server_side_javascript_functions/data_extension_server_side_javascript_functions/

If for some reason these functions aren't supported in automation scripts, this'll be the second major roadblock to my project success placed by SalesForce.

I'm trying to write a SSJS script in Automation Studio. I want to retrieve column values from one DE, clear that table, and write that column data to another one. (Among other things.) In a prior step, a CSV is imported to a table (SampleDE1.)

Retrieve data:

var holdingTank = DataExtension.Init("SampleDE1");
var filter = {SortOrder:1};
var data = holdingTank.Rows.Retrieve(filter);

var column1val = data[0].column1;
var column2val = data[0].column2;

Clear table:

holdingTank.Rows.Remove(["column1", column1val]);

This is where I am at so far, but it's not working. No records are being removed, there are no errors, and the automation says it's a success. What's going on? There is no console or any way to debug this that I'm aware of.

I'm referring to this page:  Data Extension Server-Side JavaScript Functions

If for some reason these functions aren't supported in automation scripts, this'll be the second major roadblock to my project success placed by SalesForce.

Source Link
St.G
  • 160
  • 7

DE manipulation in Automation Studio

I'm trying to write a SSJS script in Automation Studio. I want to retrieve column values from one DE, clear that table, and write that column data to another one. (Among other things.) In a prior step, a CSV is imported to a table (SampleDE1.)

Retrieve data:

var holdingTank = DataExtension.Init("SampleDE1");
var filter = {SortOrder:1};
var data = holdingTank.Rows.Retrieve(filter);

var column1val = data[0].column1;
var column2val = data[0].column2;

Clear table:

holdingTank.Rows.Remove(["column1", column1val]);

This is where I am at so far, but it's not working. No records are being removed, there are no errors, and the automation says it's a success. What's going on? There is no console or any way to debug this that I'm aware of.

I'm referring to this page: http://help.marketingcloud.com/en/documentation/exacttarget/content/server_side_javascript/server_side_javascript_syntax_guide/core_library_server_side_javascript_functions/data_extension_server_side_javascript_functions/

If for some reason these functions aren't supported in automation scripts, this'll be the second major roadblock to my project success placed by SalesForce.