Tag - Recruitment

Create SSIS Data Flow Task Package Programmatically
Jul 27, 2020

In this article, we will review how to create a data flow task package of SSIS in Console Application with example. Requirements Microsoft Visual Studio 2017 SQL Server 2014 SSDT Article  Done with the above requirements? Lets start by launching Microsoft Visual Studio 2017. Create a new Console Project with .Net Core.  After created new project provide proper name to it. In Project Explorer import relevant references and ensure that you have declared namespaces as below: using Microsoft.SqlServer.Dts.Pipeline.Wrapper; using Microsoft.SqlServer.Dts.Runtime; using RuntimeWrapper = Microsoft.SqlServer.Dts.Runtime.Wrapper;   To import above namespaces we need to import below refrences.   We need to keep in mind that, above all references should have same version.   After importing namespaces, ask user for the source connection string, destination connection string and table that will be copied to destination. string sourceConnectionString, destinationConnectionString, tableName; Console.Write("Enter Source Database Connection String: "); sourceConnectionString = Console.ReadLine(); Console.Write("Enter Destination Database Connection String: "); destinationConnectionString = Console.ReadLine(); Console.Write("Enter Table Name: "); tableName = Console.ReadLine();   After Declaration, create instance of Application and Package. Application app = new Application(); Package Mipk = new Package(); Mipk.Name = "DatabaseToDatabase";   Create OLEDB Source Connection Manager to the package. ConnectionManager connSource; connSource = Mipk.Connections.Add("ADO.NET:SQL"); connSource.ConnectionString = sourceConnectionString; connSource.Name = "ADO NET DB Source Connection";   Create OLEDB Destination Connection Manager to the package. ConnectionManager connDestination; connDestination= Mipk.Connections.Add("ADO.NET:SQL"); connDestination.ConnectionString = destinationConnectionString; connDestination.Name = "ADO NET DB Destination Connection";   Insert a data flow task to the package. Executable e = Mipk.Executables.Add("STOCK:PipelineTask"); TaskHost thMainPipe = (TaskHost)e; thMainPipe.Name = "DFT Database To Database"; MainPipe df = thMainPipe.InnerObject as MainPipe;   Assign OLEDB Source Component to the Data Flow Task. IDTSComponentMetaData100 conexionAOrigen = df.ComponentMetaDataCollection.New(); conexionAOrigen.ComponentClassID = "Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter, Microsoft.SqlServer.ADONETSrc, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"; conexionAOrigen.Name = "ADO NET Source";   Get Design time instance of the component and initialize it. CManagedComponentWrapper instance = conexionAOrigen.Instantiate(); instance.ProvideComponentProperties();   Specify the Connection Manager. conexionAOrigen.RuntimeConnectionCollection[0].ConnectionManager = DtsConvert.GetExtendedInterface(connSource); conexionAOrigen.RuntimeConnectionCollection[0].ConnectionManagerID = connSource.ID;   Set the custom properties. instance.SetComponentProperty("AccessMode", 0); instance.SetComponentProperty("TableOrViewName", "\"dbo\".\"" + tableName + "\"");   Reinitialize the source metadata. instance.AcquireConnections(null); instance.ReinitializeMetaData(); instance.ReleaseConnections();   Now, Add Destination Component to the Data Flow Task. IDTSComponentMetaData100 conexionADestination = df.ComponentMetaDataCollection.New(); conexionADestination.ComponentClassID = "Microsoft.SqlServer.Dts.Pipeline.ADONETDestination, Microsoft.SqlServer.ADONETDest, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"; conexionADestination.Name = "ADO NET Destination";   Get Design time instance of the component and initialize it. CManagedComponentWrapper instanceDest = conexionADestination.Instantiate(); instanceDest.ProvideComponentProperties();   Specify the Connection Manager. conexionADestination.RuntimeConnectionCollection[0].ConnectionManager = DtsConvert.GetExtendedInterface(connDestination); conexionADestination.RuntimeConnectionCollection[0].ConnectionManagerID = connDestination.ID;   Set the custom properties. instanceDest.SetComponentProperty("TableOrViewName", "\"dbo\".\"" + tableName + "\"");   Connect the source to destination component: IDTSPath100 union = df.PathCollection.New(); union.AttachPathAndPropagateNotifications(conexionAOrigen.OutputCollection[0], conexionADestination.InputCollection[0]);   Reinitialize the destination metadata. instanceDest.AcquireConnections(null); instanceDest.ReinitializeMetaData(); instanceDest.ReleaseConnections();   Map Source input Columns and Destination Columns foreach (IDTSOutputColumn100 col in conexionAOrigen.OutputCollection[0].OutputColumnCollection) {     for (int i = 0; i < conexionADestination.InputCollection[0].ExternalMetadataColumnCollection.Count; i++)     {         string c = conexionADestination.InputCollection[0].ExternalMetadataColumnCollection[i].Name;         if (c.ToUpper() == col.Name.ToUpper())         {             IDTSInputColumn100 column = conexionADestination.InputCollection[0].InputColumnCollection.New();             column.LineageID = col.ID;             column.ExternalMetadataColumnID = conexionADestination.InputCollection[0].ExternalMetadataColumnCollection[i].ID;         }     } }   Save Package into the file system. app.SaveToXml(@"D:\Workspace\SSIS\Test_DB_To_DB.dtsx", Mipk, null);   Execute package. Mipk.Execute(); Conclusion In this article, we have explained one of the alternatives for creating SSIS packages using .NET console application. In case you have any questions, please feel free to ask in the comment section below.

