database_connections package
Subpackages
- database_connections.Connections package
- Submodules
- database_connections.Connections.athena module
- database_connections.Connections.databricks module
- database_connections.Connections.oracle module
- database_connections.Connections.redshift module
- database_connections.Connections.sqlite module
- database_connections.Connections.teradata module
- Module contents
Submodules
database_connections.DatabaseConnection module
- class database_connections.DatabaseConnection.DatabaseConnection(**kwargs)[source]
Bases:
ParentClass
extra keyword agrugments will be set according to each SQL service’s requirements This class should only be used as a parent class for other specific sql services
- print_imp_atts(**kwargs)[source]
Prints off (or returns a string) with the ‘important’ information about a class Most child classes will redefine this method with custom attributes to print off
- print_one_line_atts(**kwargs)[source]
Prints off (or returns a string) with information about a class in one line Most child classes will redefine this method with custom attributes to print off
database_connections.Query module
- class database_connections.Query.Query(string='', query_path='', export_path='', engine='sqlite', query_Path=None, export_Path=None, conn_inst=None, **connection_module_params)[source]
Bases:
ParentClass
A Python class for SQL Queries Query class is agnostic of engine
- print_imp_atts(print_off=True)[source]
Prints off (or returns a string) with the ‘important’ information about a class Most child classes will redefine this method with custom attributes to print off
- print_one_line_atts(print_off=True, leading_string='\t')[source]
Prints off (or returns a string) with information about a class in one line Most child classes will redefine this method with custom attributes to print off
database_connections.TJEncryptPassword module
- database_connections.TJEncryptPassword.createEncryptedPasswordFile(sTransformation, sAlgorithm, sMode, sPadding, sMatch, abyKey, sMac, abyMacKey, sEncPassFileName, sPassword)[source]
database_connections.password_encryption module
database_connections.sql_support_functions module
- database_connections.sql_support_functions.get_DatabaseConnection(connection_module='sqlite', **kwargs)[source]
returns a class object from the given SQL connection module
- database_connections.sql_support_functions.list_to_string(iterable, sep=',', quotes="'")[source]
Given a list [ ‘meter1’, ‘meter2’, ‘meter3’ ] spits out ‘1234’,’2345’,’3456’
- database_connections.sql_support_functions.run_queries_in_folder(queries_Dir, export_Dir, conn_inst, print_df: bool = True, export_type='csv', parquet_engine='fastparquet', file_endings=['sql'])[source]
Given a Dir of Queries, an Export Dir, and a database connection, run all queries as specified by the user