Using variables in Reader and Writer configuration?

More
12 years 10 months ago #7897 by ckelsoe
Ver 5.7.4.1

Is there a way to use variables in the reader and writer configuration?

I have a set of transformations (and packages) that need to use a different reader data source and writer data target for each conversion. I need to be able to run each transformation on it's own (outside of the package) to debug and test. The table names are all the same. Just the database / MySQL connection properties are different. I want to avoid having to go to each reader and writer to change this if possible.

I have reviewed the documentation on variables but do not see how to use them in this specific scenario.

Thanks

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #7898 by admin
You can use Global Variables for it

See pictures attached

Please be very careful with this option,
it is very easy to run transformation against wrong database

Mike

Mike
ETL Architect
Attachments:

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #22188 by Vassalli
Hi Mike,
I have several csv files that I have to load properly, after some transformations, in the right table of database.
I have saved in a database table all the data that I need: there it is the name of the table that I have the data loaded in.
Via lookup I get that name and via loop I would like to scroll everything but, when I execute the package I receive the error "[CUSTOMERDBFULLNAME] Nothing is Mapped".
Note that the variable CUSTOMERDBFULLNAME has the proper value.
Can you tell me if this is the right way to proceed or not? Do I have any other option to get rid of my project?
Thank you,
Pietro

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #22189 by Peter.Jonson
Please post some screenshots

Peter Jonson
ETL Developer

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #22190 by Vassalli
Hi Peter,
this is the package and the variables that hava the proper value after execution:

The result is that the properly valued CUSTOMERDBFULLNAME (7003_162_Plastifil) gives back the error that nothing is mapped:

If I go to the transformation, I have the error:

and, if I press ok:

The connection database is properly configured:

In the global variables I can't define anything coming from a SQL query so I can't understand where the problem is.
Thank you for your quick answer! :)

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #22192 by Peter.Jonson
We have found some issues with the writer object. I will let you know once new release is ready

Peter Jonson
ETL Developer

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save