Documentation is missing

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Documentation is missing

Post by Marco Grawunder » Fri Sep 19, 2014 8:12 am

Merge just merges input streams ignoring the order of the elements, first comes first served. This operator should not be used, if order is relevant.

flp
Posts: 51
Joined: Tue Sep 02, 2014 12:54 am

Re: Documentation is missing

Post by flp » Mon Sep 22, 2014 1:47 am

How can I "merge" two input streams and order them by an attribute?

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Documentation is missing

Post by Marco Grawunder » Mon Sep 22, 2014 8:42 am

This is not possible with Odysseus, because (for most cases) the stream must be ordered regarding the time stamp. You can merge two streams and order them by time stamp (UNION).

jbmzh
Posts: 5
Joined: Mon Feb 23, 2015 1:26 pm

Re: Documentation is missing

Post by jbmzh » Mon Feb 23, 2015 4:37 pm

For the Database Feature there is no documentation on how to open a connection using preconfigured drivers with PQL.

Background: I'm trying to establish a connection to a postgres db and a direct connection always ends up in a NullPointer. The connection variable is null. So I want to try out opening the connection seperately before I write something to the db.
Not working direct connection query:
saveToDB = DATABASESINK({table='cameraeventdata', type='POSTGRESQL', db='mobi', user='user', password='password', host='127.0.0.1', port=5432}, DatabaseEventStream)

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Documentation is missing

Post by Marco Grawunder » Mon Feb 23, 2015 4:52 pm

You mean, you want to reuse a connection, created with PQL? This is not possible. Use CQL for this instead.

Remark: CQL and PQL can be mixed up in a Odysseus script file:

Code: Select all

#PARSER CQL
#DROPALLDATABASECONNECTIONS
#DROPALLSOURCES
#QUERY
CREATE DATABASE CONNECTION con1 AS mysql TO Test AT 127.0.0.1 : 3306 WITH USER
xxxx PASSWORD yyyy NO_LAZY_CONNECTION_CHECK

#PARSER PQL
out = := DATABASESINK({
                    tableschema=[
'varchar(128)', 'Integer', 'varchar(128)', 'Integer', 'varchar(128)', 'FLOAT', 'LONG', 'INTEGER' 
                    ],
                    batchsize=500,
                    BATCHTIMEOUT = 10000,
                    connection='con1',
                    table='Ruby',
                    drop='true'
                  },


jbmzh
Posts: 5
Joined: Mon Feb 23, 2015 1:26 pm

Re: Documentation is missing

Post by jbmzh » Mon Feb 23, 2015 5:35 pm

Thank you, the combination of cql and pql works fine. I created a bug report for the malfunctioning direct connection.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest