question

FelipeFritzen-5435 avatar image
0 Votes"
FelipeFritzen-5435 asked FelipeFritzen-5435 commented

Azure machine learning - Trying to use an analytical function from SQLite results in error

When trying to use the LAG function from SQLite on an Apply SQL Transformation module from Azure Machine Learning designer results in a error, saying the sintax near "(" was wrong.

The SQL code:

select t1.id, t1.veiculo, lag(t1.id) over (partition by t1.veiculo order by t1.id) id_ant
from t1

Looking at the link below, there is no clue on why I can't use a analytical function from SQLite on the module.
https://docs.microsoft.com/en-us/azure/machine-learning/algorithm-module-reference/apply-sql-transformation

Any tips?

azure-sql-databaseazure-machine-learning
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

YutongTie-MSFT avatar image
0 Votes"
YutongTie-MSFT answered FelipeFritzen-5435 commented

Hi Felipe,

Have you tried to put default and offsite variable in to see if work or not?

Like this,
LAG (scalar_expression [,offset] [,default])
OVER ( [ partition_by_clause ] order_by_clause )

Please let me know if that still not working.

Regards,
Yutong

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello YutongTie,

Thanks for the answer.

But unfortunately I tried your suggestion but resulted in the same error.

 select t1.id, t1.veiculo, lag(t1.id,1,0) over (partition by t1.veiculo order by t1.id) id_ant
 from t1
0 Votes 0 ·