Skip to main content

In Oracle, you can assign a default tablespace to an owner (schema). We are moving all our spatial databases to PostGIS where a schema cannot have a default tablespace. Instead you have to specify the tablespace to use with the create table syntax.

With FME desktop, how can I specify what tablespace I want all these cloned tables to go into without first somehow creating empty tables myself and then appending to them?

Hi @hallkbrdz, are you writing multiple tables to one tablespace? Or are there multiple tablespaces that you're writing to?

Tia,

In Oracle we generally use one tablespace for each schema that holds a large number of tables, so yes. This helps keep a tablespace to a resonable size, and on Oracle it allowed us to backup/restore by tablespace if we wanted to clone data that way.

For PostGIS, I was just planning on mimicking the same layout.

 

Bryan

Table Qualifier is the field you are looking for.


Table Qualifier is the field you are looking for.

In the postgis FeatureWriter there are two ways to specify the schema.

 

 

Splitted:

 

Table Name: table_a

 

Table Qualifier: schema_a

 

 

Or one field:

 

Table Name: schema_a.table_a

 

Table Qualifier: {leave emtpy}

 

 

Because the FeatureReader sets the fme_feature_type to schema_a.table_a the none splitted variant can come in handy.

 

 

 


Table Qualifier is the field you are looking for.

Thanks, but setting the schema was not the question - setting the tablespace being used for the table creation is.

 

 


Tia,

In Oracle we generally use one tablespace for each schema that holds a large number of tables, so yes. This helps keep a tablespace to a resonable size, and on Oracle it allowed us to backup/restore by tablespace if we wanted to clone data that way.

For PostGIS, I was just planning on mimicking the same layout.

 

Bryan
Hi @hallkbrdz, you might be able to get away with using the SQLExecutor to do your inserts and provide the tablespace information there.

The answer (for all tables per worksheet) is to use the writer parameter "SQL to run before write" and then simply set the tablespace that will be used by default:

SET default_tablespace = xyz

Not ideal, but good enough for now.

Bryan


Reply