8 Replies Latest reply on Apr 19, 2018 4:23 PM by Marcos Vainer Loeff Branched to a new discussion.

    TSDB desde Perl

    epotencia

      Hola, buenas tardes puedo conectarme a una base de datos  TSDB y accederla desde Perl uitlizand JDBC?

        • Re: TSDB desde Perl
          Eugene Lee

          Hi XO,

           

          If the TSDB that you are talking about is the PI Data Archive, then yes, you can use the PI JDBC driver to access data from it.

           

          https://techsupport.osisoft.com/Products/Developer-Technologies/PI-JDBC-Driver/Overview

           

          If you are talking about other types of TSDB, then can you please specify its name?

            • Re: TSDB desde Perl
              epotencia

              Hi Eugene Lee, please, could you show me one example from perl conecction?

               

              Thanks a lot.

               

              Regards

              Xo

               

               

               

              De:     Eugene Lee <pisquare@osisoft.com>

              Para:   Xo M <xochitl.mora@cfe.gob.mx>

              Fecha:  10/04/2018 03:33

              Asunto: Re:  - Re: TSDB desde Perl

               

               

               

               

              PI Square

               

              Re: TSDB desde Perl

              reply from Eugene Lee in PI Developers Club - View the full discussion

               

              Hi XO,

               

              If the TSDB that you are talking about is the PI Data Archive, then yes,

              you can use the PI JDBC driver to access data from it.

               

              https://techsupport.osisoft.com/Products/Developer-Technologies/PI-JDBC-Driver/Overview

               

              If you are talking about other types of TSDB, then can you please specify

              its name?

               

               

              Reply to this message by replying to this email, or go to the message on

              PI Square

              Start a new discussion in PI Developers Club by email or at PI Square

              Following Re: TSDB desde Perl in these streams: Inbox

              This email was sent by PI Square because you are a registered user.

              You may unsubscribe instantly from PI Square, or adjust email frequency in

              your email preferences

                • Re: TSDB desde Perl
                  epotencia

                  Yes Eugene Lee, the TSDB is a PI Data Archive. Will I access the TSDB from Perl in Linux Cento7?

                  I had been read that the system requirements (Request Rejected) for PI Web API  are operating system is Windows and I had been use LInux Centos where, I had was done a conecction with PI JDBC driver to access data but, how will I a do a conecction from perl?

                   

                  In postgresql I did:

                      

                                                 DBI->connect("DBI:Pg:dbname=database;host=localhost", "userl", "", {'RaiseError' => 1});

                  Pg= Postgresql DB

                   

                  Then how can do the conection to TSDB from perl?

                   

                  Thanks a Lot.

                   

                  Regards

                  Xo

                    • Re: TSDB desde Perl
                      Eugene Lee

                      Hi XO,

                       

                      I would like to clear up some confusion that you have. PI Web API is installed on the server and not the client. Therefore, you can install it on the same machine as your PI Data Archive. You do not need to install anything on your client.

                      Following this, you can make REST calls to PI Web API.

                       

                      There are some examples using HTTP::Request that you can find here.

                      HTTP::Request - search.cpan.org

                • Re: TSDB desde Perl
                  Marcos Vainer Loeff

                  Hello Xo,

                   

                  I think Perl is compatible with PI JDBC since you can bring Java into Perl. Nevertheless, I am not sure if this is the best solution for you.

                   

                  Do you really need to use Perl? Can you use Java or Python instead?

                   

                  I think that PI Web API is a more interesting PI Developer Technology compared to PI JDBC. We have client libraries for Python and Java but not for Perl. This means that you have to write some code in order to make HTTP requests in Perl.

                   

                  PI Web API is compatible with Basic and Kerberos authentication. You also need to research if Perl is compatible with Kerberos or just Basic.

                   

                  It won't be the easiest task to write a program in Perl on top of PI Web API because we don't have many samples here in PI Square since the community doesn't use this technology much. Actually, this is the first question about Perl I received in years.

                   

                  Hope this helps!

                    • Re: TSDB desde Perl
                      epotencia

                      Hi Marcos Vainer Loeff:

                       

                      Xo: Ok,  I will use Java instead of Perl. But you told that Perl  is no

                      the best solution, why?

                      I had never use Java in Linux, I has been use Perl in Linux. But now it

                      will be the moment for use java. Will you send me somen references about

                      Java in Centos 7?,  because I'm a novice.

                      This is the first time I must access a TSDB, I has been using  Perl for

                      Web Applications. Will I contact to you for next questions?

                      Marcos: PI Web API is compatible with Basic and Kerberos authentication.

                      You also need to research if Perl is compatible with Kerberos?

                      Xo: Yes,  Perl is compatible with Kerberos

                      Marcos: It won't be the easiest task to write a program in Perl on top of

                      PI Web API because we don't have many samples here in PI Square since the

                      community doesn't use this technology much. Actually, this is the first

                      question about Perl I received in years.

                      Xo: For my, is the First Time my client request a Web API from TSDB.

                      Marcos: Hope this helps!

                      Xo:Yes, thanks a lot. Your answer will help me to take the better

                      solution.

                       

                       

                       

                       

                       

                       

                       

                      De:     Marcos Vainer Loeff <pisquare@osisoft.com>

                      Para:   Xo M <xochitl.mora@cfe.gob.mx>

                      Fecha:  19/04/2018 08:14

                      Asunto: Re:  - Re: TSDB desde Perl

                       

                       

                       

                       

                      PI Square

                       

                      Re: TSDB desde Perl

                      reply from Marcos Vainer Loeff in PI Developers Club - View the full

                      discussion

                       

                      Hello Xo,

                       

                      I think Perl is compatible with PI JDBC since you can bring Java into Perl

                      . Nevertheless, I am not sure if this is the best solution for you.

                       

                      Do you really need to use Perl? Can you use Java or Python instead?

                       

                      I think that PI Web API is a more interesting PI Developer Technology

                      compared to PI JDBC. We have client libraries for Python and Java but not

                      for Perl. This means that you have to write some code in order to make

                      HTTP requests in Perl.

                       

                      PI Web API is compatible with Basic and Kerberos authentication. You also

                      need to research if Perl is compatible with Kerberos or just Basic.

                       

                      It won't be the easiest task to write a program in Perl on top of PI Web

                      API because we don't have many samples here in PI Square since the

                      community doesn't use this technology much. Actually, this is the first

                      question about Perl I received in years.

                       

                      Hope this helps!

                       

                       

                      Reply to this message by replying to this email, or go to the message on

                      PI Square

                      Start a new discussion in PI Developers Club by email or at PI Square

                      Following Re: TSDB desde Perl in these streams: Inbox

                      This email was sent by PI Square because you are a registered user.

                      You may unsubscribe instantly from PI Square, or adjust email frequency in

                      your email preferences

                        • Re: TSDB desde Perl
                          gregor

                          Hello Xo,

                           

                          The reason why the current and earlier releases of PI JDBC don't work on CentOS is the dependency of the RDSAWrapper library on C++ runtime libraries. The problem is that these C++ libraries must exist in the version RDSAWrapper was compiled against. Additional problems are caused by different naming of C++ library packages being used with different Linux distributions.

                           

                          The PI SQL Development team has removed RDSAWrapper from the scope which has removed the dependency on C++ libraries. With other words, the upcoming PI JDBC Driver for Linux will support way more distributions because of more native JAVA implementation. Please check the details for the upcoming PI JDBC Driver at PI System Roadmap. I don't like to raise expectations but there are chances that the upcoming release will work on CentOS because I understand it is a Linux distribution based on Red Hat Enterprise. I recently had the opportunity to work with the new PI JDBC Driver on Raspbian.

                           

                          You asked how to use Java on CentOS. Developing in Java should be platform independent but assuming there is something specific to Java on CentOS, the Internet will have the answer. You can find sample code when you square for it. Definitely a good resource is Marcos' blog Announcing PI Web API client library for Java and Android.

                          • Re: TSDB desde Perl
                            Marcos Vainer Loeff

                            Hello Xo,

                             

                            I didn't say that Perl is not the best solution. I said that since we don't have a client library for Perl, the effort for you to write some code is higher when compared to Java, since there is a library for that.

                             

                            Please take a look at the GitHub repository for the Java library here:

                             

                            GitHub - osimloeff/PI-Web-API-Client-Java-Android: PI Web API Client library for Java and Android generated using the Sw…

                             

                            Please also watch the videos of the Programming with PI Web API workshop to get started using this product. The link is below:

                             

                            Programming in PI Web API

                             

                            Let me know how it goes!