Showing posts with label flat. Show all posts
Showing posts with label flat. Show all posts

Sunday, March 11, 2012

Custom Object in SSIS

I wrote a C# class that has a couple of methods that can be called to grab data out of a flat file and import it to a DB. This class was written for a web applicaiton originally. (class has many complex business rules in it)

Now I would like to use this same class in a SSIS package.

Is it possible in a script task to create a new object with my class and use it's methods?

In the end all I want SSIS to do is create my object, call a method in that object and be done.

If I was doing this in DTS, I would have to create an .Net EXE that used my class but I'm hoping to avoid that in SSIS.

Frenchy

The simplest way would be to use the class as-is, and just reference it from a Script Task, which gives you a VB.Net environment to create your class and call your methods as required. You can also leverage connections and variables for a more integrated and dynamic approach if required. You will need to place your assembly in a defined folder to get the Add Reference to work on VSA, the script environment used by SSIS - http://msdn2.microsoft.com/en-us/library/ms136007.aspx|||

I also need the same. My code is in C# and that could not be converted in VB.NET. Did you find any way to invoke C# class ? Please let me know also If you find any solution.

Thanks,

Pooja

|||

Pooja B wrote:

I also need the same. My code is in C# and that could not be converted in VB.NET. Did you find any way to invoke C# class ? Please let me know also If you find any solution.

Thanks,

Pooja

Darren answered this question already (above). Is anythig not clear?

-Jamie

|||

Thanks Jamie. No its clear but I am totally new to SSIS so dont have that much understanding. Can you send me some sample code that is accessing already existing classes in Script task.

Thank you so much...

Pooja

|||If you follow the steps in Darren's post (adding a reference to the .dll that holds your custom code), then you just create a new instance of the object and begin using it - just like you would in any .NET code.|||

For adding a reference to required dlls we need to make them strongly typed. I made them strongly typed and added them to ../windows/microsoft.net/framework/2.0.., then I am able to run my code sucessfully but could not access these dlls in SSIS package. When I add these dlls in GAC then I could access the dlls in SSIS packages but then my application starts giving errors as it gould not refer some of the dlls because of making it strongly named. Can you please suggest what could be the problem. I am using microsoft enterprise libraries in my code.

Thanks,

Pooja

|||This is really a question for a different forum - you might try one of the groups under .NET Development.|||

PLEASE help us to help you-

What application gives these errors?

What are the errors?

An existing application that referenced non-strong named assemblies should keep working fine, assuming you have left the old assemblies in place. It would however make senses to updae your code to use the new strong named version so that all code, SSIS and other applictions, share the same common assemblies.

|||

Thanks for your reply. I am able to fix that problem. In my appplication as I strongly named the assemblies, it was not able to find that in GAC so i need to change that in my app.config file.

I am new to SSIS, Can you please tell me how to specify configuration settings for SSIS. Like my cofiguration settings are like this.

<configuration>

<configSections>

<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, MSEntLib.Data, Version = 2.0.0.0, Culture = neutral, PublicKeyToken=1791fdccf49453e7" />

</configSections>

<connectionStrings>

<add

name="abc_Dev"

providerName="System.Data.SqlClient"

connectionString="Data Source=;Initial Catalog=;User ID=; Password=" />

<add

name="abc_Prod"

providerName="System.Data.SqlClient"

connectionString="Data Source=;Initial Catalog=;User ID=; Password=;" />

</connectionStrings>

<dataConfiguration defaultDatabase="abc_Dev"/>

</configuration>

Thanks,

Pooja

|||Take a look at "Package Configurations" in SQL Server Books Online.|||

I have a similar scenario - EntLib and SSIS. I'm afraid I haven't found a way to use the same configuration file - both SSIS and EntLib have their own ideas about file format.

What I do is to manage the EntLib configuration files in the usual way (as in your code example above); and for the SSIS packages I use XML package configurations. You can find out more about these at http://msdn2.microsoft.com/en-us/library/ms141682.aspx.

|||

I specified the database configuration like this but how to specify the configsections for EntLib in XML configuration secion.

<DTSConfiguration>
<Configuration
ConfiguredType="Property"
Path="\Package.Connections[ConnectionName].Properties[ConnectionString]"
ValueType="String">
<ConfiguredValue>

