1

SQL Query Execute

A command line / text box, where I could manually run test queries against the dataset within the interface rather than having to write one in python via the API.

 

Lazy? Yes. Awesome for ppl who don't have / can't use Python? Absolutely.

 

Obviously I would love all update / delete / insert abilitiy. 

 

Restricted appropriately of course, or at least until the permissions UI is all nice and shiny.

5件のコメント

  • 0
    Avatar
    Gavin Greenwalt

    I would second this request.

    3dsmax doesn't play nice with python yet.  Being able to submit a dos command with an API string would be very helpful to integration in non-Python supporting applications.

  • 0
    Avatar
    Luke Cole

    Hello,

    We've recently identified a need for something like this (command-line Shotgun access), and were wondering if there were plans to implement such a feature anytime soon?

    Thanks,

  • 0
    Avatar
    Isaac Reuben

    Hey Luke,

    How would you like to interact with Shotgun on the command line?  Can you mock up some examples of the types of commands you would want to run?

  • 0
    Avatar
    Luke Cole

    Hi Issac,

    Sure - we'd like to be able to execute CRUD operations via the cl upon/for a specified entity, providing arguments as simple key:value pairs, eg, something like:

    $ shotgun_cl Note create Project="My Project" Author="luke.cole" To="Production" Body="This is a note"

    $ shotgun_cl Note find Author="luke.cole"

    $ shotgun_cl Shot update Id=1234 Status="Closed"

    $ shotgun_cl Shot delete Id=4567

    It would be convenient if there was some way we could easily specify arguments that refer to other entities in Shotgun in such a way that the command line interpreter was able to automatically look those values up and feed them into the associated internal Python API calls, without having to make separate calls to look up the ids or whatever for those entities first.   Maybe we'd have to supply a bit more information for those args, e.g: Author="{type='HumanUser', name="luke.cole"}, but it would be nice if the cl "knew" that an Author is always going to refer to a HumanUser entity, and therefore all that needs to be provided is the name of the user entity to look up.

    Does that help?

    Thanks,

  • 0
    Avatar
    Luke Cole

    I forgot to add:

    create operations, return perhaps the id of the newly created entry

    update operations, return a true or false succeed/fail result (and print any errors that occurred if relevant)

    delete operations return a true or false succeed/fail result

    I'm not sure what the output of a find operation would look like, perhaps just a dict style output of the key:value pairs that make up the record(s) that match the search criteria.

    Thanks,

サインインしてコメントを残してください。