Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello ,
I have a table where for some dimensions I don't have the same value, so in my script I want to filter and keep only the first row. here is an example of the data file:
for this exemple i want to load only the row with the
i want to order and GRoup by ATA 6D then filter and keep only the first row , this is my script actually :
unqualify *;
parts_va_source:
LOAD Distinct
[AC Type / AC SubType / ATA 6D] as ID,
[AC Type],
[AC SubType],
[ATA 2D],
[ATA 6D],
[Network Disruption],
[Unplanned maintenance],
Fuel,
[Inventory management],
[Technical Operations],
[Asset Management],
Partner
;
SELECT [AC Type / AC SubType / ATA 6D],[AC Type],[AC SubType],[ATA 2D],[ATA 6D],[Network Disruption],[Unplanned maintenance],Fuel,[Inventory management],[Technical Operations],
[Asset Management],Partner
FROM GetSheetValues
WITH PROPERTIES (
spreadsheetKey='1ThWGbQC3ccRhzi_w7fXA0BIx8HkW',
range='PartsA1:O',
valueRenderOption='FORMATTED_VALUE',
dateTimeRenderOption='FORMATTED_STRING',
generatedNumberedColumns='false',
skipRows=''
);
Thank you for your help
Hello,
You can either use firstsortedvalue function with suitable ranking
or autonumbers' second parameter to partition records and filter necessary records afterwards.