cloudera / impyla

Python DB API 2.0 client for Impala and Hive (HiveServer2 protocol)
Apache License 2.0
727 stars 248 forks source link

In-memory database for testing #244

Open IamGianluca opened 7 years ago

IamGianluca commented 7 years ago

Hi,

Is there a way to set up a lightning-fast in-memory database for testing purposes using impyla? I'm writing some integration tests for my project, which is leveraging impyla. At the moment I'm using a test database, but that's probably not the best solution since the tests could fail due to connectivity issues between the instance were the test is run and the the dev Hadoop cluster.

I would like to create in the setUp method a small database with one or two tables containing some fake data. In this way I could test how the two components interact with each other. For instance make sure that I'm able to create or drop a table.

Many thanks, Gianluca

wesm commented 7 years ago

It would be great if you could set up a Dockerfile with an Impala instance for testing, that would help with this. There may be some floating around

IamGianluca commented 7 years ago

Hi Wes, good point. I'm going to move forward with the solution you're suggesting. Many thanks!