Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #64133

Re: Process datafeed in one MySql table and output to another MySql table

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <jsf80238@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.009
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'insert': 0.05; 'output': 0.05; 'table.': 0.07; 'rows': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'real-time.': 0.16; 'temp': 0.16; 'select': 0.22; 'cc:addr:python.org': 0.22; 'exists': 0.24; 'cc:2**0': 0.24; 'source': 0.25; 'script': 0.25; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'feeds': 0.31; 'libraries': 0.31; 'another': 0.32; 'table': 0.34; 'received:google.com': 0.35; 'there': 0.35; 'in.': 0.36; 'processed': 0.36; 'subject:one': 0.36; 'useful': 0.36; 'project': 0.37; 'thank': 0.38; 'delete': 0.39; 'you.': 0.62; 'sample': 0.67; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=RBVIk3OfBHz5cPyFv3NuGjGH94DPSQYY99PNQ5zAfAQ=; b=lvRdtKNXu38TdGEXtkMV3iIOY2RbxW9ek/Ksbn+/Nf6GgFARnvUJVW2SJ1iJXgEtJZ 0hIRDA5uYe+gVTlD9QPvWUMhbWJaMs55YIk0UHHNnIdjtgsycXWgzJjU6zFUAXpk8+5l F2L89zStI726VgaJ0U2Fam3bqyYtnVnWIbXydl6QhitJ+us16UTiPVbKvuvHahBVBi4S CXfeHNmKJwiWssoA1HfpN6/3j6w6P/bAChk7B4HS7MB1cEz/Udpz4x6ENusx/FGQF3CC O+lhk3hufVAzB4CgXVscyANo4GWaVVfXpiYu3TECtp+7pdT6VEK+gXuXQ+kdO7ZN3aV2 ymWA==
MIME-Version 1.0
X-Received by 10.50.78.229 with SMTP id e5mr225560igx.49.1389925392147; Thu, 16 Jan 2014 18:23:12 -0800 (PST)
In-Reply-To <e78e38ba-ce13-49ec-b988-11002f22124d@googlegroups.com>
References <e78e38ba-ce13-49ec-b988-11002f22124d@googlegroups.com>
Date Thu, 16 Jan 2014 19:23:12 -0700
Subject Re: Process datafeed in one MySql table and output to another MySql table
From Jason Friedman <jsf80238@gmail.com>
Cc python-list <python-list@python.org>
Content-Type multipart/alternative; boundary=089e013c64a2436cb604f02139b0
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.5619.1389925394.18130.python-list@python.org> (permalink)
Lines 43
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1389925394 news.xs4all.nl 2950 [2001:888:2000:d::a6]:49802
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:64133

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

>
> I have a datafeed which is constantly sent to a MySql table. The table
> grows constantly as the data feeds in. I would like to write a python
> script which process the data in this table and output the processed data
> to another table in another MySql database in real-time.
>
> Which are the python libraries which are suitable for this purpose? Are
> there any useful sample code or project on the web that I can use as
> reference? Thank you.
>

Is there a reason you do not want to move these rows with a mysql command?
drop table if exists temp;
insert into temp select * from source where ...;
insert into target select * from temp;
delete from source where id in (select id from temp);

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Process datafeed in one MySql table and output to another MySql table Sam <lightaiyee@gmail.com> - 2014-01-16 17:03 -0800
  Re: Process datafeed in one MySql table and output to another MySql table Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-17 02:07 +0000
    Re: Process datafeed in one MySql table and output to another MySql table Sam <lightaiyee@gmail.com> - 2014-01-17 00:53 -0800
      Re: Process datafeed in one MySql table and output to another MySql table Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-17 09:23 +0000
  Re: Process datafeed in one MySql table and output to another MySql table Jason Friedman <jsf80238@gmail.com> - 2014-01-16 19:23 -0700

csiph-web