initial commit for the `meltano` cli

parents
*/__pycache__
*/config/environment.conf
*/config/dbconfig.py
*/config/mailcfg.py
*/data-integration/system/karaf/caches/*
*.log
*.pyc
*.DS_Store
*.idea
*.csv
tmp_log.txt
.env
.vscode/
gapi_keyfile.json
Copyright GitLab B.V.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
configparser = "*"
click = "*"
meltano-common = ">=0.2.0-dev"
[dev-packages]
"flake8" = "*"
"autopep8" = "*"
pytest = "*"
[requires]
python_version = "3.5"
This diff is collapsed.
import click
import importlib
import sys
import logging
from meltano.common.service import MeltanoService
from meltano.stream import MeltanoStream
service = MeltanoService()
print(service.auto_discover())
@click.group()
def root():
pass
@root.command()
@click.argument('extractor')
def extract(extractor):
schema = None
stream = MeltanoStream(sys.stdout.fileno(), schema=schema)
@root.command()
@click.argument('loader')
def load(loader):
# this should register the module
try:
importlib.import_module("meltano.load.{}".format(loader))
except ImportError as e:
logging.error("Cannot find the loader {0}, you might need to install it (meltano-load-{0})".format(loader))
exit(1)
schema = None
stream = MeltanoStream(sys.stdin.fileno(), schema=schema)
loader = service.create_loader("com.meltano.load.{}".format(loader), stream)
logging.info("Waiting for data...")
loader.receive()
logging.info("Integration complete.")
if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG)
root()
#!/usr/bin/env python
from distutils.core import setup
setup(name='meltano',
version='0.1.0-dev0',
description='Meltano data science framework.',
author='Meltano Team & Contributor',
author_email='meltano@gitlab.com',
url='https://gitlab.com/meltano/meltano',
packages=['meltano.submodule'],
install_requires=[
"meltano-common==0.2.0-dev",
"fire"
]
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment