Curious – when would one use Database Schema in an Xlate

Clovertech Forums Cloverleaf Curious – when would one use Database Schema in an Xlate

  • Creator
    Topic
  • #120856
    Jim Kosloskey
    Participant

      I am messing around with the DB protocol. I have everything working, the Schema tests in the Database Protocol tester; the protocol reads the data I want; and passes it through the engine.

      I know the data is presented to an Xlate as a VRL and I have that working fine.

      But I got curious as to what would happen if I selected ‘Database Schema’ as the Source for the Xlate. So, I did that, and it looked like everything was set up fine. Then I tested, pointing the testing tool to the DB and instead of getting the data from the Table indicated, I began to receive the schema data from the DB (SQLite).

      So, is this not supposed to work or are there specific situations where one would use the ‘Database Schema’ as Source to an Xlate?

      Not earth shattering, but curious.

      Thanks

      email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

    Viewing 3 reply threads
    • Author
      Replies
      • #120857
        Robert Kersemakers
        Participant

          We have only one DB connection with DB as destination. They were made by colleagues of mine, so no experience on my side.
          Surely you should be able to get certain record(s) from the database and use them as the inbound side of an Xlate.

          According to the documentation (!) you need to fiddle around in the Database Schema Configurator, under Configuration. Choose your Database Connection and then your DB Schema. On the bottom of the DB Schema Configurator are some buttons: ‘Add SQL Statement Schema’ seems to be the way to go for the Schema to be updated with values from the DB itself. Hopefully a simple SQL statement will do.

          Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

        • #120859
          Jim Kosloskey
          Participant

            Robert,

            Thanks. I have all that working so the thread actually references the DB correctly.

            What I got curious about was what would happen if I had an Xlate and selected the ‘Database’ as the Source configuration. I get to select the Table I want from the connection I set up (that works with a thread and the Database Protocol testing tool). In the Xlate, the columns of the indicated table show up and I can indeed reference them.

            However, when I then run that Xlate in the testing tool and point to the DB (SQLite) as the source, instead of getting the data table, it appears like it is picking up the actual schema information.

            Thus, is this a bug or is the Xlate not intended to actually use the Database Schema as a Source or Destination?

            Again, just curious and not interfering with any project.

            email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

          • #120861
            Robert Kersemakers
            Participant

              Ah, ok. Again: no experience with this, but it looks like the Xlate Testing Tool will/can not use data from the DB table. In order to show something useful it just shows the schema information.

              Maybe the ‘Routes’ testing will use the DB table? Or you will just need to test the interface by running it.

              Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

            • #120862
              Jim Kosloskey
              Participant

                I think you are correct in that this is not intended to function (that is specifying a ‘Database Schema’ as Source or Destination.

                But it seems to set things up properly until testing – like maybe there is an intent to have this work – or maybe there is a special case where it actually works in the engine but does not work in the Testing Tool.

                I have attached a document showing what I did.

                Again, there is no project I am working on that relies on this. I just noted that one could specify ‘Database Schema’ as a Source and wanted to see how that works (or does not apparently).

                Well, apparently my attachment is too big. If you are interested in what I did and saw, email me and I will send the file to you.

                • This reply was modified 1 year, 8 months ago by Jim Kosloskey. Reason: Attachment did not work

                email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

            Viewing 3 reply threads
            • You must be logged in to reply to this topic.