This topic contains 1 reply, has 2 voices, and was last updated by  Casey Trauer 2 weeks, 6 days ago.

Difference on putting queue.push to Source and Destination.

  • Hi Guys,

    I have a channel that has a source: From Translator and destination: To Translator. I was able to connect to Microsoft SQL database using the below code:
    conn = db.connect{
    api=db.SQL_SERVER,
    name=’SQL Server Test’,
    user=’user’,
    use_unicode = true,
    password=’pass’,
    live=true

    Most of your examples, you are connecting to DB from destination component. What is the difference connecting from source / destination component?

    If I connect from source, how do I pass all the values I gathered to destination? I tried to put queue.push and it doesn’t automatically push the data to component. I need to go thru logs and export data from there. Is there any way where I can directly pass the data I gathered from source to destination? global variable isn’t working either.

    Many thanks in advance for your help!

    Hi Wilmor,

    You can connect to databases in any of the channel components. When you query the database, data is returned as an object. You will need to serialize that into another format (JSON?) before placing it into the queue. (Although you cannot use queue.push in To Translator.)

    Does that help?

    Regards,

    Casey Trauer,
    Director, Client Education
    iNTERFACEWARE

You must be logged in to reply to this topic.