Hello
Is there a way we could copy only the schema ( table name and related attribute ) no data into another database, SQL server, and Postgres, multiple table at once
Thanks
Hello
Is there a way we could copy only the schema ( table name and related attribute ) no data into another database, SQL server, and Postgres, multiple table at once
Thanks
Hi,
I have not tested but try by passing one feature with feature writer and truncate the table after feature writer.
This just a workaround.
Pratap
yes it is , but some tables are empty from the source
It's possible, but a bit convoluted. FME isn't schema based, it's feature based. This means that if there's no feature arriving at the output feature type, then nothing happens: no table creation, truncates, etc.
As @pratap suggests, it's possible to work around this by creating and writing dummy features which you delete in the end, e.g. using a shutdown SQL script or a second workspace.
yes it is , but some tables are empty from the source
It's possible, but a bit convoluted. FME isn't schema based, it's feature based. This means that if there's no feature arriving at the output feature type, then nothing happens: no table creation, truncates, etc.
As @pratap suggests, it's possible to work around this by creating and writing dummy features which you delete in the end, e.g. using a shutdown SQL script or a second workspace.
is ok for the table with features about the empty table how could add a fake feature if we cant read them, and we don't know those table in advance since we are reading Dynamic schema, and there is many tables there
is ok for the table with features about the empty table how could add a fake feature if we cant read them, and we don't know those table in advance since we are reading Dynamic schema, and there is many tables there
For reading the schemas, I would recommend using the FeatureReader, which will enable you to read both the schema and the features in one go (no need to use the separate schema reader).
For reading the schemas, I would recommend using the FeatureReader, which will enable you to read both the schema and the features in one go (no need to use the separate schema reader).
It's possible, but a bit convoluted. FME isn't schema based, it's feature based. This means that if there's no feature arriving at the output feature type, then nothing happens: no table creation, truncates, etc.
As @pratap suggests, it's possible to work around this by creating and writing dummy features which you delete in the end, e.g. using a shutdown SQL script or a second workspace.
the other option I tested is to use feature reader, but use the schema output then use list exploder to expose all the attributes not we are getting in one column the name of the table and the second one the name of the attribute , but how we could now pass that to the database in order to create the those table.
feature-reader-output.png
schema-extraction.png
the other option I tested is to use feature reader, but use the schema output then use list exploder to expose all the attributes not we are getting in one column the name of the table and the second one the name of the attribute , but how we could now pass that to the database in order to create the those table.
feature-reader-output.png
schema-extraction.png