Dynamically decide columns in SSIS connectors for salesforce - ssis

I want migrate data from salesforce to SQL server and I am using SSIS connectors for salesforce. I am creating single SSIS package which fetch data for all objects and insert into SQL server. I tried using following connectors for salesforce.
Connector 1 : Kingswaysoft
https://www.kingswaysoft.com/
Connector 2 : CData
https://www.cdata.com/kb/articles/ado-ssistask-sf.rst
Connector 3 : SSIS PowerPack -
https://zappysys.com/onlinehelp/ssis-powerpack/index.htm
https://zappysys.com/products/ssis-powerpack/ssis-salesforce-source-connector/
In all the connectors I am unable to provide different columns(salesforce fields) dynamically in SOQL query using SSIS variables.

I agree with the comments that SSIS is for static ETL & you can work around with C# script task for dynamic metadata.
As an Alternative, you can try conditional branches and run two different tasks based on expression. Read Add expressions to precedence constraints.
Not sure how many dynamic columns we are talking here, but for discussion sake let’s take 2 different columns has to be filled in salesforce destination based on source column, then have 2 branch.

Related

SSIS: import multiple files to separate destination tables

I'm new to SSIS. I'm running BIDS under SQL Server 2008 R2. I have several text files that I need to import into separate SQL Server destination tables. The tables already exist in the DB. Each file will map to only 1 table. (For example, file_A maps to table_A, and file_B maps to table_B.) My general data flow is as follows:
Flat File Source
Data Conversion (to handle the issue of unicode vs non-unicode strings)
OLE DB Destination (to handle the issue of local server to remote server)
Do I need to create a separate data flow task for each of my text files? If so, my package may be very large.
You can create a single data flow task that has more than one "flow" in it. Hard to describe with words, but you can put a source1 that flows to DataConversion1 that flows to Destination1 and then alongside it (no connections) Source2 flows to DataConversion2 flows to Destination2, and so on.
However, I do agree with #billinkc that using a separate dataflow for each is the better way to go. It will make debugging easier, in addition to the other benefits he mentioned.

Copying multiple tables using SSIS Package [duplicate]

This question already has answers here:
ssis best practice to load N tables from Source to Target Server
(3 answers)
Closed 8 years ago.
I am trying to design an SSIS package which copy about 50+ tables from an ODBC DataSource (QuickBooks DB) to an SQL DB.
Should I create 50 Data Flow Task to do this ?
What is the best way to do this ?
Putting DFT inside a Loop, and reading the tables ? Or 50+ Data Flow Tasks ???
You can create 50 Data Flow Tasks, but you don't have to.
It is possible to have multiple independent sources-destinations in the same DFT.
This will be not as flexible, because you can run single DFT separately from the package (while debugging), but you cannot run a piece of DFT without modifying it (as far as I know).
Depending on which option you choose, I see a couple of ways to save yourself from mundane work with 50+ tables:
a) Let SQL Server Import and Export Wizard do the boring work for you.
The best about this tool is that it can create a .dtsx package.
So, with the wizard, you can:
select for importing all 50+ tables from ODBC DataSource
instead of running the wizard till the end, save the result as a .dtsx package.
open the package in Visual Studio with SQL Server Data Tools
modify the package up to your needs (for example logically regrouping the tables in different DFTs, adding any additional transformations).
b) Manually edit the package code (some BIML knowledge might be needed):
In Visual Studio with SQL Server Data Tools, create 1 DFT which will be your sample.
In Solution Exporer, right-click on your package, select View Code.
Either copy/paste the DFT 50+ times, changing the table names, or maybe you will even manage to automate your BIML somehow to avoid copy/paste

Reading from SQL and passing it to C# method

I need to read a column from a database table depending upon some parameter. If the database table has two columns, status and ID, then I have to read the ID if the status is true. Then I have to pass this ID to a C# method.
How can I achieve this in SSIS? So basically my database package will read the data from SQL Server and pass it to a C# method.
SSIS is an ETL Tool for moving and transforming large quantities of data. If you need to do a lot of C# work and you only have one record, or a few records, SSIS may not be the right tool for this purpose. You might do better writing an ASP.NET web application or a Windows application. These applications can also use SQL to get data for processing in C#.
If you are determined to do this in SSIS and C#, here are two possible approaches:
You could use an Execute SQL Task to perform your query and save the rowset into a variable. Then you would use a C# Script Task to do something with the contents of the variable.
You could create a Data Flow Task. The dataflow should have the structure Source -> Transformation -> Destination, and can include several transformation components.
You would use, for example, an OLE DB Source Component to perform your query. Then you would use a C# Script Component to transform each record that is returned by the query. Finally, you would use a OLE DB Destination Component to do something with the output for each record.

Exporting and Importing form QuickBooks 2011 using SSIS

Problem Definition: I would like to export all the data from all the tables from QuickBooks into SQL Server 2008 database. I tried to create a SSIS and using RssBus .NET Data Provider for QuickBooks - http://www.rssbus.com/ado/quickbooks/. I am able to export data from QuickBooks Customers table into SQL Server 2008 database table by using ADO.NET (source data reader) and OLE DB Connection (for destination SQL Server).
Question: I would like to loop through all the tables on source side and then export one by one. Is it possible through SSIS package? I will really appreciate if someone can point good resource links or example or detailed instruction will be much appreciated!
Then I would like to do import from SQL Server to QuickBooks. I am expecting SSIS can be used to accomplish the import process.
Thanks in anticipation!
You can't loop over the tables, you have to define each source and target table in advance in the package.
Of course, you always have the option of creating packages dynamically from .NET code, so you could read the list of tables in QuickBooks then generate a package. If the table structures change a lot or if there is a very large number of tables it could be worth it (I know nothing about QuickBooks).

What's the best way to get table creation scripts from a table created in VS 2010?

I've been playing around with hosting on discountasp.net and am in the process of hosting my second web app. Being that discountasp charges you per database and not per sql server or total space used by all of your databases, both apps need to share one database
I need to create all of the tables from the database used by the second application in the live database. I can't just import the mdf file because that would drop all of the data already stored by the first application. Is there a way to automatically generate the scripts or simple sql commands to create the tables in the mdf file from within visual studio?
Also, since multiple applications will ultimately use the same database I'd like to add a prefix to each table names - like App1_Table1. Is there a simple way to rename tables inside VS 2010? Further is there a way to rename the tables but have the entities framework ignore the prefix when generating it's classes?
Thanks for your help, your answers will save me a ton of time I could be programming with :).
There are many options available to you.
In Visual Studio there's database schema compare functionality.
ScriptDb is a simple console app written in C# that uses SQL Management Objects (SMO) to script all the objects in a database. It will work against any SQL Server 2000 or 2005 database. It creates a directory tree structure with a similar hierarchy to that in Object Explorer in SSMS, with a separate file for each object.
There's also an option to script database objects from SSMS. Right-click on a database -> Task -> Generate scripts.