Data Source=[Server Name];

User ID=[user name];

Initial Catalog=[database name];

</ConfiguredValue>
</Configuration>

</DTSConfiguration>

Can you please show me the dtsconfig xml file that you used in your application.

Thanks,

Pooja

|||

SSIS configurations and Enterprise Library configurations are clearly not the same, SSIS has no concept of .Net configurations. You will never be able to get SSIS to use Ent Lib config sections.

The best you can ever do is get .Net code hosted in SSIS to use Ent Lib config. This is not the same as making SSIS use Ent Lib or it's config, this is using .Net code. This is important if you have managed code, that uses Ent Lib functions. As covered above, to use external (external to SSIS I mean) assemblies, you need to ensure they are in the GAC, a challenge for first time Ent Lib builds.

For the configuration, think about how any .Net config works, the host process is responsible for loading it. So if you write an assembly which calls Microsoft.Practices.EnterpriseLibrary.ExceptionHandling stuff, and you want the exceptionHandling\exceptionPolicies config stuff to be available, then you need to add that to the config file for the calling application. If you use this assembly in a Script Task, and execute your package through DTExec, then you need to create a DTExec.config file, with suitable entries.

Other hosts of interest will be DtsDebugHost.exe , DtsHost.exe, DtExecUI.exe

|||

I have done in the same way. I added the assemblies in GAC that are using Enterprise libraries and then I am refering those dlls in my SSIS package.

Now you are saying that for configuration I need to create a DTExec.Config file. I am not able to understand how i should define my configuration setttings in this config file.

What I did is as my configuration file is like this

<configuration>

<configSections>

<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, MSEntLib.Data, Version = 2.0.0.0, Culture = neutral, PublicKeyToken=1791fdccf49453e7" />

</configSections>

<connectionStrings>

<add name="abc" providerName="System.Data.SqlClient" connectionString="Data Source=[Server Name];Initial Catalog=[Database Name];User ID=; password=" />

</connectionStrings>

<dataConfiguration defaultDatabase="abc"/>

</configuration>

So I created one Connection manager named "abc" for that package and then in package configuration I made the configuration settings like

<DTSConfiguration

<Configuration ConfiguredType="Property" Path="\Package.Connections[abc].Properties[ConnectionString]" ValueType="String">

<ConfiguredValue>Data Source=[server name];User ID=;Initial Catalog=[database name];</ConfiguredValue>

</Configuration>

</DTSConfiguration>

I have config file named app.config in which i have added only configuration settings for EnLib like this

<configuration>

<configSections>

<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, MSEntLib.Data, Version = 2.0.0.0, Culture = neutral, PublicKeyToken=1791fdccf49453e7" />

</configSections>

<dataConfiguration defaultDatabase="abc"/>

</configuration>

then I executed it through dtExec like this

EXEC xp_cmdshell 'dtexec /conf "C:\App.Config" /f "C:\Package1.dtsx"'

On executing this I get the exception in code. This exception is coming because it is not able to access the data layer. If I comment the code in which it is accessing database then it work ok.

Please help me. Problem is in configuration file only.

Thanks,

Pooja

Custom Object in SSIS

I wrote a C# class that has a couple of methods that can be called to grab data out of a flat file and import it to a DB. This class was written for a web applicaiton originally. (class has many complex business rules in it)

Now I would like to use this same class in a SSIS package.

Is it possible in a script task to create a new object with my class and use it's methods?

In the end all I want SSIS to do is create my object, call a method in that object and be done.

If I was doing this in DTS, I would have to create an .Net EXE that used my class but I'm hoping to avoid that in SSIS.

Frenchy

The simplest way would be to use the class as-is, and just reference it from a Script Task, which gives you a VB.Net environment to create your class and call your methods as required. You can also leverage connections and variables for a more integrated and dynamic approach if required. You will need to place your assembly in a defined folder to get the Add Reference to work on VSA, the script environment used by SSIS - http://msdn2.microsoft.com/en-us/library/ms136007.aspx|||

I also need the same. My code is in C# and that could not be converted in VB.NET. Did you find any way to invoke C# class ? Please let me know also If you find any solution.

Thanks,

Pooja

