EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <2025 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <2025
<== Date ==> <== Thread ==>

Subject: RE: Using Streamdevice to run SQL Query ?
From: Freddie Akeroyd - STFC UKRI via Tech-talk <tech-talk at aps.anl.gov>
To: 'Zimoch Dirk' <dirk.zimoch at psi.ch>, Heinz Junkes <junkes at fhi-berlin.mpg.de>
Cc: EPICS Tech Talk <tech-talk at aps.anl.gov>
Date: Tue, 25 Mar 2025 12:37:48 +0000
Hi Heinz,

We've done this in python using pcaspy and the python mysql connector

Regards,

Freddie

> -----Original Message-----
> From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Zimoch Dirk
> via Tech-talk
> Sent: 25 March 2025 11:04
> To: Heinz Junkes <junkes at fhi-berlin.mpg.de>
> Cc: EPICS Tech Talk <tech-talk at aps.anl.gov>
> Subject: Re: Using Streamdevice to run SQL Query ?
> 
> Hello Heinz,
> 
> Does your sql database have a TCP socket to write the queries to? Maybe a
> web interface?
> If not, can you use for example ncat to pass queries from a TCP socket to stdin
> of a sql command line interface?
> 
> Once you have a TCP port that accepts sql queries, it should be possible to use
> it with StreamDevice.
> 
> 
> Dirk
> 
> > On 25 Mar 2025, at 07:24, Heinz Junkes via Tech-talk <tech-
> talk at aps.anl.gov> wrote:
> >
> > Good morning,
> > We are currently having an EPICS training week. A participant asked if
> > it is possible to create PVs that can make an SQL query against a mySQL
> database.
> > The measurement data is stored by a foreign system in a database.
> > The idea is to provide the values in the database as EPICS-PVs for
> caput/caget.
> > Has anyone done this before?
> >
> > Thanks Heinz
> >


Replies:
RE: Using Streamdevice to run SQL Query ? Freddie Akeroyd - STFC UKRI via Tech-talk
References:
Using Streamdevice to run SQL Query ? Heinz Junkes via Tech-talk
Re: Using Streamdevice to run SQL Query ? Zimoch Dirk via Tech-talk

Navigate by Date:
Prev: Re: Using Streamdevice to run SQL Query ? Zimoch Dirk via Tech-talk
Next: RE: Using Streamdevice to run SQL Query ? Freddie Akeroyd - STFC UKRI via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <2025
Navigate by Thread:
Prev: Re: Using Streamdevice to run SQL Query ? Zimoch Dirk via Tech-talk
Next: RE: Using Streamdevice to run SQL Query ? Freddie Akeroyd - STFC UKRI via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <2025
ANJ, 25 Mar 2025 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·