Question

SQL - Index columns

  • 28 July 2016
  • 3 replies
  • 17 views

Badge
Hello,

I'm using a workbench with a workspace runner. The workspace translates files into MS SQL tables. I would like to index some of the columns once all the files have been processed.

Can you please help?

Thanks, Moni


3 replies

Userlevel 4

You can use the SQLExecutor to create the indexes, e.g.:

CREATE INDEX index_name ON table_name (column_name)

If you want to make sure the SQLExecutor is executed last, use e.g. a FeatureHolder and then a Sampler (1st feature) before the SQLExecutor.

You could also put the SQLExecutor into a child workspace and have it called with another WorkspaceRunner from the master workspace.

Badge +9

@honkovam I second what david_r suggested to create the index like eg

CREATE INDEX index_name ON table_name (column_name)

but I usually put it into the navigator panel in the SQL Statement to execute after translation parameter if you wanted to cut down on having workspace runners

Badge +16

Or just use the FeatureWriter, that is if you are using FME 2016, and after it the SQLExecutor

Reply