SSIS Email Task Attachment Name from Variable - ssis-2012

I was wondering if I can parameterize the path and file name of an attachment file through SSIS Email Task.
Waiting for your kind response.
Thanks!

Never mind :)
I found the solution which is simply right click on the Email Task and from expressions you can find "Attachments" and from there you can set a variable.

Related

What is a seed file?

I have been given a task to upload a file and store it in a different location. And I need to return a seed file which should be used to retrieve the file again.
I'm done with all sorts of things but I can't get "what is a seed file and how can generate it and how can I retrieve the file later with that"
can someone help me with this?
Thanks for helping!
Not sure of your context, but seed is usually a file (or a template) that contains some default values to begin with.

Geocortex Workflow Designer Upload File

i was tring to create a workflow with geocortex workflow designer that upload a file in folder.
So to do that, i create a Form that make a file picker and it returns a IList of FileItem.
than i would take the base64 data and write a file, but it show me an error:
Geocortex.Forms.Client.FileItem.Friend Property FileDataBase64 As
String is not accessible in this context beacause it is 'Friend'
the scope of my variable its Flowchart and i can't understand why this error
this error is showned even if i try to access te variable inside the form activity even outside.
thank's every one
It is probably a security related issue.
Make sure that your target directory is writeable by Geocortex workflow. Do a very basic test.
Again do every steps of the process in isolation, in order to pin-point the source of the problem. Poliart.com

Process Task - Unzipping files is failing

I am using sql 2012 SSIS process task to unzip my files but I am getting the following error
[Execute Process Task] Error:
In Executing "C:\Windows\System32\compact.exe" "x F:\Imports\RenLearn\'Roseville City School District'.zip -oF:\Imports\RenLearn\Roseville City School District" at "",
The process exit code was "1" while the expected was "0".
The two paths above are created as variables along with the path to . Any suggestions and thanks ahead of time.
I had the exact same problem and I realised that I had copied the .exe file in the same folder as the .zip files because this resolved my problem in BIDS, but in Data Tools it seems like necessary to do that.. sounds little weird, but it worked for me so perhaps it will for you as well. :-)
If you have set the "Working directory" property, you need to remove it to make the task work.
Remove the space in zip file name as the Execute process fails if the file contains special characters. Instead of spaces, use "_" and try it. Even the same issue I got later was sorted out by this approach.

Ant task to get value of repeating XML element

I have the following requirement.
from Ant xmlproperty task. What happens when there is more than one tag with the same name?
it's clear how to repeat for each file.
My requirement is to iterate for each file and I would like to get the value of 'machine' element for corresponding file
eg:
<echo>${PREFIX.main.tagList.tag.file[file1]}</echo> // should return machine1
<echo>${PREFIX.main.tagList.tag.file[file2]}</echo> // should return machine2
An example would help, but I think I discovered this limitation in the xmlproperty task before. For performing complex processing of external files I would use an embedded groovy task, which just loves XML :-)
You haven't specified a sample input, so here's a similar example:
Parse HTML using with an Ant Script

SSIS - Execute task in foreach loop only once

I need some help with the following issue:
Inside a foreach loop, I have a Data Flow Task that reads each file from the collection folder. If it fails while proccesing a certain file, that file is copied to an error folder (using a file system task called "Copy Work to Error").
I would like to set up a Send Email Task that warns me if there were any files sent to the error folder during the package execution. I could easily add this task after the "Copy Work to Error" task, but if there are many files that fail the Data Flow Task, my inbox would get filled.
Instead, I would like the Send Mail Task only once (after the foreach loop completes) only if the "Copy Work to Error" task was executed at least once. Is there any way I could achieve that?
Thanks,
Ovidiu
Here's one way that I can think of:
Create an integer variable, #Total outside the ForEach container and set it to 0.
Create an integer variable, #PerIteration inside the ForEach container.
Add a Script Task as an event handler to the File System Task. This task should increment #Total by #PerIteration.
Add your SendMail task after the ForEach container. In the precedence constraint, set type to Expression, and specify the condition #Total > 0. This should ensure that your task is triggered only if the File System Task was executed in the loop at least once.
You could achieve this using just a boolean variable say IsError created outside the scope of the for each loop with default value as False. You can set this to True immediately after the success of Copy Work to Error task using an expression task(SSIS 2012) or an Execute SQL task. And finally your Send Mail task would be connected to the For Each loop with the precedence constraint set as the Expression - isError.
When the error happens, create a record in a table with the information you would like to include in the email - e.g.
1. File that failed with full path
2. the specific error
3. date/time
Then at the end of the package, send a consolidated email. This way, you have a central location to turn to in case you want to revisit the issue, or if the email is lost/not delivered.
If you need implementation help, please revert back.

Resources