|||

Pooja B wrote:

I also need the same. My code is in C# and that could not be converted in VB.NET. Did you find any way to invoke C# class ? Please let me know also If you find any solution.

Thanks,

Pooja

Darren answered this question already (above). Is anythig not clear?

-Jamie

|||

Thanks Jamie. No its clear but I am totally new to SSIS so dont have that much understanding. Can you send me some sample code that is accessing already existing classes in Script task.

Thank you so much...

Pooja

|||If you follow the steps in Darren's post (adding a reference to the .dll that holds your custom code), then you just create a new instance of the object and begin using it - just like you would in any .NET code.|||

For adding a reference to required dlls we need to make them strongly typed. I made them strongly typed and added them to ../windows/microsoft.net/framework/2.0.., then I am able to run my code sucessfully but could not access these dlls in SSIS package. When I add these dlls in GAC then I could access the dlls in SSIS packages but then my application starts giving errors as it gould not refer some of the dlls because of making it strongly named. Can you please suggest what could be the problem. I am using microsoft enterprise libraries in my code.

Thanks,

Pooja

|||This is really a question for a different forum - you might try one of the groups under .NET Development.|||

PLEASE help us to help you-

What application gives these errors?

What are the errors?

An existing application that referenced non-strong named assemblies should keep working fine, assuming you have left the old assemblies in place. It would however make senses to updae your code to use the new strong named version so that all code, SSIS and other applictions, share the same common assemblies.

|||

Thanks for your reply. I am able to fix that problem. In my appplication as I strongly named the assemblies, it was not able to find that in GAC so i need to change that in my app.config file.

I am new to SSIS, Can you please tell me how to specify configuration settings for SSIS. Like my cofiguration settings are like this.

<configuration>

<configSections>

<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, MSEntLib.Data, Version = 2.0.0.0, Culture = neutral, PublicKeyToken=1791fdccf49453e7" />

</configSections>

<connectionStrings>

<add

name="abc_Dev"

providerName="System.Data.SqlClient"

connectionString="Data Source=;Initial Catalog=;User ID=; Password=" />

<add

name="abc_Prod"

providerName="System.Data.SqlClient"

connectionString="Data Source=;Initial Catalog=;User ID=; Password=;" />

</connectionStrings>

<dataConfiguration defaultDatabase="abc_Dev"/>

</configuration>

Thanks,

Pooja

|||Take a look at "Package Configurations" in SQL Server Books Online.|||

I have a similar scenario - EntLib and SSIS. I'm afraid I haven't found a way to use the same configuration file - both SSIS and EntLib have their own ideas about file format.

What I do is to manage the EntLib configuration files in the usual way (as in your code example above); and for the SSIS packages I use XML package configurations. You can find out more about these at http://msdn2.microsoft.com/en-us/library/ms141682.aspx.

|||

I specified the database configuration like this but how to specify the configsections for EntLib in XML configuration secion.

<DTSConfiguration>
<Configuration
ConfiguredType="Property"
Path="\Package.Connections[ConnectionName].Properties[ConnectionString]"
ValueType="String">
<ConfiguredValue>

Data Source=[Server Name];

User ID=[user name];

Initial Catalog=[database name];

</ConfiguredValue>
</Configuration>

</DTSConfiguration>

Can you please show me the dtsconfig xml file that you used in your application.

Thanks,

Pooja

|||

SSIS configurations and Enterprise Library configurations are clearly not the same, SSIS has no concept of .Net configurations. You will never be able to get SSIS to use Ent Lib config sections.

The best you can ever do is get .Net code hosted in SSIS to use Ent Lib config. This is not the same as making SSIS use Ent Lib or it's config, this is using .Net code. This is important if you have managed code, that uses Ent Lib functions. As covered above, to use external (external to SSIS I mean) assemblies, you need to ensure they are in the GAC, a challenge for first time Ent Lib builds.

For the configuration, think about how any .Net config works, the host process is responsible for loading it. So if you write an assembly which calls Microsoft.Practices.EnterpriseLibrary.ExceptionHandling stuff, and you want the exceptionHandling\exceptionPolicies config stuff to be available, then you need to add that to the config file for the calling application. If you use this assembly in a Script Task, and execute your package through DTExec, then you need to create a DTExec.config file, with suitable entries.