6 Hottest Recruiting Trends For 2020
Feb 04, 2020

Recruitment requires a lot of creativity these days. In a largely candidate-driven job market, recruiters need to be on its left, right, and center to find the talent their organization so desperately needs. That includes being aware of the current and rising trends in the recruitment land. Let’s start with a quick recap of what we saw in 2019 – the growing use of AI in recruitment, a stronger focus on diversity hiring, an expanding gig economy, chatbots… Some of these recruiting trends will still be relevant (perhaps even more so than last year) in 2019-20, but at the same time, the focus shifts onto several other parts of the recruitment landscape. In this article, we’ve selected 6 recruiting trends for 2020 we believe will shape recruitment this year. Some of them you may have heard of already, but we’re sure you’ll find at least a few you’ve missed and really should be aware of.   1. COLLABORATIVE HIRING There’s a reason why they say two heads are better than one. When it comes to recruitment, involving your entire team in the recruitment process can be of tremendous value. Just think of the potential that could come out of the combined (personal) networks of your team members, for example. This is one of the reasons we see an increase in employee referrals and EMPLOYEE REFFERAL  Referred hires generally are (among other things) more productive, more engaged and less likely to leave. Given the current market situation, it seems only natural for companies to increase their focus on collaborative hiring, even more, this year. The same thing goes for internal mobility programs. Although not that many organizations have a (well-developed) internal mobility culture and program in place yet, this can be a great way to meet skill shortages, decrease turnover and boost engagement. Did you know that referrals are one of the best sources of hires? 70% of companies offer Cash Referral Bonus for successful hires. How is your company supporting employee referrals?    2. GROWING IMPORTANCE OF RECRUITMENT MARKETING As we’ve said, 21st-century recruiters need all the help they can get to find the best candidates. This explains the rise in recruitment marketing solutions. Recruitment Marketing – also called the pre-applicant stage of talent acquisition – is the process of attracting and nurturing talent to your organization by marketing to them. Just like the main goal of traditional marketing is to drive individuals to buy a company’s product or service, the primary objective of recruitment marketing is to get people to apply to your organization’s job openings. We’ve already seen the use of certain marketing techniques in recruitment before. Now, however, companies increasingly turn to, let’s call them full-service recruitment marketing providers.   This means a recruitment marketing solution that helps organizations strengthen their employer brand, reach candidates on social media and optimize their career sites (of course, many other possibilities are depending on your company’s specific needs). To stick with the marketing jargon: this year, we’ll continue to see a transition from outbound to inbound recruitment.   3. AI Yes, there it is again, artificial intelligence. And yes, we know you’ve probably been inundated with AI-related content. However, applications of AI in recruitment will become even more widespread in 2019. This year, in one way or another, AI will become a must-have in the recruiter’s toolbox. From automated candidate sourcing, recovery, and matching, to hiring remote workers and creating customized employee value propositions, the number of different uses of AI in recruitment just keeps growing.   4. EMBRACING THE FLEXIBLE WORKFORCE For most organizations, their workforce already consists of a combination of full-timers, contractors, freelancers and everything in-between. Independent workers like the fact that they can work anywhere they want, when they want and are often happier than ‘traditional’ employees Technology, of course, is a big enabler of this kind of freelance work: people can use their smartphones, have free internet available in a lot of (coffee) places, and freelance platforms like Upwork, PeoplePerHour and Fiverr match freelancers with projects. Especially when companies need to find skilled people urgently – and in an industry where talent is scarce – they’ll have to turn to freelancers, contractors, etc. to meet their needs. Especially when companies need to find skilled people urgently – and in an industry where talent is scarce – they’ll have to turn to freelancers, contractors, etc. to meet their needs.   5. A SHIFT FROM JOB DESCRIPTION BASED HIRING TO PROJECT BASED HIRING This is a result of several of the trends we’ve seen above, like the growing gig economy and the shift from experience-based hiring to hiring based on transferable & soft skills for instance. Both of these developments are likely to change the way organizations manage their projects. In a time where finding good full-time employees are hard and turnover often is high, it could make more sense to start hiring differently. Based on projects rather than job descriptions, for example. This has, among other things, the advantage of gathering those people who are the best in their field for each project. Instead of buying labor, organizations will be buying (and thus recruiting for) results.    6. TREND TO HIRE FRESHERS AND TRAIN THEM ACCORDING TO THE NEED They’ve been entering the global workforce for a while now, although so far, mainly in internship and entry-level positions. Slowly but surely though, Generation Z (the cohort that comes after the Millennials, born somewhere between the mid-’90s and the mid-2000s) is now finding its way into the workplace. If your knowledge about these Digital Natives is a little rusty, you might want to bring it up to speed again, because this year the recruitment of Gen Z will, without a doubt, accelerate. To succeed in recruitment in 2020, make sure to consider these points when creating your recruitment strategy.