Hi,
What the cluster Advantages MonetDB, If a query in shard tables in a
cluster can not be ordered,
what the advantage of using a MonetDB cluster? besides the replication
in case of failure.
Att,
--
Luciano Sasso Vieira
Data Scientist & Solutions Architect
luciano(a)gsgroup.com.br <http://www.gsgroup.com.br> | tel: 17 3353-0833
| cel: 17 99706-9335
www.gsgroup.com.br <http://www.gsgroup.com.br>
---
Este email foi escaneado pelo Avast antivírus.
http://www.avast.com
Hi there,
I need a string tokenizer in MonetDB.
The problem I have is not with the function itself, but with the fact that
this is a 1 to N rows function.
Implementing this for a single string value is easy enough, using a table
function that takes a string a returns a table:
create function tokenize(s string)
returns table (token string)
external name tokenize;
select *
from tokenize("one two three");
That's fine.
The issue I'm having is with extending this to a column of strings.
Ideally, given a string column
one two three
four five six
seven eight
I'd like to get an output along these lines (simplistic representation
here):
one two three | one
one two three | two
one two three | three
four five six | four
four five six | five
four five six | six
seven eight | seven
seven eight | eight
I can sure code the c function and the mal wrapper to implement this, but I
can't see how to map it to SQL, given that table functions don't accept
identifiers as parameters.
Any idea? Any possible workaround?
Thanks, Roberto
Hi everyone,
I’m probably missing something, but it seems that I cannot select entries that are newer than a given timestamp.
Below are my attempts and the schema of the table. Any help would be greatly appreciated!
Regards,
Maarten
sql>SELECT completed FROM "reporting"."transactions" WHERE completed >= '2015-04-10 00:00:00.0000' ORDER BY completed DESC;
+-----------+
| completed |
+===========+
+-----------+
0 tuples (0.595ms)
sql>SELECT completed FROM "reporting"."transactions" WHERE completed >= CAST('2015-04-10 00:00:00.0000' AS TIMESTAMP) ORDER BY completed DESC;
+-----------+
| completed |
+===========+
+-----------+
0 tuples (0.328ms)
sql>SELECT completed FROM "reporting"."transactions" ORDER BY completed DESC LIMIT 10;
+----------------------------+
| completed |
+============================+
| 2015-04-10 11:50:22.051000 |
| 2015-04-10 10:55:50.039000 |
| 2015-04-09 09:41:13.023000 |
| 2015-04-09 09:39:09.079000 |
| 2015-04-09 09:35:56.085000 |
| 2015-04-08 12:55:13.007000 |
| 2015-04-08 12:37:07.002000 |
| 2015-04-08 12:28:22.000000 |
| 2015-04-08 12:25:25.052000 |
| 2015-04-07 21:59:59.099000 |
+----------------------------+
10 tuples (0.683ms)
sql>\d "reporting"."transactions"
CREATE TABLE "reporting"."transactions" (
"id" CHAR(36) NOT NULL,
"status" VARCHAR(25) NOT NULL,
"created" TIMESTAMP NOT NULL,
"completed" TIMESTAMP,
"currency" CHAR(3) NOT NULL,
"amount" BIGINT NOT NULL,
"balance" VARCHAR(25) NOT NULL,
"payment_method" VARCHAR(50) NOT NULL,
"fee_currency" CHAR(3),
"fee_amount" BIGINT,
"order_id" CHAR(36) NOT NULL,
"order_status" VARCHAR(25) NOT NULL,
"project_id" CHAR(36) NOT NULL,
"merchant_id" CHAR(36) NOT NULL,
CONSTRAINT "transactions_id_pkey" PRIMARY KEY ("id")
);
Hello,
Is there (or is there a plan for) efficient bulk load via JDBC? (I'm
currently running Oct2014 and JDBC 2.13)
I looked at: https://www.monetdb.org/book/export/html/340
As far as I understand, the most efficient way currently available in JDBC
is to use batches of inserts via prepared statements (with autocommit off).
Unfortunately this does not get even close to be fast enough.
The speed of a COPY INTO is what I am looking for. But, this is not
supported via JDBC. Is there a specific reason, or is it simply not
implemented?
I do know about the workaround of performing the COPY INTO via mapi
protocol (like in
http://dev.monetdb.org/hg/MonetDB/file/tip/java/example/SQLcopyinto.java).
This provides good speed indeed.
However, it is not transaction-safe. When I use this method, and some SQL
transaction happens to read (only read!) from the same tables at the same
time, then I often get data corruption: the COPY INTO seems to end well
(and the data gets actually in place), but new SQL queries on those tables
fail with a "BATproject: does not match always" GDK error (checking with
gdb I see that the right side of a fetchjoin has count 0).
Any idea?
I have a schema "test" with 2 tables. I want to create a trigger inside this schema bound to a table inside this schema.
sql>create trigger test.trigger1 after update on test.profiletab insert into test.triggerlog;
syntax error, unexpected '.', expecting WHILE in: "create trigger test.trigger1 after update on test."
Thank you.
How can I insert a row with default values only?
CREATE TABLE
test.tbl1
(
id bigint DEFAULT NEXT VALUE FOR "my_test_seq" NOT NULL,
instime DATE DEFAULT now() NOT NULL
);
Both
insert into test.triggerlog (id) VALUES (10000);
and
insert into test.triggerlog (instime) VALUES (now());
work.
Neither
insert into test.triggerlog (id, instime) VALUES (DEFAULT, DEFAULT);
nor
insert into test.triggerlog (id, instime) VALUES ();
work.
What is the correct statement?
Thank you.
Hi All,
In the recent week, I monitoring the monet's development commit logs.
>From that logs, I have found that "RDF support was removed".
But in the next log, some features under RDF was added.
I'm bit confused about this.
What is the state of RDF support in MonetDB?
Thanks,
-Aris
Hi,
1- On a single server, the query is executed in parallel?, Common
relational database also has this ability (SQL Server, PostgreSQL etc.)?
2- And in a cluster, the same query is distributed for cluster nodes ,
in MonetDB?
Att,
--
Luciano Sasso Vieira
Data Scientist & Solutions Architect
luciano(a)gsgroup.com.br <http://www.gsgroup.com.br> | tel: 17 3353-0833
| cel: 17 99706-9335
www.gsgroup.com.br <http://www.gsgroup.com.br>
---
Este email foi escaneado pelo Avast antivírus.
http://www.avast.com
Hi,
I wan to use "COPY INTO table from 'file'" SQL instruction with a user
rather than monetdb. This user needs the administrator rights. So far I
have done these using monetdb user as the login:
CREATE USER "mdb_user" WITH PASSWORD '"password"' NAME 'Test db user'
SCHEMA "sys";
CREATE ROLE "testdbadmin" WITH ADMIN CURRENT_USER;
GRANT "testdbadmin" TO "mdb_user" WITH ADMIN OPTION;
CREATE SCHEMA "testdb" AUTHORIZATION "mdb_user";
ALTER USER "mdb_user" SET SCHEMA "testdb";
I learnt this from MonetDB UserGuide tutorial and from MonetDB
authorisation documentation. However, I still cannot use 'mdb_user' for
COPY INTO from file command. What is missing? What does 'ADMIN OPTION'
do? How to make 'mdb_user' have the same right as monetdb?
At the moment, I'm using monetdb user directly. But, it would be a bit
nicer to have a different username. I'm working on a web service
connecting to 3 different databases: mysql, postgres and now monetdb.
They have a common username for the database connection. If I keep using
monetdb user, the commonality rule is broken. I have another to use
'mdb_user' via STDIN and piping, but exporting DOTMONETDBFILE as an
environment variable to make mclient login with out asking for password
is another complexity dimension.
Making mdb_user to have administrator rights like monetdb is the best
option for me if this is possible, and I hope this is possible.
Regards,
Puthick