Other hosts of interest will be DtsDebugHost.exe , DtsHost.exe, DtExecUI.exe

|||

I have done in the same way. I added the assemblies in GAC that are using Enterprise libraries and then I am refering those dlls in my SSIS package.

Now you are saying that for configuration I need to create a DTExec.Config file. I am not able to understand how i should define my configuration setttings in this config file.

What I did is as my configuration file is like this

<configuration>

<configSections>

<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, MSEntLib.Data, Version = 2.0.0.0, Culture = neutral, PublicKeyToken=1791fdccf49453e7" />

</configSections>

<connectionStrings>

<add name="abc" providerName="System.Data.SqlClient" connectionString="Data Source=[Server Name];Initial Catalog=[Database Name];User ID=; password=" />

</connectionStrings>

<dataConfiguration defaultDatabase="abc"/>

</configuration>

So I created one Connection manager named "abc" for that package and then in package configuration I made the configuration settings like

<DTSConfiguration

<Configuration ConfiguredType="Property" Path="\Package.Connections[abc].Properties[ConnectionString]" ValueType="String">

<ConfiguredValue>Data Source=[server name];User ID=;Initial Catalog=[database name];</ConfiguredValue>

</Configuration>

</DTSConfiguration>

I have config file named app.config in which i have added only configuration settings for EnLib like this

<configuration>

<configSections>

<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, MSEntLib.Data, Version = 2.0.0.0, Culture = neutral, PublicKeyToken=1791fdccf49453e7" />

</configSections>

<dataConfiguration defaultDatabase="abc"/>

</configuration>

then I executed it through dtExec like this

EXEC xp_cmdshell 'dtexec /conf "C:\App.Config" /f "C:\Package1.dtsx"'

On executing this I get the exception in code. This exception is coming because it is not able to access the data layer. If I comment the code in which it is accessing database then it work ok.

Please help me. Problem is in configuration file only.

Thanks,

Pooja

Custom Object in SSIS

I wrote a C# class that has a couple of methods that can be called to grab data out of a flat file and import it to a DB. This class was written for a web applicaiton originally. (class has many complex business rules in it)

Now I would like to use this same class in a SSIS package.

Is it possible in a script task to create a new object with my class and use it's methods?

In the end all I want SSIS to do is create my object, call a method in that object and be done.

If I was doing this in DTS, I would have to create an .Net EXE that used my class but I'm hoping to avoid that in SSIS.

Frenchy

The simplest way would be to use the class as-is, and just reference it from a Script Task, which gives you a VB.Net environment to create your class and call your methods as required. You can also leverage connections and variables for a more integrated and dynamic approach if required. You will need to place your assembly in a defined folder to get the Add Reference to work on VSA, the script environment used by SSIS - http://msdn2.microsoft.com/en-us/library/ms136007.aspx|||

I also need the same. My code is in C# and that could not be converted in VB.NET. Did you find any way to invoke C# class ? Please let me know also If you find any solution.

Thanks,

Pooja

|||

Pooja B wrote:

I also need the same. My code is in C# and that could not be converted in VB.NET. Did you find any way to invoke C# class ? Please let me know also If you find any solution.

Thanks,

Pooja

Darren answered this question already (above). Is anythig not clear?

-Jamie

|||

Thanks Jamie. No its clear but I am totally new to SSIS so dont have that much understanding. Can you send me some sample code that is accessing already existing classes in Script task.

Thank you so much...

Pooja

|||If you follow the steps in Darren's post (adding a reference to the .dll that holds your custom code), then you just create a new instance of the object and begin using it - just like you would in any .NET code.|||

For adding a reference to required dlls we need to make them strongly typed. I made them strongly typed and added them to ../windows/microsoft.net/framework/2.0.., then I am able to run my code sucessfully but could not access these dlls in SSIS package. When I add these dlls in GAC then I could access the dlls in SSIS packages but then my application starts giving errors as it gould not refer some of the dlls because of making it strongly named. Can you please suggest what could be the problem. I am using microsoft enterprise libraries in my code.

Thanks,

Pooja

|||This is really a question for a different forum - you might try one of the groups under .NET Development.|||

