Qlik Community

Ask a Question

Integration, Extension & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
shannonneumann
Contributor II
Contributor II

LOAD * EXTENSION only loading first row

Is anyone else seeing behavior where the LOAD * EXTENSION syntax is only recognizing the first row of a table returned from an SSE? More specifically, the load recognizes that the returned table has multiple rows, but the entire table is just the first row duplicated over and over.

Labels (1)
4 Replies
shannonneumann
Contributor II
Contributor II
Author

To add some more context, here is a simplified version of the function I'm calling.

 

    @staticmethod
    def _sample_function(request, context):
        response_rows = []

        sample_data = ["Atlanta", "Phoenix", "Denver", "Los Angeles", "Orlando"]

        row_count = 0

        for city in sample_data:
            val1 = f"{row_count}"
            val2 = city

            duals = iter([SSE.Dual(strData=val1), SSE.Dual(strData=val2)])

            response_rows.append(SSE.Row(duals=duals))

            row_count = row_count + 1

        table = SSE.TableDescription(name='SampleTable', numberOfRows=row_count)
        table.fields.add(name='id', dataType=SSE.DUAL)
        table.fields.add(name='city', dataType=SSE.DUAL)
        md = (('qlik-tabledescription-bin', table.SerializeToString()),)
        context.send_initial_metadata(md)

        yield SSE.BundledRows(rows=response_rows)

 

 

This should (and does) return a table with 5 rows.  But, when Qlik Sense loads it, it loads the first row 5 times.

Clever_Anjos
Employee
Employee

A quick fix could be

  #context.send_initial_metadata(md) comment this
Anotação 2019-11-05 170226.png
Clever_Anjos
Employee
Employee

A better solution

        table = SSE.TableDescription(name='SampleTable'numberOfRows=row_count)
        table.fields.add(name='id'dataType=SSE.STRING)
        table.fields.add(name='city'dataType=SSE.STRING)
 
        md = (('qlik-tabledescription-bin', table.SerializeToString()),)
        context.send_initial_metadata(md)
        yield SSE.BundledRows(rows=response_rows)
 
Anotação 2019-11-05 170226.png
shannonneumann
Contributor II
Contributor II
Author

Seriously unreal. Changing those return types from SSE.DUAL to SSE.STRING absolutely fixed the issue.  Mindblowing that it was that simple, and that I didn't think to try it myself.  Thanks!