OData Task Error

I have a SSIS Data Flow Task that read Data from OData services, I'm able to connect to it successfully via OData Connection Manager. But when I run the task within SSDT, I'm getting following error

[OData Source [2]] Error: The OData Source was unable to process the data. The remote server returned an error: (401) Unauthorized.


[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on OData Source returned error code 0xC02090F5.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.

I'm using basic authentication to connect and I can view data in the preview section of OData source editor. I don't know why I'm getting the error, the user has permission to extract the data.
LVL 1
SamoinAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SamoinAuthor Commented:
I was able to resolve this issue on my own. Few things to keep in mind

1. Make sure the credentials in the OData Connection Manager are correct
2. Parameterize the connection manager if required (right click on the OData Connection Manager and choose Parameterize and select drop drown UserName and set the value and do the same for Password from the drop down)
3. OData source has a limit of 10000 rows; so if you're connected a OData source collection that has more than 10,000 rows you will get the error that I was getting
4. In order to avoid the error, use $top=10000 (or what ever is appropriate # rows) in OData task (OData Source Editor) Query options.

Hope this helps.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
OData

From novice to tech pro — start learning today.