Developing and testing your first custom connection
You can develop a custom connection in your own project, as shown in this
example.
Create a new directory hello-world-conn-dev and file
hello-conn.py to contain your custom data connection files.
Implement your custom data connection in hello-conn.py.
(There must only be one class which implements
CustomConnection in this directory.)
"""Hello World Custom Connection Implementation"""
from cml.data_v1.customconnection import CustomConnection
class HelloWorld(CustomConnection):
""" Implementation of the interface function print_usage"""
def print_usage(self):
print(""" This is a %s connection"""% (self.app_name))
""" Implementation of custom function for hello connections"""
def hello_world(self):
print("These are the specified parameters" )
print (self.parameters)
Test your custom data connection locally (for more information see
Loading custom connections)