telosystools

Open full view…

Model empty with postgresql

fbockelee
Fri, 14 Jul 2023 09:51:05 GMT

Hi all, I install Telosys 4 cli, and configure it to access a Postgresql database --- databases : # First DB identified by "aaa" - id: kairos name: Kairos Postgresql type: POSTGRESQL # JDBC connection url: jdbc:postgresql://192.168.1.127:5432/postgres driver: org.postgresql.Driver user: postgres password: ******** # Metadata parameters catalog: ! schema: kairosdev tableNamePattern: tableNameInclude: tableNameExclude: tableTypes: TABLE, VIEW # DB model creation dbModelName: # Telosys DSL model creation linksManyToOne: true linksOneToMany: false --- when i type "cdb kairos" i obtain --- Checking database 'kairos'... OK, connection test is successful. --- when i launch "nm kairos", the model is empty --- # Telosys model info title: My model title version: 1.0.0 description: --- it seems that telosys don't find tables in schema kairosdev if on the same debian than telosys, i run the postgresql client: --- psql -U postgres -h 192.168.1.127 --- i type --- select * from kairosdev.client; --- I have the correct table resultset (so there is at least one table an there is no rigths issue) What i am doing *wrong* ? If someone as any advice ........Thankssssss !!!! --- java -version openjdk version "11.0.18" 2023-01-17 OpenJDK Runtime Environment (build 11.0.18+10-post-Debian-1deb11u1) OpenJDK 64-Bit Server VM (build 11.0.18+10-post-Debian-1deb11u1, mixed mode, sharing) ---

Manuel Neto
Mon, 17 Jul 2023 13:08:14 GMT

Hello fbockelee. You can try configuring the following settings: >tableNamePattern: '%' >tableTypes: *TABLE*

fbockelee
Tue, 18 Jul 2023 06:46:50 GMT

Thx for your help, tried but same result my last config --- - id: kairos name: Kairos Postgresql type: POSTGRESQL # JDBC connection url: jdbc:postgresql://192.168.1.127:5432/postgres driver: org.postgresql.Driver user: postgres password: ******** # Metadata parameters catalog: ! schema: 'kairosdev' tableNamePattern: '%' tableNameInclude: '%' tableNameExclude: tableTypes: TABLE # DB model creation dbModelName: # Telosys DSL model creation linksManyToOne: true linksOneToMany: false --- note that i tried with same schema in MARIADB (and of course another db setup) and i have the same result. so it's not database dependant. I must miss a configuration

fbockelee
Tue, 18 Jul 2023 07:49:09 GMT

I look in stackOverflow the following posts : "Telosys not picking up schema from mySql DB using Xampp" using catalog instead schema : no changes (both postgrsql & mysql) removing db from url : no changes (mysql), crash with % , don't crash with '%' "Telosys says "0 tables found" --- schema: SCHEMA_NAME tableNamePattern: '%' --- don't work....

Manuel Neto
Tue, 18 Jul 2023 11:45:12 GMT

The `tableNameInclude` and `tableNameExclude` parameters expect a *regular expression*, so the correct configuration would be to leave it blank or define a regex that filters the names of your tables. For example, to include only tables that start with *tbl*: >tableNameInclude: *tbl.**

Manuel Neto
Tue, 18 Jul 2023 11:51:52 GMT

Another thing you could try is using > catalog: *postgres*

Manuel Neto
Tue, 18 Jul 2023 11:58:41 GMT

[Catalog-vs-schema](//muut.com/u/telosystools/s1/:telosystools:sIvy:catalogvsschema.png.jpg)

fbockelee
Tue, 18 Jul 2023 12:12:00 GMT

hi guy thx a lot but i find the solution due to my stupidity (and newbie to telosys 4, before i used plugin eclipse for telosys 3) the problem was "when i launch “nm kairos”, the model is empty" instead of *nm* *kairos* *kairos* which work.....perfectly (probably after solving also the tableNameInclude) Thanx for all !!!!! tested also on mysql, work too ..... i use *whip* on myself ....