PLEASE help us to help you-

What application gives these errors?

What are the errors?

An existing application that referenced non-strong named assemblies should keep working fine, assuming you have left the old assemblies in place. It would however make senses to updae your code to use the new strong named version so that all code, SSIS and other applictions, share the same common assemblies.

|||

Thanks for your reply. I am able to fix that problem. In my appplication as I strongly named the assemblies, it was not able to find that in GAC so i need to change that in my app.config file.

I am new to SSIS, Can you please tell me how to specify configuration settings for SSIS. Like my cofiguration settings are like this.

<configuration>

<configSections>

<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, MSEntLib.Data, Version = 2.0.0.0, Culture = neutral, PublicKeyToken=1791fdccf49453e7" />

</configSections>

<connectionStrings>

<add

name="abc_Dev"

providerName="System.Data.SqlClient"

connectionString="Data Source=;Initial Catalog=;User ID=; Password=" />

<add

name="abc_Prod"

providerName="System.Data.SqlClient"

connectionString="Data Source=;Initial Catalog=;User ID=; Password=;" />

</connectionStrings>

<dataConfiguration defaultDatabase="abc_Dev"/>

</configuration>

Thanks,

Pooja

|||Take a look at "Package Configurations" in SQL Server Books Online.|||

I have a similar scenario - EntLib and SSIS. I'm afraid I haven't found a way to use the same configuration file - both SSIS and EntLib have their own ideas about file format.

What I do is to manage the EntLib configuration files in the usual way (as in your code example above); and for the SSIS packages I use XML package configurations. You can find out more about these at http://msdn2.microsoft.com/en-us/library/ms141682.aspx.

|||

I specified the database configuration like this but how to specify the configsections for EntLib in XML configuration secion.

<DTSConfiguration>
<Configuration
ConfiguredType="Property"
Path="\Package.Connections[ConnectionName].Properties[ConnectionString]"
ValueType="String">
<ConfiguredValue>

Data Source=[Server Name];

User ID=[user name];

Initial Catalog=[database name];

</ConfiguredValue>
</Configuration>

</DTSConfiguration>

Can you please show me the dtsconfig xml file that you used in your application.

Thanks,

Pooja

|||

SSIS configurations and Enterprise Library configurations are clearly not the same, SSIS has no concept of .Net configurations. You will never be able to get SSIS to use Ent Lib config sections.

The best you can ever do is get .Net code hosted in SSIS to use Ent Lib config. This is not the same as making SSIS use Ent Lib or it's config, this is using .Net code. This is important if you have managed code, that uses Ent Lib functions. As covered above, to use external (external to SSIS I mean) assemblies, you need to ensure they are in the GAC, a challenge for first time Ent Lib builds.

For the configuration, think about how any .Net config works, the host process is responsible for loading it. So if you write an assembly which calls Microsoft.Practices.EnterpriseLibrary.ExceptionHandling stuff, and you want the exceptionHandling\exceptionPolicies config stuff to be available, then you need to add that to the config file for the calling application. If you use this assembly in a Script Task, and execute your package through DTExec, then you need to create a DTExec.config file, with suitable entries.

Other hosts of interest will be DtsDebugHost.exe , DtsHost.exe, DtExecUI.exe

|||

I have done in the same way. I added the assemblies in GAC that are using Enterprise libraries and then I am refering those dlls in my SSIS package.

Now you are saying that for configuration I need to create a DTExec.Config file. I am not able to understand how i should define my configuration setttings in this config file.

What I did is as my configuration file is like this

<configuration>

<configSections>

<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, MSEntLib.Data, Version = 2.0.0.0, Culture = neutral, PublicKeyToken=1791fdccf49453e7" />

</configSections>

<connectionStrings>

<add name="abc" providerName="System.Data.SqlClient" connectionString="Data Source=[Server Name];Initial Catalog=[Database Name];User ID=; password=" />

</connectionStrings>

<dataConfiguration defaultDatabase="abc"/>

</configuration>

So I created one Connection manager named "abc" for that package and then in package configuration I made the configuration settings like

<DTSConfiguration

<Configuration ConfiguredType="Property" Path="\Package.Connections[abc].Properties[ConnectionString]" ValueType="String">

