Forum Discussion

Wasowski's avatar
Wasowski
New Member
4 years ago
Solved

API via PowerQuery - how to select only specific columns

Dear All,

I am downloading data via Web from API from external data provider.

The issue is, i would like:

 

a. Recieve only specific columns, not all available

b. To filter the columns via specific filters.

 

 

I want to limit the query request as much as possible, to improve the performance of retrieving data.

Additionally the API provider is limiting the query only to 200 rows in one request.

 

I already tried to use, but nothing is correctly working

  • ....v2/shipments?$select=id,shipmentsubscription_status for selecting specific columns - it is giving me all columns
  • ....v2/shipments/?page=200,[Query=[parameter="XYZ"]] - which is filtering the mentioned page, but not filtering the provided query parameter
  • ....v2/shipments/?parameter=XYZ - which is also not working

Anyone has an idea how to solve this?

Thank you in advance!

  • Thank You to all of You, it came out, that the api provider, doesn't have this functionalities...:(

     

4 Replies

  • Are you possibly mixing up an API data source with an ODATA data source?  When you studied the API documentation did it contain a section about how queries and filters should be placed?

    • Wasowski's avatar
      Wasowski
      New Member

      Thank for You message Ibendin,

      Unfortunately in documentation there was no info about querying 😞

       

       

       

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi Wasowski 

     

    Maybe you can bring all columns into Power Query Editor first (this is just a data preview) then use Home > Choose Columns / Remove Columns to keep the specific columns you want. 

     

    After that, using Keep Rows / Remove Rows to filter rows. You can also click the down arrow on any column header to filter rows. If the filter condition is more complex, you can write M code to do that with Table.SelectRows.

     

    The data will only be imported when you click on Apply button. 

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

  • Thank You to all of You, it came out, that the api provider, doesn't have this functionalities...:(