Thank you so much, I will try to do it. this is new for me :)
On Wednesday, February 8, 2017 at 9:51:31 AM UTC, Zweitze wrote: > > The .NET API has a different method where the report is retrieved as a > .NET stream. > You can then initialize a new class "CsvReader" (open source) and feed > that stream. That class behaves like an IDataReader. You can feed that into > a LinQ class, if necessary. > > That is about the idea. To give you an idea about my setup: > My goal is to get the data into a temp table on SQL Server. And I don't > like CSV output, I prefer XML (with good reason, the last few years had > quite a few problems and changes in CSV, but never in XML). So: > > 1. Request the report as GZIPPED_XML, get a stream > 2. Copy that stream to a MemoryStream. This makes sure that the report is > read as fast as possible. You can't keep the report stream open forever, at > some time Google will close it. > 3. Feed the MemoryStream to a GZipStream to decode the GZip. > 4. Feed that stream to a self-made class that generates an IDataReader. > Essentially it reads the XML, parses date strings in DateTime, number > strings in doubles, integer string in longs, and deals will special Google > pecularities like appended percentages, giving '--' for NULL etc.etc. > 5. Feed that IDataReader to a SqlBulkCopy > > This sounds very slow but performance is stunning, reading 20,000 to > 50,000 records per second. Waiting for the report from Google takes more > time. > I can't share sources, just telling this so you know which solution you > should be looking for. > > > On Tuesday, February 7, 2017 at 6:42:35 PM UTC+1, Alpine wrote: >> >> >> I need some statistic for campigns, for example, Impressions, Clicks, etc. >> I see the view CAMPAIGN_PERFORMANCE_REPORT contains the fields I need, >> but it is only to export to a file in some formats. >> I need to get the data as an object to work with it in C#. I have a class >> Campaigns and performance and I would need to populate my object. >> What table or view in AdWords API can give me the performance fields >> for campaigns, ads, keywords? >> >> Thank you >> > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/d8ec2bcf-6e0d-4699-b8e7-834639ab12a8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.