<ConfiguredValue>Data Source=[server name];User ID=;Initial Catalog=[database name];</ConfiguredValue>

</Configuration>

</DTSConfiguration>

I have config file named app.config in which i have added only configuration settings for EnLib like this

<configuration>

<configSections>

<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, MSEntLib.Data, Version = 2.0.0.0, Culture = neutral, PublicKeyToken=1791fdccf49453e7" />

</configSections>

<dataConfiguration defaultDatabase="abc"/>

</configuration>

then I executed it through dtExec like this

EXEC xp_cmdshell 'dtexec /conf "C:\App.Config" /f "C:\Package1.dtsx"'

On executing this I get the exception in code. This exception is coming because it is not able to access the data layer. If I comment the code in which it is accessing database then it work ok.

Please help me. Problem is in configuration file only.

Thanks,

Pooja

Thursday, March 8, 2012

Custom Join!

Hi All, I have a sample Flat File, need to get a custom record layout out of it

Sample FlatFile Input:

============

RecordA.....

RecordB.....

OwnerAB.....

RecordC.....

RecordD.....

OwnerCD.....

......

Custom Output:

============

OwnerAB RecordA ............RecordB.....

OwberCD RecordC ..........RecordD..............

............

TIA

How is this different from your "challenge question" posted earlier?

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1767071&SiteID=1

Let's keep the topics together.

custom flat file for log transactions

