Comments (3)
I've found a way to reproduce this now:
- Create a new virtualenv and install
etlhelper
without any database drivers - Run the following:
from etlhelper import DbParams
db = DbParams(dbtype='ORACLE', host='localhost', port=1, dbname='test', user='test')
This will create db
, but also print the following:
The cxOracle drivers were not found. See setup guide for more information.
This message, and the psycopg2 one, are printed when you initialise a DbHelper
for a database when the drivers are not installed. DbParams does this because it uses a DbHelper to validate the params when it is created. We are seeing the message in internal BGS projects because we often import a big list of DbParams for internal databases, which includes Oracle and PostgreSQL instances.
from etlhelper.
I don't think that this is a bug - we do want to tell users how to install drivers if they are missing and we do want to all DbParams objects to be created in this case. However, we should replace the print
statement with either a warnings.warn
or a logger.warn
message.
from etlhelper.
I don't think it is a bug either but it is a glitch. I ran into it during one of the Linked Data projects, with a script that dumps an export from Oracle straight to stdout
, ended up installing psycopg2
in the CI pipeline even though i didn't need it, just in order to stop this warning message ending up in the output - it could go to stderr
instead ?
from etlhelper.
Related Issues (20)
- Add tuple_row_factory and list_row_factory
- Screen table and column names in `generate_insert_sql()` for SQL injection attempts
- Add transform option to load() and executemany()
- Replace cxOracle with python-oracledb HOT 1
- Add `skip_conflicts` option to `load` function HOT 6
- Character '%' cause an error HOT 5
- Clarify documentation re table structure differences between source and destination HOT 5
- Add warning to documentation that `load` assumes that all items have the same columns
- Add benchmark test HOT 1
- Add typehints HOT 3
- Create GitHub workflow for automated testing HOT 3
- Deprecate `dumprows`
- Set default row factory to `as_dict` HOT 4
- Deprecate `fetchmany` HOT 1
- Deprecate CHUNKSIZE constant HOT 1
- Tag Version 1 HOT 2
- Provide pyproject.toml for pip install HOT 6
- Add deprecation warning HOT 2
- Add "all" option for driver installation HOT 3
- Update docs and gh-pages workflow to run on `main` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from etlhelper.