exasol / pyexasol

Exasol Python driver with low overhead, fast HTTP transport and compression
MIT License
72 stars 39 forks source link

Mistake in documentation of import_from_iterable #83

Closed soridev closed 3 years ago

soridev commented 3 years ago

Hi,

There is an issue in the HTTPTRANSPORT documentation. For the usage of "import_fromiterable()" it shows the following example:

def my_generator():
    for i in range(5):
        yield (i, 'Bob', True, '2017-01-01')

C.import_from_iterable(my_generator, "users")

Executing this will throw an exception like: "object is not iterable". Reason for this is the missing round brackets for the generator.

The example should be:

def my_generator():
    for i in range(5):
        yield (i, 'Bob', True, '2017-01-01')

C.import_from_iterable(my_generator(), "users")

Thanks and best regards.

littleK0i commented 3 years ago

I'll fix it with the next update, thank you!

littleK0i commented 3 years ago

Done in https://github.com/exasol/pyexasol/commit/abae5213915fbd95b0bdf9e4c819d979fa45536a