Hi,
I am new at reporting services and need help creating a flat file that
will contain transaction logs like userid, amount, date and a comment
line.
I do not want the full report history since that would take a lot of
space on the server.
Is there such a way to create a flat file with plain text
characters(maybe csv or just spaces...) with only the information I
want to provide and to the folder/file I specify?
Thanks.
BTW, this is also my first posting ever.If the data is already in a database table, you should be able to create a
dataset against it, pull the data (i.e., only the columns and rows you want)
into a report table, publish the report, and export it to CSV. Check BOL for
samples and walkthroughs:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSAMPLES/htm/rss_overview_v1_631v.asp?frame=true.
There's also a How To section in BOL:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RShowto/htm/hrs_designer_v1_4bhu.asp?frame=true.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"A Gutie" <fiututor@.yahoo.com> wrote in message
news:eca873f7.0408030527.27d8e376@.posting.google.com...
> Hi,
> I am new at reporting services and need help creating a flat file that
> will contain transaction logs like userid, amount, date and a comment
> line.
> I do not want the full report history since that would take a lot of
> space on the server.
> Is there such a way to create a flat file with plain text
> characters(maybe csv or just spaces...) with only the information I
> want to provide and to the folder/file I specify?
> Thanks.
> BTW, this is also my first posting ever.|||Hi Ravi,
This report does not use any tables but only textboxes that are
populated from different datasets. All is working fine.
EXCEPT: I need to create a text file(could be csv or just plain text
separated by blanks...) that will get appended information to it. It
will contain a few fields from the report. This process MUST be made
automatically without having the user click on the 'export' link. In
other words, like behind the scenes event when clicking on the 'view
report' button.
What I have done is to create a dataset that has an insert but this is
adding the fields to a table I created for testing. If I could just
make the 'insert' send the output to a text file instead of a table
will do all I need.
if you know how, please let me know. I have not had any luck sending
the output to a file from an insert - have not found any documentation
on it but just DTS code that will not suffice.
I apologize for not giving specific details.
Thanks again.
"Ravi Mumulla \(Microsoft\)" <ravimu@.online.microsoft.com> wrote in message news:<OqoCEoXeEHA.1644@.tk2msftngp13.phx.gbl>...
> If the data is already in a database table, you should be able to create a
> dataset against it, pull the data (i.e., only the columns and rows you want)
> into a report table, publish the report, and export it to CSV. Check BOL for
> samples and walkthroughs:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSAMPLES/htm/rss_overview_v1_631v.asp?frame=true.
> There's also a How To section in BOL:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RShowto/htm/hrs_designer_v1_4bhu.asp?frame=true.
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "A Gutie" <fiututor@.yahoo.com> wrote in message
> news:eca873f7.0408030527.27d8e376@.posting.google.com...
> > Hi,
> > I am new at reporting services and need help creating a flat file that
> > will contain transaction logs like userid, amount, date and a comment
> > line.
> > I do not want the full report history since that would take a lot of
> > space on the server.
> > Is there such a way to create a flat file with plain text
> > characters(maybe csv or just spaces...) with only the information I
> > want to provide and to the folder/file I specify?
> > Thanks.
> > BTW, this is also my first posting ever.|||Sounds like execution log will give you what you're looking for. Take a look
at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsadmin/htm/arp_rslogfiles_v1_88gy.asp?frame=true.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"A Gutie" <fiututor@.yahoo.com> wrote in message
news:eca873f7.0408040544.744a044@.posting.google.com...
> Hi Ravi,
> This report does not use any tables but only textboxes that are
> populated from different datasets. All is working fine.
> EXCEPT: I need to create a text file(could be csv or just plain text
> separated by blanks...) that will get appended information to it. It
> will contain a few fields from the report. This process MUST be made
> automatically without having the user click on the 'export' link. In
> other words, like behind the scenes event when clicking on the 'view
> report' button.
> What I have done is to create a dataset that has an insert but this is
> adding the fields to a table I created for testing. If I could just
> make the 'insert' send the output to a text file instead of a table
> will do all I need.
> if you know how, please let me know. I have not had any luck sending
> the output to a file from an insert - have not found any documentation
> on it but just DTS code that will not suffice.
> I apologize for not giving specific details.
> Thanks again.
> "Ravi Mumulla \(Microsoft\)" <ravimu@.online.microsoft.com> wrote in
message news:<OqoCEoXeEHA.1644@.tk2msftngp13.phx.gbl>...
> > If the data is already in a database table, you should be able to create
a
> > dataset against it, pull the data (i.e., only the columns and rows you
want)
> > into a report table, publish the report, and export it to CSV. Check BOL
for
> > samples and walkthroughs:
> >
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSAMPLES/htm/rss_overview_v1_631v.asp?frame=true.
> > There's also a How To section in BOL:
> >
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RShowto/htm/hrs_designer_v1_4bhu.asp?frame=true.
> >
> > --
> > Ravi Mumulla (Microsoft)
> > SQL Server Reporting Services
> >
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> > "A Gutie" <fiututor@.yahoo.com> wrote in message
> > news:eca873f7.0408030527.27d8e376@.posting.google.com...
> > > Hi,
> > > I am new at reporting services and need help creating a flat file that
> > > will contain transaction logs like userid, amount, date and a comment
> > > line.
> > > I do not want the full report history since that would take a lot of
> > > space on the server.
> > > Is there such a way to create a flat file with plain text
> > > characters(maybe csv or just spaces...) with only the information I
> > > want to provide and to the folder/file I specify?
> > > Thanks.
> > > BTW, this is also my first posting ever.|||Report Server Execution Log Data would had been great but it does not
contain information from a dataset but only parameter
information(according to the specs).
This link is very good but it does not include values from dataset
if I could just include field values from dataset then it'd do.
any other hints or maybe the execution log may be modified to include
values from datasets?
Thanks again
"Ravi Mumulla \(Microsoft\)" <ravimu@.online.microsoft.com> wrote in message news:<uO7gHJoeEHA.2396@.TK2MSFTNGP11.phx.gbl>...
> Sounds like execution log will give you what you're looking for. Take a look
> at
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsadmin/htm/arp_rslogfiles_v1_88gy.asp?frame=true.
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "A Gutie" <fiututor@.yahoo.com> wrote in message
> news:eca873f7.0408040544.744a044@.posting.google.com...
> > Hi Ravi,
> >
> > This report does not use any tables but only textboxes that are
> > populated from different datasets. All is working fine.
> >
> > EXCEPT: I need to create a text file(could be csv or just plain text
> > separated by blanks...) that will get appended information to it. It
> > will contain a few fields from the report. This process MUST be made
> > automatically without having the user click on the 'export' link. In
> > other words, like behind the scenes event when clicking on the 'view
> > report' button.
> >
> > What I have done is to create a dataset that has an insert but this is
> > adding the fields to a table I created for testing. If I could just
> > make the 'insert' send the output to a text file instead of a table
> > will do all I need.
> > if you know how, please let me know. I have not had any luck sending
> > the output to a file from an insert - have not found any documentation
> > on it but just DTS code that will not suffice.
> > I apologize for not giving specific details.
> > Thanks again.
> >
> > "Ravi Mumulla \(Microsoft\)" <ravimu@.online.microsoft.com> wrote in
> message news:<OqoCEoXeEHA.1644@.tk2msftngp13.phx.gbl>...
> > > If the data is already in a database table, you should be able to create
> a
> > > dataset against it, pull the data (i.e., only the columns and rows you
> want)
> > > into a report table, publish the report, and export it to CSV. Check BOL
> for
> > > samples and walkthroughs:
> > >
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSAMPLES/htm/rss_overview_v1_631v.asp?frame=true.
> > > There's also a How To section in BOL:
> > >
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RShowto/htm/hrs_designer_v1_4bhu.asp?frame=true.
> > >
> > > --
> > > Ravi Mumulla (Microsoft)
> > > SQL Server Reporting Services
> > >
> > > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > > "A Gutie" <fiututor@.yahoo.com> wrote in message
> > > news:eca873f7.0408030527.27d8e376@.posting.google.com...
> > > > Hi,
> > > > I am new at reporting services and need help creating a flat file that
> > > > will contain transaction logs like userid, amount, date and a comment
> > > > line.
> > > > I do not want the full report history since that would take a lot of
> > > > space on the server.
> > > > Is there such a way to create a flat file with plain text
> > > > characters(maybe csv or just spaces...) with only the information I
> > > > want to provide and to the folder/file I specify?
> > > > Thanks.
> > > > BTW, this is also my first posting ever.

