data type argument cannot be null in data profiling viewer - sql-server-2017

I am new to Data Profile Viewer. I just created a package in SSIS which contains a Data Profiling Task Component. I am using the Sample database of Adventureworks2012 and I am creating an XML file through it using Employee table. But when I am trying to view the XML in Data Profile Viewer and selecting the Candidate profile Key it is showing me the below error:
Drill down query completed with error: The error message is:
System.ArgumentNullException: 'dataType' argument cannot be null.
Parameter name: dataType
at System.Data.DataColumn..ctor(String columnName, Type dataType, String expr, MappingType type)
at Microsoft.SqlServer.DataProfileViewer.QueryDrillDownWorker.DoWork(DoWorkEventArgs e)
at Microsoft.SqlServer.DataProfileViewer.DrillDownControlContainer.backgroundWorker_DoWork(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
Anyone having a knowledge on this how to resolve it. I am not able to find on Google.
Thanks for your help.

Try to add Polybase feature to your instance.

Related

Why Automated Data Driven test cases using Tosca throwing -- No suitable value found for command 'XL'

I am trying to automate Salesforce instance using Tosca ,and i used "Automated Data Driven test cases" which is simply Recording of Test cases option using the Tosca tool ,after successful recording when i tried to execute the test case by "Run in scrapbook " option ,i see error as
No suitable value found for command 'XL'
Strange because i see values got populated in Tosca Test engine of excel generated as a result of recording
here
Here is detailed error log from Tosca
Tricentis.Automation.AutomationInstructions.TestActions.InvalidActionException: No suitable value found for command 'XL' ---> System.InvalidOperationException: No suitable value found for command 'XL'
at Tricentis.Automation.AutomationInstructions.Dynamic.Values.ValueFactory.CreateValues(IParsed parsed, DataType dataType)
at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Tricentis.Automation.AutomationInstructions.Dynamic.Values.ValueFactory.CreateValue(IEnumerable`1 parsedItems, DataType dataType)
at Tricentis.Automation.AutomationInstructions.Dynamic.ExpressionParser.ParseExpression(String expression, IEnumerable`1 tokenDefinitions, DataType dataType)
at Tricentis.Automation.AutomationInstructions.Dynamic.ExpressionParser.GetAsValues[T](String expression, TokenDefinitionSet tokenDefinitionSet, DataType dataType)
at Tricentis.Automation.AutomationInstructions.TestActions.AutomationObjectTestAction.get_Values()
at Tricentis.Automation.AutomationInstructions.TestActions.AutomationObjectTextBoxTestAction.get_Values()
at Tricentis.Automation.AutomationInstructions.TestActions.AutomationObjectTestAction.CreateSubTestActions()
at Tricentis.Automation.AutomationInstructions.TestActions.TestAction.get_InnerActions()
--- End of inner exception stack trace ---
at Tricentis.Automation.AutomationInstructions.TestActions.TestAction.get_InnerActions()
at Tricentis.Automation.AutomationInstructions.TestActions.TestAction.get_Actions()
at Tricentis.Automation.AutomationInstructions.TestActions.TestAction.<>c.<get_ExecutableChildren>b__32_1(ITestAction testAction)
at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Tricentis.Automation.AutomationInstructions.TestActions.TestAction.get_ExecutableChildren()
at Tricentis.Automation.AutomationInstructions.TestActions.TestAction.get_ConstrainingChildren()
at Tricentis.Automation.AutomationInstructions.TestActions.AutomationObjectSearchQuery.get_TestActionConstraints()
at Tricentis.Automation.Engines.Representations.Controllers.RepresentationController.get_ConstrainingChildTestActions()
at Tricentis.Automation.Engines.Representations.Controllers.RepresentationController.ConstrainBySubItems(IEnumerable`1 representations)
at Tricentis.Automation.Engines.Representations.Controllers.RepresentationController.ConstrainInternal(IEnumerable`1 representations, IModuleAttributeXParameters parameters)
at Tricentis.Automation.Engines.Representations.Controllers.RepresentationController.Constrain(IEnumerable`1 representations)
at Tricentis.Automation.Engines.Representations.Controllers.RepresentationController.SearchRepresentations(IAdapterController adapterController)
at Tricentis.Automation.Engines.Representations.Controllers.RootRepresentationController.SearchRepresentation()
at Tricentis.Automation.Engines.Representations.Controllers.RepresentationController.Search()
at ᜁ.ᜀ(IRepresentationController A_0)
at ᜁ.ᜁ(IRepresentationController A_0, IRepresentation& A_1)
at ᜂ.ᜀ(IRepresentationController A_0, IRepresentation& A_1)
at ᜁ.ᜀ()
Even I got the same error message. but now solved. I tried as below:
Converted test case to template and added the Test Sheet attributes to Template by drag n drop in respective locations. If you try to run the test steps at this point then you will get this error message "No Suitable Value found for command 'XL'",
This can be avoided by "Create Template Instance" from the menu or Instantiate icon from the icon from the tool bar and then run the instantiated item in Scratch Book. It should work without any error message. I used multiple user cased and all of them worked.
Note: other observation: make sure you do not delete the Values in the cells using right click and cross mark. just get in to cell and then remove.
You get this "No Suitable Value found for command 'XL'" when you try to run testcase from a template and not the template instance!!

How to get Error Description when Handling it at Pentaho Data Integration

How to get the description of exception when you handling an error, for example if the data type of a field is incompatible PDI throws you offending row by any reason. And so how to get the explanation?
For getting the description you can catch using the field Error descriptions fieldname, and set some name, that will be attached to the flow.

Loading a flat file into SQL Server 2008 R2 via BizTalk 2010

I am trying to find my way around BizTalk 2010. The scenario is simple: I need to take a flat file (delimited, positional, segmented etc...) and load it into a table in SQL Server 2008 R2.
I am trying to do this with a WCF-SQL adapter.
At this point I do not care for speed (i.e., it does not matter if there will be multiple inserts or one bulk insert, but in the long run I would like to be able to do a bulk insert), I just want to get something working.
I have the following done so far:
TestTable1 in table in SQL Server 2008 R2
InsertIntoTestTable stored procedure in SQL Server 2008 R2
Visual Studio Project with (a) a schema for the incoming Flat File, (b) Generated Schema for the SQL table, (c) a Map from the incoming flat file schema to the SQL file schema and (d) a pipeline to disassemble the flat file.
I have deployed this project to BizTalk and created a receive port for the flat file specifying the receive folder and inbound map. When I drop a test file into the receive folder, it disappears but TestTable1 is not loaded with any values.
What am I missing? Where does BizTalk place the test file? How can I set this up?
I have looked over a number of tutorials (https://msdn.microsoft.com/en-us/biztalk/gg153515, https://sandroaspbiztalkblog.wordpress.com/2012/08/20/biztalk-server-transform-text-files-flat-files-into-xml-a-practical-example-part-3/, ) but just don't understand what I am missing.
Any help will be greatly appreciated.
So I got it to work. Not sure how yet, but I tweaked the adapter settings and changed the value of Quantity in the input file from 1.000 to 1. I also now able to write to an xml file. The error that I was getting is as follows looks like it was having problems with "Quantity" data type:
The adapter failed to transmit message going to send port "ToSQL" with URL "mssql://.//TestDB?". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The input data for the field/parameter "Quantity" is invalid according to the expected SqlDbType Int. ---> System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Microsoft.Adapters.Sql.MetadataHelper.ConvertXmlValueToDotNetObject(String xmlString, String fieldParameterName, SqlDbType sqlDbType, Int32 maxLength, Int32 precision)
--- End of inner exception stack trace ---
Server stack trace:
at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)".
Based on your error:
Quantity" is invalid according to the expected SqlDbType Int.
'1.000' is not a valid int type.
you should convert it to a valid format such as "1"

How to catch error while inserting data with SqlDataSource

I have a SqlDataSource and a GridView.
What I want to do is, while the query is executed (i.e. for inserting a data), then after the data has inserted successfully, it should appear a message sounds: "The data deleted successfully". I've solved it by using GridView1_RowDeleted method.
Now the problem is, I want to catch the error while the query is failed to executed. If the query has failed to execute, then it should appear a message: "The data failed to insert.".
How to do it? I don't have an idea about this.
Need your help guys.
Thanks a lot.
You should be able to add a handler for the relevant event: inserted, deleted. Then, in the handler look at the SqlDataSourceStatusEventArgs property Exception. If it's not null then an
exception has occurred. For example if the selected command threw an
exception:
protected void SqlDataSource1_Selected(object sender, SqlDataSourceStatusEventArgs e)
{
if (e.Exception != null)
{
// handle the exception
}
}
--

Windows Service Fails on Launch

I'm trying to write a windows service. It installs fine, but fails when I run it with the following exception. I've searched for the string "MyNewProgramService", but I can't find any conversions that would throw this error. I've also added try/catch blocks to a bunch of code with custom exception handling without finding where this exception is occuring. I'm thinking it's somewhere in the auto-generated configuartion/setup code. Any ideas?
Event Type: Error
Event Source: MyNewProgram Event
Category: None Event
ID: 0
Date: 4/15/2010
Time: 12:48:34 PM
User: N/A
Computer: 20F7KF1
Description: Service cannot be started. System.InvalidCastException:
Conversion from string "MyNewProgramService" to type 'Integer' is not valid. --->
System.FormatException: Input string was not in a correct format.
at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value,
NumberFormatInfo NumberFormat)
at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
--- End of inner exception stack trace ---
at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
at TaskManagerFailureHandlerService.MyNewProgramService.OnStart(String[] args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
it falls in method MyNewProgramService.OnStart, there Conversions.ToInteger is called somewhere. Just search for it in method. Then check parameter. It might come from config or something, thats why you don't see string in text.
Check your configuration file.
You might also check the account the service is running as. Just as a test go to the login tab in the services list and have it login under your own account. If the problem vanishes it's a permissions problem.