0

I have a Datapipeline where I'm using a Redshift SqlActivity that read from a Redshift table and write in another Redshift table. I would like to know if it is possible to reference the input and output field from the SqlActivity

e.g

INSERT INTO #{output1} (field1, field2)
SELECT field1, SUM(field2)
FROM #{input1}
GROUP BY field1;

Thanks

Guillaume Mercey
  • 391
  • 3
  • 14

1 Answers1

0

Yes you can. Your query will look like

INSERT INTO #{output.tableName} (field1, field2)
SELECT field1, SUM(field2)
FROM #{input.tableName}
GROUP BY field1;
Pang
  • 9,564
  • 146
  • 81
  • 122