simple-ddl-parser icon indicating copy to clipboard operation
simple-ddl-parser copied to clipboard

Strange behavior in terminal output using snowflake-connector together with simple-ddl-parser

Open devxor opened this issue 3 years ago • 2 comments

Hi,

I don't know if this is a bug or what it is exactly. Perhaps it's more connected to snowflake-connector-python...

I have described everything on StackOverflow. Link below. Thought that you could also help me with this or at least some ideas to try out. Long sotry short - when using simple-ddl-parser together with snowflake-connector-python I'm starting to get a lot of "debug" information printed on the screen from connector... The DDL is successfuly parsed, but why all of this additional information? It seems to be connected with simple-ddl-parser somehow, because when I'm not using it I don't see anything strange printed out on the screen. All the details in the below link. StackOverflow link

Thx in advance! Perhaps somebody will have idea what is this about.

devxor avatar Sep 28 '22 09:09 devxor

It was answered on StackOverflow! It has to do with the logging level used in the simple-ddl-parser which is DEBUG per default. It could be changed like this:

import logging

DDLParser(ddl, log_level=logging.WARNING).run()

However, it seems there is no way to set the logging level using the parse_from_file. Is it right? Perhaps it could be an ask for a new feature? To add this possibility also to function parse_from_file?

devxor avatar Sep 28 '22 11:09 devxor

@devxor right, I will fix it in next release, thanks for reporting this issue

xnuinside avatar Sep 28 '22 16:09 xnuinside

@devxor very sorry, that it taken so much time - but I released new version with argument 'parser_settings' - described in changelog https://github.com/xnuinside/simple-ddl-parser/#changelog

if will be needed anything else - feel free to open new issues!

xnuinside avatar Oct 30 '22 20:10 xnuinside

Thank you! Indeed, I have found something else and will open a new issue :).

devxor avatar Oct 31 '22 15:10 devxor