Giter Site home page Giter Site logo

Comments (20)

bbakersmith avatar bbakersmith commented on July 22, 2024

Assume Queries aren't supported... can you give me any insight as to how they would be implemented for FuelSDK-Ruby and I'll try to hack something together?

Edit: Got a response on code.exacttarget that told me what I needed. I'm able to create queries now through the SDK. Here's the response for posterity: https://code.exacttarget.com/question/it-possible-dynamically-generate-query-activities-using-fuelsdk-ruby-library

from fuelsdk-ruby.

bbakersmith avatar bbakersmith commented on July 22, 2024

I also just downloaded the master branch, installed the gem bundle, ran the specs, and am getting 23 test failures. Is this accurate? Am I missing any setup steps?

from fuelsdk-ruby.

barberj avatar barberj commented on July 22, 2024

Master here doesn't currently reflect the gem version. There was some disconnect when we were communicating . The gem is represented in this version and the tests aren't failing https://github.com/barberj/FuelSDK-Ruby. Queries aren't currently available. Stay tuned.

from fuelsdk-ruby.

bbakersmith avatar bbakersmith commented on July 22, 2024

Gotcha. I was actually able to start creating queries via the SDK using the soap post direct verb, now I just need to figure out how to start (execute) a query. This requires the "Start" action, which of course isn't implemented because I think it's specific to queries. Would calling soap_cud(:start ... work? Or is there more that would need to be done to soap_cud to get it to support the "Start" action?

Edit: more details here: https://code.exacttarget.com/question/how-start-query-activity-using-fuelsdk-ruby

from fuelsdk-ruby.

barberj avatar barberj commented on July 22, 2024

i can easily create and expose a soap_start. having trouble testing at moment... my ET account doesn't seem to show any of the DataExtensions i'm creating despite returning OK and created messages... :(

from fuelsdk-ruby.

barberj avatar barberj commented on July 22, 2024

:start isn't a recognized soap message, but :query is... to be continued

from fuelsdk-ruby.

bbakersmith avatar bbakersmith commented on July 22, 2024

Thanks for looking into this. Here's where I got the

<Action>Start</Action>

lead: http://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/performing_a_query_activity_using_the_soap_web_service_api/

Edit: FWIW, earlier today I was running into issues with new Data Extensions not showing up in Safari (which I don't generally use). I guess that's a known issue with ET / Safari.

from fuelsdk-ruby.

barberj avatar barberj commented on July 22, 2024

Interesting...

When i try doing start i get this:

[4] c.send :soap_request, :start, :CustomerKey => "123"
Savon::UnknownOperationError: Unable to find SOAP operation: :start
Operations provided by your service: [:create, :retrieve, :update, :delete,
:query, :describe, :execute, :perform, :configure, :schedule
, :version_info, :extract, :get_system_status]

On Wed, Aug 28, 2013 at 11:55 PM, Ben Baker-Smith
[email protected]:

Thanks for looking into this. Here's where I got the Start lead:
http://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/performing_a_query_activity_using_the_soap_web_service_api/


Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-23465400
.

Justin Barber
(512)JBARBER
.......__o
.......<,
....( )/ ( )

from fuelsdk-ruby.

bbakersmith avatar bbakersmith commented on July 22, 2024

Could be :perform

See how the first line of the SOAP Body compares in the documentation samples for both create query and start query (referred to as perform in the docs):

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">

<SOAP-ENV:Body>
    <PerformRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">

http://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/creating_a_query_activity/

http://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/performing_a_query_activity_using_the_soap_web_service_api/

from fuelsdk-ruby.

bbakersmith avatar bbakersmith commented on July 22, 2024

Ok yeah, I tested a soap_perform method and it seems to be what I want, but I'm not sure how to include the

<action>Start</action>

part of the request, so my soap_perform calls don't actually do anything yet, they just execute without error and create the proper

<soap:Body><PerformResponseMsg ... 

as seen in the example above

Edit: for that matter, it's also not including the ObjectID in the request if I just put it in parameters like {"ObjectID" => "1234"}

For reference (again): http://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/performing_a_query_activity_using_the_soap_web_service_api/

Edit: I've moved over to your fork for testing and development, so maybe this conversation should move there...

from fuelsdk-ruby.

MichaelAllenClark avatar MichaelAllenClark commented on July 22, 2024

Please share your code from where you used the soap_perform method. That should be what you want to use.

from fuelsdk-ruby.

bbakersmith avatar bbakersmith commented on July 22, 2024

I implemented soap_perform in a branch of barberj's master branch as follows:

def soap_perform object_type, properties
    soap_cud :perform, object_type, properties
end

This was then called with the following:

properties = {"Action" => "Start", "ObjectID" => query_obj_id}
client.soap_perform("QueryDefinition", properties)

query_obj_id is the ObjectID that's returned from a new query when created using soap_post

from fuelsdk-ruby.

MichaelAllenClark avatar MichaelAllenClark commented on July 22, 2024

Check out soap_perform that was added in the master branch in the ET Repo, you should be able to copy it from there then used it by

https://github.com/ExactTarget/FuelSDK-Ruby/blob/master/lib/fuelsdk/soap.rb

client.soap_perform("start", "QueryDefinition", properties)

I am working to fix the spec issues with this branch.

from fuelsdk-ruby.

bbakersmith avatar bbakersmith commented on July 22, 2024

Awesome! That did the trick. I modified your method so message is defined all at once (easier to see the actual hash structure) and switched the argument order so it matches soap_get (another soap_ method with more than just object_type and properties args) like

def soap_perform object_type, properties, action

Here's the commit with the change. I submitted a pull request to barberj.

https://github.com/bbakersmith/FuelSDK-Ruby/commit/891855db507b0fdef4db28ccbb252897cf89773e

from fuelsdk-ruby.

barberj avatar barberj commented on July 22, 2024

fuelsdk-0.0.8 includes perform feature... @barberj repo

from fuelsdk-ruby.

barberj avatar barberj commented on July 22, 2024

make that .0.0.9... forgot to pull

from fuelsdk-ruby.

barberj avatar barberj commented on July 22, 2024

question... is querydefinition the only thing a perform is used for... or should we have a soap_define that calls soap_perform?

from fuelsdk-ruby.

barberj avatar barberj commented on July 22, 2024

does ET ever perform anything other then start?

I have set a query following this guide. When i execute i'm getting this error: "Exception occurred during [Schedule::Start] ErrorID = 553941468". I'm passing the external key as the object id... is that correct?

c.soap_perform 'QueryDefinition', {'ObjectID' => 'Q1'}, 'start'

circling back with some tests...

from fuelsdk-ruby.

bbakersmith avatar bbakersmith commented on July 22, 2024

The ObjectID is actually different from the ExternalKey. It's returned from a newly created query as:

response.result.first[:object][:object_id]

And also I believe as :new_object_id. You can also get the ObjectID by running a get request for a query based on its ExternalKey, the ObjectID is in the response somewhere.

Sorry, I'm not actually at a machine on which I can test, so this is from memory and skimming my project files.

from fuelsdk-ruby.

MichaelAllenClark avatar MichaelAllenClark commented on July 22, 2024

perform will be used for Import/Email::SendDefinition.

There are other actions that can be specified other than "start", for instance there is an action that can be used with Email::SendDefinition that instead of sending an email will do an estimate to see how large the target audience is.

from fuelsdk-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.