We are trying to connect Ataccama with Python code. Could you please help us with what are the possible ways to connect with python, it would be really great if you can share us with any reference links or docs.
Thanks in advance.
We are trying to connect Ataccama with Python code. Could you please help us with what are the possible ways to connect with python, it would be really great if you can share us with any reference links or docs.
Thanks in advance.
Hi
welcome to the Community and thank you for your question!
You can send a post request from your Python script to Ataccama MMM using GraphQL. This example will list all the sources from the catalog:
import requests
session = requests.Session()
session.auth = (user, password)
query="""query {
sources(versionSelector: {draftVersion: true}) {
edges {
node {
gid
draftVersion {
name
description
}
}
}
}
}"""
r = session.post('https://one.local.ataccama.pro/graphql', json={'query': query})
print(r.status_code)
print(r.text)
This code is the most basic implementation using basic auth (free text as password). You might want have a look at this Library in Python where you can write your own.
In our answer, we are assuming that you are using Ataccama ONE Gen2.
Hope it helps.
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.