Wednesday, March 7, 2012

Custom Destination Adapter

Hi All,

I have built a custom flat file destination adapter but it appears that the code is not working. When I debug the process I notice that the ProcessInput section is called multiple times. The first time it looks like everything is working, then it call it again and there is no inpout from the DTSInput90.

Why would it do this?

Thanks

Mike

Data moves down the pipeline in buffers. It is not one stream, or individual rows. Obviously buffers have a limited capacity, so you will get multiple buffers depending on the number of rows. The rows per buffer depends on the size of the row essentially.

So ProcessInput gets called once per buffer. This is why you cache buffer information in PreExecute, so that you get re-use. Querying the information can be quite expensive which is why it is cached to start with.

I'm not sure what you mean by "there is no inpout from the DTSInput90", can you explain?

|||Basically what I am saying is that the second time through there is no data. So if you want to capture all the data from the buffer and write it all out in a file how would you do that?|||

That doesn't sound particularly useful, but maybe how it works. Not sure I've ever stepped through to that degree. It should not cause you any problems however, but are you getting all the data you expect? Is there actually a problem?

|||

I figured it out. The detination component takes the input stream and creates a ZIP file with some delimiter that I have defined. I needed to create a global variable for the string and keep appending until then buffers were complete and then run through the ZIP code.

Thanks

Custom Destination Adapter

Hi All,

I have built a custom flat file destination adapter but it appears that the code is not working. When I debug the process I notice that the ProcessInput section is called multiple times. The first time it looks like everything is working, then it call it again and there is no inpout from the DTSInput90.

Why would it do this?

Thanks

Mike

Data moves down the pipeline in buffers. It is not one stream, or individual rows. Obviously buffers have a limited capacity, so you will get multiple buffers depending on the number of rows. The rows per buffer depends on the size of the row essentially.

So ProcessInput gets called once per buffer. This is why you cache buffer information in PreExecute, so that you get re-use. Querying the information can be quite expensive which is why it is cached to start with.

I'm not sure what you mean by "there is no inpout from the DTSInput90", can you explain?

|||Basically what I am saying is that the second time through there is no data. So if you want to capture all the data from the buffer and write it all out in a file how would you do that?|||

That doesn't sound particularly useful, but maybe how it works. Not sure I've ever stepped through to that degree. It should not cause you any problems however, but are you getting all the data you expect? Is there actually a problem?

|||

I figured it out. The detination component takes the input stream and creates a ZIP file with some delimiter that I have defined. I needed to create a global variable for the string and keep appending until then buffers were complete and then run through the ZIP code.

Thanks