Skip to main content
Solved

Creating virtual tables in SQLITE


Forum|alt.badge.img

Hello, I have the following problem writing SQLite files.

I have several use cases where I want to write SQLITE files. For my application, it is important that the virtual tables are also generated in the SQLITE file. If the table name is Table_A, there should also be a virtual table fdo_table_A.

I've created some workbench that worked. But I also have workbenchs in which the virtual tables are not created and I do not see the difference. Does anyone know the condition that these virtual tables are created?

Many Thanks David

Best answer by markatsafe

Just to summarize this discussion:

- FME does not create SQLite virtual tables with any of the various SQLite writers such SQLite, SpatiaLte (FDO), etc.

- FME can view / read the virtual tables (Data Inspector) but will not resolve any of the virtual links or behaviours

View original
Did this help you find an answer to your question?

3 replies

Forum|alt.badge.img+2
  • December 4, 2018

@rt_gis FME doesn't support the creation of virtual tables on the SQLite writers, either native SQLite or the SQLite Spatial (FDO). You can probably create the virtual fdo tables you need using a SQLExecutor. But as far as I can gather, the virtual tables are typically application specific so you'd really have to understand the schema that the application used to read virtual tables. The SQLite writer supports a template file(database), so that might be a possible solution.

If you could share with us an example of a SQLite database that has the virtual tables you need and also tell us something about the application that uses them then we might be able to help a little further.


Forum|alt.badge.img
  • Author
  • December 5, 2018

Hello, thank you for your answer. I have attached two sqlite files with different behavior.

Both were generated with FME 2018. The input data were shapefiles, xls-files and Oracle views.

In file A, the table of the same name with the prefix fdo_ is missing. In File B, this fdo table was automatically created without me consciously doing anything else in the Workbench.

I would like to use this data in a browser-based GIS via MapGuide Open Source. Our software based on this can better deal with queries on sqlite that point to the virtual tables.

sqlite.zip

 


Forum|alt.badge.img+2
  • Best Answer
  • December 6, 2018

Just to summarize this discussion:

- FME does not create SQLite virtual tables with any of the various SQLite writers such SQLite, SpatiaLte (FDO), etc.

- FME can view / read the virtual tables (Data Inspector) but will not resolve any of the virtual links or behaviours


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings