Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Nata1739
Contributor
Contributor

Rest connector, correctly load data for one day

Hello experts!

I have customer logs with timestamp and I need to load them from Elasticsearch to Qlik Sense and store to files for particular days.

I’m using for that loop with concatenate, since I can get only 10000 rows per one loading.

I save maximum timestamp to variable and use it in with connection filter.

I use the following code: 

WITH CONNECTION (

QUERY “q”  “@timestamp:$(vToday)”&”@timestamp:{“”$(vMax@timestamp)”” to * ]”

);

And I see the following error:

Connector reply error: And unknown substring , string , or value at (37,32): ‘&”timestamp:{“”2022-10-28T05:12:00’

Could you please advise what I should correct to fix it?

Thank you in advance!

Labels (1)
1 Solution

Accepted Solutions
LukasRamus
Partner - Contributor
Partner - Contributor

Hello,

When I need to use an API connection, I always create the full URL before calling it through a variable.
Are you sure the format of your query is correct? Have you tested it on another tool like Postman for example?

Here is an example of a request, here it is a message sending but the principle remains the same : 

        RestConnectorMasterTable:
        SQL SELECT 
            "col_1"
        FROM CSV (header off, delimiter ",", quote """") "CSV_source"
        WITH CONNECTION (
            URL "$(vUrlMattermost)",
            HTTPHEADER "Name" "content-type",
            HTTPHEADER "Value" "application/x-www-form-urlencoded",
            BODY "$(vRequestBody)"
        )
        ;

 

View solution in original post

1 Reply
LukasRamus
Partner - Contributor
Partner - Contributor

Hello,

When I need to use an API connection, I always create the full URL before calling it through a variable.
Are you sure the format of your query is correct? Have you tested it on another tool like Postman for example?

Here is an example of a request, here it is a message sending but the principle remains the same : 

        RestConnectorMasterTable:
        SQL SELECT 
            "col_1"
        FROM CSV (header off, delimiter ",", quote """") "CSV_source"
        WITH CONNECTION (
            URL "$(vUrlMattermost)",
            HTTPHEADER "Name" "content-type",
            HTTPHEADER "Value" "application/x-www-form-urlencoded",
            BODY "$(vRequestBody)"
        )
        ;