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

Explicitly close connections? #19

Open
hansgru opened this issue May 26, 2015 · 5 comments
Open

Explicitly close connections? #19

hansgru opened this issue May 26, 2015 · 5 comments

Comments

@hansgru
Copy link

hansgru commented May 26, 2015

Is it possible to explicitly close DB connections?

There seems to be lazy-init="true" that helps when doing something else before the DB operations, but the same problem still remains after the DB operations :(.

Thank you.

@aadrian
Copy link

aadrian commented May 30, 2015

I haven't found a way to achieve this :(.

What you can do is to create another etl.xml file to execute based on certain conditions after the other one with the DB operations (in case it does not depend on query logic).

Of course, this is quite annoying since it does not allow to logically group operations, and the logic is moved from the etl.xml to the shell file starting Scriptella, and also reduces the scenarios where Scriptella can be used.

@mrdanpsmith
Copy link

Has any thought been given to allowing "include" to be a top level element so that you can include etl files, or creating a new element to allow including of sub etls? That way there would be a boundary around which Scriptella could automatically open / close declared connections.

I could give it a shot if anyone else thinks it's a good idea. I found the most confusing thing about Scriptella to be that there did not seem to be a way to break apart my ETL scripts into smaller (and more maintainable) chunks.

I did wind up breaking them apart anyway, but I'm using a wildcard in the launcher which does not typically have a guaranteed call order and therefore seems kinda code-smellish to me.

@trombosestrumpf
Copy link

For testing something I actually made some changes based on version 1.2 allowing closing connections early. Probably I will ask to merge my changes to the trunk, if there is interest in that. It is quite simple and does not break the concepts.

@trombosestrumpf
Copy link

@mrdanpsmith
Breaking ETL scripts into chunks could be problematic for the scope of ETL variables, and a lot of other referencing stuff i am afraid.

@mrdanpsmith
Copy link

@trombosestrumpf I no longer use this project, but scoping everything globally or heavy reliance on globally scoped variables is in general a bad practice and is one of the biggest categorical causes of software defects. I would assume if includes were added that you would add more / better scopes at the same time.

I don't remember much about it unfortunately as this thread was dormant for so long and I no longer remember any of the details.

It was useful when I was using it, but it was a former employer that was using it and I wouldn't be shocked to find that they too have moved on from it. But I could be wrong.

Cheers!

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

4 participants