- Posts: 539
- Thank you received: 59
ReadFile Package Action
- bruce.gibbins
- Topic Author
- Offline
- Platinum Member
-
Less More
1 year 11 months ago #21120 by bruce.gibbins
ReadFile Package Action was created by bruce.gibbins
AETLE/P v6.3.7.17 x32 & x64
Hi,
Not sure if this would be on your feature radar but I had a requirement to utilise the content of a small single line trigger file to control the flow within a package. in my case I had an external application generate a single line csv file that included an AETL PackageID and a piece of text that would be stored in a Package Variable to be used downstream in the ETL.
I am using a Pascal Script Action to read the file and set variables. But it would have been really clean and transparent if I could have used a self-contained Action Object that could use a Full Path FileName probably supplied by a Package Variable (ie from a previous Action), Open The file read the file (assuming it is a CSV), based on a Line Number (like ReadLine()) and then split each value into its own Variables that we could nominate in the properties of the Action.
The presumption being that this is really a CSV Read Action Item with a limited scope to read a single line and carve out a set of variables that can be used later.
Just a thought
Cheers
Hi,
Not sure if this would be on your feature radar but I had a requirement to utilise the content of a small single line trigger file to control the flow within a package. in my case I had an external application generate a single line csv file that included an AETL PackageID and a piece of text that would be stored in a Package Variable to be used downstream in the ETL.
I am using a Pascal Script Action to read the file and set variables. But it would have been really clean and transparent if I could have used a self-contained Action Object that could use a Full Path FileName probably supplied by a Package Variable (ie from a previous Action), Open The file read the file (assuming it is a CSV), based on a Line Number (like ReadLine()) and then split each value into its own Variables that we could nominate in the properties of the Action.
The presumption being that this is really a CSV Read Action Item with a limited scope to read a single line and carve out a set of variables that can be used later.
Just a thought
Cheers
Please Log in or Create an account to join the conversation.
- Peter.Jonson
-
- Offline
- Platinum Member
-
1 year 11 months ago #21128 by Peter.Jonson
Peter Jonson
ETL Developer
Replied by Peter.Jonson on topic ReadFile Package Action
I think the better option is to extend set variable package action functionality
Peter Jonson
ETL Developer
Please Log in or Create an account to join the conversation.
- bruce.gibbins
- Topic Author
- Offline
- Platinum Member
-
Less More
- Posts: 539
- Thank you received: 59
1 year 11 months ago #21133 by bruce.gibbins
Replied by bruce.gibbins on topic ReadFile Package Action
Sounds good. So I assume that the set variable action will support getting its value from a text file of sorts?
Cheers
Cheers
Please Log in or Create an account to join the conversation.
1 year 11 months ago #21167 by admin
Mike
ETL Architect
Replied by admin on topic ReadFile Package Action
Mike
ETL Architect
The following user(s) said Thank You: bruce.gibbins
Please Log in or Create an account to join the conversation.
- bruce.gibbins
- Topic Author
- Offline
- Platinum Member
-
Less More
- Posts: 539
- Thank you received: 59
1 year 10 months ago - 1 year 10 months ago #21181 by bruce.gibbins
Replied by bruce.gibbins on topic ReadFile Package Action
Thanks this works really well except that I was hoping to be able to pass a variable in as the file name to read as in as the CSV . This is because I purposely write out our trigger file (that contains the variables) with a unique name each time to avoid clashes.
I can work around this in a number of ways but just thought it may be a good enhancement. I can see via the execution log that it uses the path portion of the VARIABLE I passed in as the CSV File Name but it doesn't use the Filename portion itself.
Sorry for being a pain. cheers
I can work around this in a number of ways but just thought it may be a good enhancement. I can see via the execution log that it uses the path portion of the VARIABLE I passed in as the CSV File Name but it doesn't use the Filename portion itself.
Sorry for being a pain. cheers
Last edit: 1 year 10 months ago by bruce.gibbins.
Please Log in or Create an account to join the conversation.
1 year 10 months ago #21182 by admin
Mike
ETL Architect
Replied by admin on topic ReadFile Package Action
Sorry, we missed that one, we will have a look at it.
Mike
ETL Architect
Please Log in or Create an account to join the conversation.