0

Variable in dynamic data source (PostgreSQL)

Hi,

I am having a little problem with my dynamic data source. When I try to use {props.semana} inside double quotes in a MySQL query, it works without problems. However, now I need to change the database, which is PostgreSQL. I tried to use the variable inside double quotes, simple quotes, and just the variable, anyone works.

What can I do to solve that?

Thanks!

6 comments

  • 0
    Avatar
    Josh Cohen-Collier

    Hi,

    Thanks for posting in our Community!

    Sorry to hear about the issue you are encountering with your SQL query?
    When you are putting your variable value inside of the double quotes, is your SQL query expecting it to be inside of quotes?
    If so, could you show me the current query you are using, as well as an example of what the query should ideally look like(including the actual variable value)?

    Best regards,
    Joshua
    _________________
    Joshua Cohen-Collier,
    Technical Support Specialist, Klipfolio

  • 0
    Avatar
    Marketing LojasKD

    Hey Joshua, Thanks for the fast answer. I am sending two screenshots with the errors.


    f I try without quotes, the result is a different error. 

    In MySQL query it works correctly.

    Thanks!

  • 0
    Avatar
    Marketing LojasKD

    Hello Joshua,

    Do you know how can I solve this problem? Did you found out a solution?

    Thanks, I am waiting for your answer :)

  • 0
    Avatar
    Josh Cohen-Collier

    Hi there,

    Unfortunately, without knowing the details of the query, it would be difficult to say what the issue could be.
    However, can you tell me what the value of the week would be for a query you have managed to get working in your SQL driver outside of Klipfolio is?
    If you try setting the Klip Editor value of that variable to that same week number, does the query run properly?

    If you need clarification on what I mean, can you send me a screenshot of what this query looks like in your SQL driver, specifically the part where the week number is set?
    Then, another screenshot of the Klip Editor value for this variable(inside Editor of any Klip->Advanced Tools(top left)->Manage Variables).
    _________________
    Joshua Cohen-Collier,
    Technical Support Specialist, Klipfolio

  • 0
    Avatar
    Marketing LojasKD

    Hey Joshua,

    Just to close this topic, I made a mistake, I did not set a value for the variable "semana". When you sad to take a screenshot of the settings, I realized the problem, there was no value. 

    Anyway, thanks for the help!

  • 0
    Avatar
    Josh Cohen-Collier

    Hi,

    No problem at all!
    Glad you managed to solve your issue.

    Thanks for posting in our community, and best of luck moving forward!

    Warm regards,
    Joshua
    _________________
    Joshua Cohen-Collier,
    Technical Support Specialist, Klipfolio

Please sign in to leave a comment.