verdict-project / verdict

Interactive-Speed Analytics: 200x Faster, 200x Fewer Cluster Resources, Approximate Query Processing
http://verdictdb.org
Apache License 2.0
248 stars 66 forks source link

Is it possible to create a scramble table from a table present in a different database? #364

Closed solangepaz closed 5 years ago

solangepaz commented 5 years ago

Is it possible to create a scramble table from a table present in a different database? I've tried this, but it does not work: verdictConn.createStatement (). execute ("create scramble customer_scramble2 select * from tpch.customer size 0.6");

solangepaz commented 5 years ago

Is this possible ?

pyongjoo commented 5 years ago

Sorry. I’m traveling. I will get back to you today.

On Wed, May 1, 2019 at 7:30 AM solangepaz notifications@github.com wrote:

Is this possible ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mozafari/verdictdb/issues/364#issuecomment-488270673, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKBQCWKJUAAAZUZBFMA7HDPTGENPANCNFSM4HI7HG4Q .

-- Yongjoo Park, Ph.D. Research Fellow Computer Science and Engineering University of Michigan 2260 Hayward St. Ann Arbor, MI 48109-2121 Office: 4957 Beyster Phone: (734) 707-9206 Website: yongjoopark.com

pyongjoo commented 5 years ago

@solangepaz It should just work as long as you specify the full schema names for both. For example

create scramble schema2.scramble_table
from schema1.original_table

@dongyoungy Can you double-check if my answer is correct?

dongyoungy commented 5 years ago

Yes, create scramble schema2.scramble_table from schema1.original_table should work.

@solangepaz Have you tried CREATE SCRAMBLE customer_scramble2 FROM tpch.customer SIZE 0.6 instead? You just have to specify a source "table" to create a scramble. Currently, we do not support SELECT statement as the source for a scramble.

solangepaz commented 5 years ago

Yes, I then tried this, but I just got it in schemas from the same database. What I wanted to do was: have in the MySQL database all the tables and in another database (eg SQLite) keep only the scramble tables. Something like: CREATE SCRAMBLE tpchMySQL.customer_scramble2 FROM tpchSQLITE.customer SIZE 0.6

pyongjoo commented 5 years ago

I see. In that case, the answer is no. We don't support cross-DBMS scramble creation.

solangepaz commented 5 years ago

OK thank you. Is it possible to implement?

pyongjoo commented 5 years ago

It is possible, but we don't have any concrete plan yet.

solangepaz commented 5 years ago

Can you tell me which classes to change? I can try to implement this.

pyongjoo commented 5 years ago

This line is where the "create table ... select ..." statement is generated/issued.

For cross-DBMS operations, I believe, one thing you can do is to change the operations to something that exports the data into an external file and then import it into another DBMS.

pyongjoo commented 5 years ago

Let me close this issue since we don't plan to support this in the near future.