Skip to content

Commit

Permalink
#120 Added debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ahsimb committed Jun 24, 2024
1 parent 8fdfba8 commit d25b055
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
23 changes: 16 additions & 7 deletions exasol_sagemaker_extension/deployment/deploy_create_statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,24 @@ def create_and_run(cls,
to_print: bool = False,
develop: bool = False):
"""
Creates a database connection object based on the provided credentials
Creates an instance of the DeployCreateStatements passing the connection
object to it and calls its run method.
Creates a database connection object, either in an On-Prem or SaaS database,
based on the provided credentials. Creates an instance of the DeployCreateStatements
passing the connection object to it and calls its run method.
Parameters:
schema - schema where the scripts should be created
dsn - database address including the port
db_user - database username
db_password - the user password
schema - schema where the scripts should be created
dsn - On-Prem database address including the port
db_user - On-Prem database username
db_password - On-Prem database user password
saas_url - SaaS service url
saas_account_id - SaaS account id
saas_database_id - SaaS database id
saas_database_name - SaaS database name, to use in case the id is unknown
saas_token - SaaS Personal Access Token (PAT)
use_ssl_cert_validation - Use SSL server certificate validation
ssl_trusted_ca - Path to a file or directory with a CA bundle
ssl_client_certificate - Path to a file with the client SSL certificate
ssl_private_key - Path to a file with the client private key
to_print - if True the script creation SQL commands will be
printed rather than executed
develop - if True the scripts will be generated from scratch
Expand Down
10 changes: 10 additions & 0 deletions tests/ci_tests/utils/build_language_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ def upload_language_container(db_conn: pyexasol.ExaConnection,

container_path = build_language_container()
bucket_file_path = container_path.name

# debugging
print('\n<<<<<\n', 'container_path=', container_path, 'bucket_file_path=', bucket_file_path,
'exists=', container_path.exists(), '\n>>>>>\n')

deployer = LanguageContainerDeployer(pyexasol_connection=db_conn,
language_alias=LANGUAGE_ALIAS,
bucketfs_path=bucketfs_location)
Expand All @@ -59,6 +64,11 @@ def upload_language_container(db_conn: pyexasol.ExaConnection,
deployer.activate_container(bucket_file_path=bucket_file_path,
alter_type=LanguageActivationLevel.Session)

print('\n<<<<<\n', 'activation_command=',
deployer.generate_activation_command(bucket_file_path=bucket_file_path,
alter_type=LanguageActivationLevel.Session),
'\n>>>>>\n')

with temp_schema(db_conn) as schema:
wait_language_container(db_conn, LANGUAGE_ALIAS, schema)

Expand Down

0 comments on commit d25b055

Please sign in to comment.