Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docstrings and examples for describe_server() #31

Open
ratchetwrench opened this issue Nov 7, 2019 · 4 comments
Open

Docstrings and examples for describe_server() #31

ratchetwrench opened this issue Nov 7, 2019 · 4 comments

Comments

@ratchetwrench
Copy link

I am unsure of what the signature for describe_server() is meaning what speaking of table_catalog. Is this something I define to use later within aeda?

I am trying to use with SQL Server on prem and within Azure. But I am unaware of any catalogs that may exist or what they may be named.

It would be great to have some docstrings explaining this or some examples of what it might mean for each item in the function signature.

@naiktanmai
Copy link

@ratchetwrench

But you will have to modify the string_connections

@darenasc
Copy link
Owner

hi @ratchetwrench apologies that I missed this issue.

describe_server() will pass a, defined by user parameter, with the name of the server or could be the IP, but is not used to connect to it, just for reference as metadata. It is part of the three elements that defines the database analyzed SERVER_NAME, TABLE_SCHEMA, TABLE_CATALOG from which SERVER_NAME is the only one defined by user, TABLE_SCHEMA, TABLE_CATALOG must be the same as in the source server.

For SQL Server database you can use pyodbc with a string connection that should look like:

mssql+pyodbc://<USER>:<PASSWORD>@<ODBC_NAME>

If you have created an ODBC connection is your local computer to the database; or

DRIVER={ODBC Driver 13 for SQL Server};SERVER=<SERVER_NAME_OR_ADDRESS>;DATABASE=<DATABASE_NAME>;UID=<USER>;PWD=<PASSWORD>

If you are working in a remote computer for example, and have installed the ODBC driver.

Unfortunately, the tool assumes you at least know the name of the database (catalog) and you have a valid connection to it.

Thank you for the feedback, I'll include more documentation within the next few weeks.

@darenasc
Copy link
Owner

Thanks for commenting @naiktanmai, you are correct, the metadata database needs to be created before sending the metadata.

@naiktanmai
Copy link

great approach though..looking to extend it for an application I am working on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants