Snowpark Migration Accelerator: Códigos de problema para Spark - Scala¶
SPRKSCL1126¶
Mensagem: org.apache.spark.sql.functions.covar_pop tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.covar_pop function, which has a workaround.
Entrada
Below is an example of the org.apache.spark.sql.functions.covar_pop function, first used with column names as the arguments and then with column objects.
Saída
The SMA adds the EWI SPRKSCL1126 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent covar_pop function that receives two column objects as arguments. For that reason, the Spark overload that receives two column objects as arguments is directly supported by Snowpark and does not require any changes.
For the overload that receives two string arguments, you can convert the strings into column objects using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1112¶
Message: *spark element* is not supported
Categoria: Erro de conversão
Descrição¶
Esse problema aparece quando o SMA detecta o uso de um elemento Spark que não é compatível com o Snowpark e que não tem seu próprio código de erro associado a ele. Esse é um código de erro genérico usado pelo SMA para qualquer elemento Spark sem suporte.
Cenário¶
Entrada
Abaixo está um exemplo de um elemento Spark que não é compatível com o Snowpark e, portanto, gera este EWI.
Saída
The SMA adds the EWI SPRKSCL1112 to the output code to let you know that this element is not supported by Snowpark.
Correção recomendada
Como esse é um código de erro genérico que se aplica a uma série de funções sem suporte, não há uma correção única e específica. A ação apropriada dependerá do elemento específico em uso.
Observe que, mesmo que o elemento não seja compatível, isso não significa necessariamente que não seja possível encontrar uma solução ou solução alternativa. Isso significa apenas que o próprio SMA não consegue encontrar a solução.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1143¶
Mensagem: Ocorreu um erro ao carregar a tabela de símbolos
Categoria: Erro de conversão
Descrição¶
Esse problema aparece quando há um erro ao carregar os símbolos da tabela de símbolos do SMA. A tabela de símbolos faz parte da arquitetura subjacente do SMA, permitindo conversões mais complexas.
Recomendações adicionais¶
This is unlikely to be an error in the source code itself, but rather is an error in how the SMA processes the source code. The best resolution would be to post an issue in the SMA.
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1153¶
Aviso
This issue code has been deprecated since Spark Conversion Core Version 4.3.2
Mensagem: org.apache.spark.sql.functions.max tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.max function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.max function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1153 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent max function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1102¶
This issue code has been deprecated since Spark Conversion Core 2.3.22
Mensagem: Explode não é suportado
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.explode function, which is not supported by Snowpark.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.explode function used to get the consolidated information of the array fields of the dataset.
Saída
The SMA adds the EWI SPRKSCL1102 to the output code to let you know that this function is not supported by Snowpark.
Correção recomendada
Since explode is not supported by Snowpark, the function flatten could be used as a substitute.
A correção a seguir cria o achatamento do dataframe dfExplode e, em seguida, faz a consulta para replicar o resultado no Spark.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1136¶
Aviso
This issue code is deprecated since Spark Conversion Core 4.3.2
Mensagem: org.apache.spark.sql.functions.min tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.min function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.min function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1136 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent min function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that takes a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1167¶
Mensagem: Arquivo de projeto não encontrado na pasta de entrada
Categoria: Aviso
Descrição¶
Esse problema aparece quando o SMA detecta que a pasta de entrada não tem nenhum arquivo de configuração de projeto. Os arquivos de configuração de projeto compatíveis com o SMA são os seguintes:
build.sbt
build.gradle
pom.xml
Recomendações adicionais¶
Inclua um arquivo de projeto de configuração na pasta de entrada.
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1147¶
Mensagem: org.apache.spark.sql.functions.tanh tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.tanh function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.tanh function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1147 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent tanh function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1116¶
Aviso
This issue code has been deprecated since Spark Conversion Core Version 2.40.1
Mensagem: org.apache.spark.sql.functions.split tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.split function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.split function that generates this EWI.
Saída
The SMA adds the EWI SPRKSCL1116 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
For the Spark overload that receives two arguments, you can convert the second argument into a column object using the com.snowflake.snowpark.functions.lit function as a workaround.
A sobrecarga que recebe três argumentos ainda não é compatível com o Snowpark e não há solução alternativa.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1122¶
Mensagem: org.apache.spark.sql.functions.corr tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.corr function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.corr function, first used with column names as the arguments and then with column objects.
Saída
The SMA adds the EWI SPRKSCL1122 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent corr function that receives two column objects as arguments. For that reason, the Spark overload that receives column objects as arguments is directly supported by Snowpark and does not require any changes.
For the overload that receives two string arguments, you can convert the strings into column objects using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1173¶
Mensagem: o código SQL incorporado não pode ser processado.
Categoria: Aviso.
Descrição¶
Esse problema aparece quando o SMA detecta um código SQL incorporado que não pode ser processado. Então, o código SQL incorporado não pode ser convertido para o Snowflake.
Cenário¶
Entrada
Abaixo está um exemplo de um código SQL incorporado que não pode ser processado.
Saída
The SMA adds the EWI SPRKSCL1173 to the output code to let you know that the SQL-embedded code can not be processed.
Correção recomendada
Certifique-se de que o código SQL incorporado seja uma cadeia de caracteres sem interpolações, variáveis ou concatenações de cadeia de caracteres.
Recomendações adicionais¶
You can find more information about SQL-embedded here.
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1163¶
Mensagem: O elemento não é um literal e não pode ser avaliado.
Categoria: Erro de conversão.
Descrição¶
Esse problema ocorre quando o elemento de processamento atual não é um literal e, portanto, não pode ser avaliado pelo SMA.
Cenário¶
Entrada
Veja a seguir um exemplo de quando o elemento a ser processado não é um literal e não pode ser avaliado pelo SMA.
Saída
The SMA adds the EWI SPRKSCL1163 to the output code to let you know that format_type parameter is not a literal and it can not be evaluated by the SMA.
Correção recomendada
Certifique-se de que o valor da variável seja válido para evitar comportamentos inesperados.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1132¶
Mensagem: org.apache.spark.sql.functions.grouping_id tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.grouping_id function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.grouping_id function, first used with multiple column name as arguments and then with column objects.
Saída
The SMA adds the EWI SPRKSCL1132 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent grouping_id function that receives multiple column objects as arguments. For that reason, the Spark overload that receives multiple column objects as arguments is directly supported by Snowpark and does not require any changes.
For the overload that receives multiple string arguments, you can convert the strings into column objects using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1106¶
Aviso
Este código de problema está obsoleto
Mensagem: A opção Writer não é suportada.
Categoria: Erro de conversão.
Descrição¶
Esse problema aparece quando a ferramenta detecta, na instrução writer, o uso de uma opção não suportada pelo Snowpark.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.DataFrameWriter.option used to add options to a writer statement.
Saída
The SMA adds the EWI SPRKSCL1106 to the output code to let you know that the option method is not supported by Snowpark.
Correção recomendada
Não há nenhuma correção recomendada para esse cenário
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1157¶
Mensagem: org.apache.spark.sql.functions.kurtosis tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.kurtosis function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.kurtosis function that generates this EWI. In this example, the kurtosis function is used to calculate the kurtosis of selected column.
Saída
The SMA adds the EWI SPRKSCL1157 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent kurtosis function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1146¶
Mensagem: org.apache.spark.sql.functions.tan tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.tan function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.tan function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1146 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent tan function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1117¶
Aviso
This issue code is deprecated since Spark Conversion Core 2.40.1
Mensagem: org.apache.spark.sql.functions.translate tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.translate function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.translate function that generates this EWI. In this example, the translate function is used to replace the characters “a”, “e” and “o” in each word with “1”, “2” and “3”, respectively.
Saída
The SMA adds the EWI SPRKSCL1117 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
As a workaround, you can convert the second and third argument into a column object using the com.snowflake.snowpark.functions.lit function.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1123¶
Mensagem: org.apache.spark.sql.functions.cos tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.cos function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.cos function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1123 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent cos function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1172¶
Mensagem: O Snowpark não oferece suporte a StructFiled com parâmetro de metadados.
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects that org.apache.spark.sql.types.StructField.apply with org.apache.spark.sql.types.Metadata as parameter. This is because Snowpark does not supported the metadata parameter.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.types.StructField.apply function that generates this EWI. In this example, the apply function is used to generate and instance of StructField.
Saída
The SMA adds the EWI SPRKSCL1172 to the output code to let you know that metadata parameter is not supported by Snowflake.
Correção recomendada
Snowpark has an equivalent com.snowflake.snowpark.types.StructField.apply function that receives three parameters. Then, as workaround, you can try to remove the metadata argument.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1162¶
Nota
Este código de problema está obsoleto
Mensagem: Ocorreu um erro ao extrair os arquivos dbc.
Categoria: Aviso.
Descrição¶
Esse problema aparece quando um arquivo dbc não pode ser extraído. Esse aviso pode ser causado por um ou mais dos seguintes motivos: muito pesado, inacessível, somente leitura, etc.
Recomendações adicionais¶
Como solução alternativa, você pode verificar o tamanho do arquivo se ele for muito pesado para ser processado. Além disso, analise se a ferramenta pode acessá-la para evitar problemas de acesso.
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1133¶
Mensagem: org.apache.spark.sql.functions.least tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.least function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.least function, first used with multiple column name as arguments and then with column objects.
Saída
The SMA adds the EWI SPRKSCL1133 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent least function that receives multiple column objects as arguments. For that reason, the Spark overload that receives multiple column objects as arguments is directly supported by Snowpark and does not require any changes.
For the overload that receives multiple string arguments, you can convert the strings into column objects using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1107¶
Aviso
Este código de problema está obsoleto
Mensagem: Não há suporte para salvar Write.
Categoria: Erro de conversão.
Descrição¶
Esse problema aparece quando a ferramenta detecta, na instrução writer, o uso de um método para salvar writer que não é compatível com o Snowpark.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.DataFrameWriter.save used to save the DataFrame content.
Saída
The SMA adds the EWI SPRKSCL1107 to the output code to let you know that the save method is not supported by Snowpark.
Correção recomendada
Não há nenhuma correção recomendada para esse cenário
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1156¶
Mensagem: org.apache.spark.sql.functions.degrees tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.degrees function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.degrees function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1156 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent degrees function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1127¶
Mensagem: org.apache.spark.sql.functions.covar_samp tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.covar_samp function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.covar_samp function, first used with column names as the arguments and then with column objects.
Saída
The SMA adds the EWI SPRKSCL1127 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent covar_samp function that receives two column objects as arguments. For that reason, the Spark overload that receives two column objects as arguments is directly supported by Snowpark and does not require any changes.
For the overload that receives two string arguments, you can convert the strings into column objects using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1113¶
Mensagem: org.apache.spark.sql.functions.next_day tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.next_day function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.next_day function, first used with a string as the second argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1113 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent next_day function that receives two column objects as arguments. For that reason, the Spark overload that receives two column objects as arguments is directly supported by Snowpark and does not require any changes.
For the overload that receives a column object and a string, you can convert the string into a column object using the com.snowflake.snowpark.functions.lit function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1002¶
Message: This code section has recovery from parsing errors *statement*
Categoria: Erro de análise.
Descrição¶
Esse problema aparece quando o SMA detecta alguma instrução que não pode ser lida ou compreendida corretamente no código de um arquivo, o que é chamado de erro de análise, mas o SMA pode se recuperar desse erro de análise e continuar analisando o código do arquivo. Nesse caso, o SMA consegue processar o código do arquivo sem erros.
Cenário¶
Entrada
Abaixo está um exemplo de código Scala inválido em que o SMA pode se recuperar.
Saída
The SMA adds the EWI SPRKSCL1002 to the output code to let you know that the code of the file has parsing errors, however the SMA can recovery from that error and continue analyzing the code of the file.
Correção recomendada
Como a mensagem aponta o erro na instrução, você pode tentar identificar a sintaxe inválida e removê-la ou comentar essa instrução para evitar o erro de análise.
Recomendações adicionais¶
Verifique se o código do arquivo é um código Scala válido.
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1142¶
Message: *spark element* is not defined
Categoria: Erro de conversão
Descrição¶
Esse problema aparece quando o SMA não consegue determinar um status de mapeamento apropriado para um determinado elemento. Isso significa que o SMA ainda não sabe se esse elemento é compatível ou não com o Snowpark. Observe que esse é um código de erro genérico usado pelo SMA para qualquer elemento não definido.
Cenário¶
Entrada
Below is an example of a function for which the SMA could not determine an appropriate mapping status, and therefore it generated this EWI. In this case, you should assume that notDefinedFunction() is a valid Spark function and the code runs.
Saída
The SMA adds the EWI SPRKSCL1142 to the output code to let you know that this element is not defined.
Correção recomendada
Para tentar identificar o problema, você pode realizar as seguintes validações:
Verifique se é um elemento Spark válido.
Verifique se o elemento tem a sintaxe correta e se está escrito corretamente.
Verifique se está usando uma versão do Spark compatível com o SMA.
If this is a valid Spark element, please report that you encountered a conversion error on that particular element using the Report an Issue option of the SMA and include any additional information that you think may be helpful.
Please note that if an element is not defined by the SMA, it does not mean necessarily that it is not supported by Snowpark. You should check the Snowpark Documentation to verify if an equivalent element exist.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1152¶
Mensagem: org.apache.spark.sql.functions.variance tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.variance function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.variance function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1152 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent variance function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1103¶
Este código de problema está obsoleto
Message: SparkBuilder method is not supported *method name*
Categoria: Erro de conversão
Descrição¶
Esse problema aparece quando o SMA detecta um método que não é compatível com o Snowflake no encadeamento de métodos do SparkBuilder. Portanto, isso pode afetar a migração da instrução reader.
A seguir, estão os métodos SparkBuilder não suportados:
master
appName
enableHiveSupport
withExtensions
Cenário¶
Entrada
Abaixo está um exemplo de um encadeamento de métodos SparkBuilder com muitos métodos que não são compatíveis com o Snowflake.
Saída
The SMA adds the EWI SPRKSCL1103 to the output code to let you know that master, appName and enableHiveSupport methods are not supported by Snowpark. Then, it might affects the migration of the Spark Session statement.
Correção recomendada
Para criar a sessão, é necessário adicionar a configuração adequada do Snowflake Snowpark.
Neste exemplo, é usada uma variável configs.
Também é recomendado o uso de um configFile (profile.properties) com as informações de conexão:
And with the Session.builder.configFile the session can be created:
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1137¶
Mensagem: org.apache.spark.sql.functions.sin tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.sin function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.sin function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1137 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent sin function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1166¶
Nota
Este código de problema está obsoleto
Mensagem: org.apache.spark.sql.DataFrameReader.format não é compatível.
Categoria: Aviso.
Descrição¶
This issue appears when the org.apache.spark.sql.DataFrameReader.format has an argument that is not supported by Snowpark.
Cenários¶
There are some scenarios depending on the type of format you are trying to load. It can be a supported, or non-supported format.
Cenário 1¶
Entrada
A ferramenta analisa o tipo de formato que está tentando carregar; os formatos compatíveis são:
csvjsonorcparquettext
The below example shows how the tool transforms the format method when passing a csv value.
Saída
The tool transforms the format method into a csv method call when load function has one parameter.
Correção recomendada
Nesse caso, a ferramenta não mostra o EWI, o que significa que não há necessidade de correção.
Cenário 2¶
Entrada
The below example shows how the tool transforms the format method when passing a net.snowflake.spark.snowflake value.
Saída
The tool shows the EWI SPRKSCL1166 indicating that the value net.snowflake.spark.snowflake is not supported.
Correção recomendada
For the not supported scenarios there is no specific fix since it depends on the files that are trying to be read.
Cenário 3¶
Entrada
The below example shows how the tool transforms the format method when passing a csv, but using a variable instead.
Saída
Since the tool can not determine the value of the variable in runtime, shows the EWI SPRKSCL1163 indicating that the value is not supported.
Correção recomendada
As a workaround, you can check the value of the variable and add it as a string to the format call.
Recomendações adicionais¶
The Snowpark location only accepts cloud locations using a snowflake stage.
The documentation of methods supported by Snowpark can be found in the documentation
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1118¶
Mensagem: org.apache.spark.sql.functions.trunc tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.trunc function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.trunc function that generates this EWI.
Saída
The SMA adds the EWI SPRKSCL1118 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
As a workaround, you can convert the second argument into a column object using the com.snowflake.snowpark.functions.lit function.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1149¶
Mensagem: org.apache.spark.sql.functions.toRadians tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.toRadians function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.toRadians function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1149 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
As a workaround, you can use the radians function. For the Spark overload that receives a string argument, you additionally have to convert the string into a column object using the com.snowflake.snowpark.functions.col function.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1159¶
Mensagem: org.apache.spark.sql.functions.stddev_samp tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.stddev_samp function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.stddev_samp function that generates this EWI. In this example, the stddev_samp function is used to calculate the sample standard deviation of selected column.
Saída
The SMA adds the EWI SPRKSCL1159 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent stddev_samp function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1108¶
Nota
Este código de problema está obsoleto.
Mensagem: org.apache.spark.sql.DataFrameReader.format não é compatível.
Categoria: Aviso.
Descrição¶
This issue appears when the org.apache.spark.sql.DataFrameReader.format has an argument that is not supported by Snowpark.
Cenários¶
There are some scenarios depending on the type of format you are trying to load. It can be a supported, or non-supported format.
Cenário 1¶
Entrada
A ferramenta analisa o tipo de formato que está tentando carregar; os formatos compatíveis são:
csvjsonorcparquettext
The below example shows how the tool transforms the format method when passing a csv value.
Saída
The tool transforms the format method into a csv method call when load function has one parameter.
Correção recomendada
Nesse caso, a ferramenta não mostra o EWI, o que significa que não há necessidade de correção.
Cenário 2¶
Entrada
The below example shows how the tool transforms the format method when passing a net.snowflake.spark.snowflake value.
Saída
The tool shows the EWI SPRKSCL1108 indicating that the value net.snowflake.spark.snowflake is not supported.
Correção recomendada
For the not supported scenarios there is no specific fix since it depends on the files that are trying to be read.
Cenário 3¶
Entrada
The below example shows how the tool transforms the format method when passing a csv, but using a variable instead.
Saída
Since the tool can not determine the value of the variable in runtime, shows the EWI SPRKSCL1163 indicating that the value is not supported.
Correção recomendada
As a workaround, you can check the value of the variable and add it as a string to the format call.
Recomendações adicionais¶
The Snowpark location only accepts cloud locations using a snowflake stage.
The documentation of methods supported by Snowpark can be found in the documentation
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1128¶
Mensagem: org.apache.spark.sql.functions.exp tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.exp function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.exp function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1128 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent exp function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1169¶
Message: *Spark element* is missing on the method chaining.
Categoria: Aviso.
Descrição¶
Esse problema aparece quando o SMA detecta que está faltando uma chamada de elemento Spark no encadeamento do método. O SMA precisa conhecer esse elemento Spark para analisar a instrução.
Cenário¶
Entrada
Abaixo está um exemplo em que a chamada de função de carregamento está ausente no encadeamento de métodos.
Saída
The SMA adds the EWI SPRKSCL1169 to the output code to let you know that load function call is missing on the method chaining and SMA can not analyze the statement.
Correção recomendada
Certifique-se de que todas as chamadas de função do encadeamento de métodos estejam na mesma instrução.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1138¶
Mensagem: org.apache.spark.sql.functions.sinh tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.sinh function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.sinh function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1138 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent sinh function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1129¶
Mensagem: org.apache.spark.sql.functions.floor tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.floor function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.floor function, first used with a column name as an argument, then with a column object and finally with two column objects.
Saída
The SMA adds the EWI SPRKSCL1129 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent floor function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
For the overload that receives a column object and a scale, you can use the callBuiltin function to invoke the Snowflake builtin FLOOR function. To use it, you should pass the string «floor» as the first argument, the column as the second argument and the scale as the third argument.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1168¶
Message: *Spark element* with argument(s) value(s) *given arguments* is not supported.
Categoria: Aviso.
Descrição¶
Esse problema aparece quando o SMA detecta que o elemento Spark com os parâmetros fornecidos não é compatível.
Cenário¶
Entrada
Abaixo está um exemplo de elemento Spark cujo parâmetro não é suportado.
Saída
The SMA adds the EWI SPRKSCL1168 to the output code to let you know that Spark element with the given parameter is not supported.
Correção recomendada
Para esse cenário, não há uma correção específica.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1139¶
Mensagem: org.apache.spark.sql.functions.sqrt tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.sqrt function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.sqrt function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1139 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent sqrt function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1119¶
Mensagem: org.apache.spark.sql.Column.endsWith tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.Column.endsWith function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.Column.endsWith function, first used with a literal string argument and then with a column object argument.
Saída
The SMA adds the EWI SPRKSCL1119 to the output code to let you know that this function is not directly supported by Snowpark, but it has a workaround.
Correção recomendada
As a workaround, you can use the com.snowflake.snowpark.functions.endswith function, where the first argument would be the column whose values will be checked and the second argument the suffix to check against the column values. Please note that if the argument of the Spark’s endswith function is a literal string, you should convert it into a column object using the com.snowflake.snowpark.functions.lit function.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1148¶
Mensagem: org.apache.spark.sql.functions.toDegrees tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.toDegrees function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.toDegrees function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1148 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
As a workaround, you can use the degrees function. For the Spark overload that receives a string argument, you additionally have to convert the string into a column object using the com.snowflake.snowpark.functions.col function.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1158¶
Mensagem: org.apache.spark.sql.functions.skewness tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.skewness function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.skewness function that generates this EWI. In this example, the skewness function is used to calculate the skewness of selected column.
Saída
The SMA adds the EWI SPRKSCL1158 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent skew function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1109¶
Nota
Este código de problema está obsoleto
Mensagem: O parâmetro não está definido para org.apache.spark.sql.DataFrameReader.option
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects that giving parameter of org.apache.spark.sql.DataFrameReader.option is not defined.
Cenário¶
Entrada
Below is an example of undefined parameter for org.apache.spark.sql.DataFrameReader.option function.
Saída
The SMA adds the EWI SPRKSCL1109 to the output code to let you know that giving parameter to the org.apache.spark.sql.DataFrameReader.option function is not defined.
Correção recomendada
Check the Snowpark documentation for reader format option here, in order to identify the defined options.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1114¶
Mensagem: org.apache.spark.sql.functions.repeat tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.repeat function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.repeat function that generates this EWI.
Saída
The SMA adds the EWI SPRKSCL1114 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
As a workaround, you can convert the second argument into a column object using the com.snowflake.snowpark.functions.lit function.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1145¶
Mensagem: org.apache.spark.sql.functions.sumDistinct tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.sumDistinct function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.sumDistinct function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1145 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
As a workaround, you can use the sum_distinct function. For the Spark overload that receives a string argument, you additionally have to convert the string into a column object using the com.snowflake.snowpark.functions.col function.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1171¶
Mensagem: O Snowpark não oferece suporte a funções de divisão com mais de dois parâmetros ou que contenham um padrão regex. Consulte a documentação para obter mais informações.
Categoria: Aviso.
Descrição¶
This issue appears when the SMA detects that org.apache.spark.sql.functions.split has more than two parameters or containing regex pattern.
Cenários¶
The split function is used to separate the given column around matches of the given pattern. This Spark function has three overloads.
Cenário 1¶
Entrada
Below is an example of the org.apache.spark.sql.functions.split function that generates this EWI. In this example, the split function has two parameters and the second argument is a string, not a regex pattern.
Saída
The SMA adds the EWI SPRKSCL1171 to the output code to let you know that this function is not fully supported by Snowpark.
Correção recomendada
Snowpark has an equivalent split function that receives a column object as a second argument. For that reason, the Spark overload that receives a string argument in the second argument, but it is not a regex pattern, can convert the string into a column object using the com.snowflake.snowpark.functions.lit function as a workaround.
Cenário 2¶
Entrada
Below is an example of the org.apache.spark.sql.functions.split function that generates this EWI. In this example, the split function has two parameters and the second argument is a regex pattern.
Saída
The SMA adds the EWI SPRKSCL1171 to the output code to let you know that this function is not fully supported by Snowpark because regex patterns are not supported by Snowflake.
Correção recomendada
Como o Snowflake não oferece suporte a padrões regex, tente substituir o padrão por uma cadeia de caracteres de padrão não regex.
Cenário 3¶
Entrada
Below is an example of the org.apache.spark.sql.functions.split function that generates this EWI. In this example, the split function has more than two parameters.
Saída
The SMA adds the EWI SPRKSCL1171 to the output code to let you know that this function is not fully supported by Snowpark, because Snowflake does not have a split function with more than two parameters.
Correção recomendada
Como o Snowflake não suporta a função split com mais de dois parâmetros, tente usar a função split suportada pelo Snowflake.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1120¶
Mensagem: org.apache.spark.sql.functions.asin tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.asin function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.asin function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1120 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent asin function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1130¶
Mensagem: org.apache.spark.sql.functions.greatest tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.greatest function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.greatest function, first used with multiple column names as arguments and then with multiple column objects.
Saída
The SMA adds the EWI SPRKSCL1130 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent greatest function that receives multiple column objects as arguments. For that reason, the Spark overload that receives column objects as arguments is directly supported by Snowpark and does not require any changes.
For the overload that receives multiple string arguments, you can convert the strings into column objects using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
descrição: >- Snowpark e extensões do Snowpark não foram adicionados ao arquivo de configuração do projeto.
SPRKSCL1161¶
Mensagem: Falha ao adicionar dependências.
Categoria: Erro de conversão.
Descrição¶
Esse problema ocorre quando o SMA detecta uma versão do Spark no arquivo de configuração do projeto que não é compatível com o SMA e, portanto, o SMA não pode adicionar as dependências do Snowpark e extensões do Snowpark ao arquivo de configuração do projeto correspondente. Se as dependências do Snowpark não forem adicionadas, o código migrado não será compilado.
Cenários¶
Há três cenários possíveis: sbt, gradle e pom.xml. O SMA tenta processar o arquivo de configuração do projeto removendo as dependências do Spark e adicionando as dependências do Snowpark e extensões do Snowpark.
Cenário 1¶
Entrada
Below is an example of the dependencies section of a sbt project configuration file.
Saída
The SMA adds the EWI SPRKSCL1161 to the issues inventory since the Spark version is not supported and keeps the output the same.
Correção recomendada
Manually, remove the Spark dependencies and add Snowpark and Snowpark Extensions dependencies to the sbt project configuration file.
Certifique-se de usar a versão do Snowpark que melhor atenda aos requisitos do seu projeto.
Cenário 2¶
Entrada
Below is an example of the dependencies section of a gradle project configuration file.
Saída
The SMA adds the EWI SPRKSCL1161 to the issues inventory since the Spark version is not supported and keeps the output the same.
Correção recomendada
Manually, remove the Spark dependencies and add Snowpark and Snowpark Extensions dependencies to the gradle project configuration file.
Certifique-se de que a versão das dependências esteja de acordo com as necessidades de seu projeto.
Cenário 3¶
Entrada
Below is an example of the dependencies section of a pom.xml project configuration file.
Saída
The SMA adds the EWI SPRKSCL1161 to the issues inventory since the Spark version is not supported and keeps the output the same.
Correção recomendada
Manually, remove the Spark dependencies and add Snowpark and Snowpark Extensions dependencies to the gradle project configuration file.
Certifique-se de que a versão das dependências esteja de acordo com as necessidades de seu projeto.
Recomendações adicionais¶
Certifique-se de que a entrada tenha um arquivo de configuração de projeto:
build.sbt
build.gradle
pom.xml
A versão do Spark suportada pelo SMA é 2.12:3.1.2
You can check the latest Snowpark version here.
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1155¶
Aviso
This issue code has been deprecated since Spark Conversion Core Version 4.3.2
Mensagem: org.apache.spark.sql.functions.countDistinct tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.countDistinct function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.countDistinct function, first used with column names as arguments and then with column objects.
Saída
The SMA adds the EWI SPRKSCL1155 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
As a workaround, you can use the count_distinct function. For the Spark overload that receives string arguments, you additionally have to convert the strings into column objects using the com.snowflake.snowpark.functions.col function.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1104¶
Este código de problema está obsoleto
Mensagem: A opção Spark Session builder não é suportada.
Categoria: Erro de conversão.
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.SparkSession.Builder.config function, which is setting an option of the Spark Session and it is not supported by Snowpark.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.SparkSession.Builder.config function used to set an option in the Spark Session.
Saída
The SMA adds the EWI SPRKSCL1104 to the output code to let you know config method is not supported by Snowpark. Then, it is not possible to set options in the Spark Session via config function and it might affects the migration of the Spark Session statement.
Correção recomendada
Para criar a sessão, é necessário adicionar a configuração adequada do Snowflake Snowpark.
Neste exemplo, é usada uma variável configs.
Também é recomendado o uso de um configFile (profile.properties) com as informações de conexão:
And with the Session.builder.configFile the session can be created:
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1124¶
Mensagem: org.apache.spark.sql.functions.cosh tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.cosh function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.cosh function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1124 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent cosh function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1175¶
Message: The two-parameter udf function is not supported in Snowpark. It should be converted into a single-parameter udf function. Please check the documentation to learn how to manually modify the code to make it work in Snowpark.
Categoria: Erro de conversão.
Descrição¶
This issue appears when the SMA detects an use of the two-parameter org.apache.spark.sql.functions.udf function in the source code, because Snowpark does not have an equivalent two-parameter udf function, then the output code might not compile.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.udf function that generates this EWI. In this example, the udf function has two parameters.
Saída
The SMA adds the EWI SPRKSCL1175 to the output code to let you know that the udf function is not supported, because it has two parameters.
Correção recomendada
Snowpark only supports the single-parameter udf function (without the return type parameter), so you should convert your two-parameter udf function into a single-parameter udf function in order to make it work in Snowpark.
Por exemplo, para o código de amostra mencionado acima, você teria que convertê-lo manualmente para isso:
Please note that there are some caveats about creating udf in Snowpark that might require you to make some additional manual changes to your code. Please check this other recommendations here related with creating single-parameter udf functions in Snowpark for more details.
Recomendações adicionais¶
To learn more about how to create user-defined functions in Snowpark, please refer to the following documentation: Creating User-Defined Functions (UDFs) for DataFrames in Scala
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1001¶
Message: This code section has parsing errors. The parsing error was found at: line *line number*, column *column number*. When trying to parse *statement*. This file was not converted, so it is expected to still have references to the Spark API.
Categoria: Erro de análise.
Descrição¶
Esse problema aparece quando o SMA detecta alguma instrução que não pode ser lida ou compreendida corretamente no código de um arquivo, o que é chamado de erro de análise. Além disso, esse problema aparece quando um arquivo tem um ou mais erros de análise.
Cenário¶
Entrada
Abaixo está um exemplo de código Scala inválido.
Saída
The SMA adds the EWI SPRKSCL1001 to the output code to let you know that the code of the file has parsing errors. Therefore, SMA is not able to process a file with this error.
Correção recomendada
Como a mensagem aponta o erro na instrução, você pode tentar identificar a sintaxe inválida e removê-la ou comentar essa instrução para evitar o erro de análise.
Recomendações adicionais¶
Verifique se o código do arquivo é um código Scala válido.
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1141¶
Mensagem: org.apache.spark.sql.functions.stddev_pop tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.stddev_pop function, which has a workaround.
Cenário¶
Below is an example of the org.apache.spark.sql.functions.stddev_pop function, first used with a column name as an argument and then with a column object.
Entrada
Saída
The SMA adds the EWI SPRKSCL1141 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent stddev_pop function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1110¶
Nota
Este código de problema está obsoleto
Message: Reader method not supported *method name*.
Categoria: Aviso
Descrição¶
Esse problema aparece quando o SMA detecta um método que não é compatível com o Snowflake no encadeamento de métodos do DataFrameReader. Então, isso pode afetar a migração da instrução reader.
Cenário¶
Entrada
Abaixo está um exemplo de um encadeamento de método DataFrameReader em que o método de carregamento não é suportado no Snowflake.
Saída
The SMA adds the EWI SPRKSCL1110 to the output code to let you know that load method is not supported by Snowpark. Then, it might affects the migration of the reader statement.
Correção recomendada
Check the Snowpark documentation for reader here, in order to know the supported methods by Snowflake.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1100¶
This issue code has been deprecated since Spark Conversion Core 2.3.22
Mensagem: A repartição não é suportada.
Categoria: Erro de análise.
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.DataFrame.repartition function, which is not supported by Snowpark. Snowflake manages the storage and the workload on the clusters making repartition operation inapplicable.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.DataFrame.repartition function used to return a new DataFrame partitioned by the given partitioning expressions.
Saída
The SMA adds the EWI SPRKSCL1100 to the output code to let you know that this function is not supported by Snowpark.
Correção recomendada
Como o Snowflake gerencia o armazenamento e a carga de trabalho nos clusters, a operação de repartição não é aplicável. Isso significa que o uso da repartição antes da união não é necessário.
Recomendações adicionais¶
The Snowflake’s architecture guide provides insight about Snowflake storage management.
Snowpark Dataframe reference could be useful in how to adapt a particular scenario without the need of repartition.
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1151¶
Mensagem: org.apache.spark.sql.functions.var_samp tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.var_samp function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.var_samp function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1151 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent var_samp function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
descrição: >- O formato de reader no encadeamento do método DataFrameReader não é um dos definidos pelo Snowpark.
SPRKSCL1165¶
Mensagem: O formato de reader no encadeamento do método DataFrameReader não pode ser definido
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects that format of the reader in DataFrameReader method chaining is not one of the following supported for Snowpark: avro, csv, json, orc, parquet and xml. Therefore, the SMA can not determine if setting options are defined or not.
Cenário¶
Entrada
Abaixo está um exemplo de encadeamento do método DataFrameReader em que o SMA pode determinar o formato do leitor.
Saída
The SMA adds the EWI SPRKSCL1165 to the output code to let you know that format of the reader can not be determine in the giving DataFrameReader method chaining.
Correção recomendada
Check the Snowpark documentation here to get more information about format of the reader.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1134¶
Mensagem: org.apache.spark.sql.functions.log tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.log function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.log function that generates this EWI.
Saída
The SMA adds the EWI SPRKSCL1134 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Below are the different workarounds for all the overloads of the log function.
1. def log(base: Double, columnName: String): Column
You can convert the base into a column object using the com.snowflake.snowpark.functions.lit function and convert the column name into a column object using the com.snowflake.snowpark.functions.col function.
2. def log(base: Double, a: Column): Column
You can convert the base into a column object using the com.snowflake.snowpark.functions.lit function.
3.def log(columnName: String): Column
You can pass lit(Math.E) as the first argument and convert the column name into a column object using the com.snowflake.snowpark.functions.col function and pass it as the second argument.
4. def log(e: Column): Column
You can pass lit(Math.E) as the first argument and the column object as the second argument.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1125¶
Aviso
This issue code is deprecated since Spark Conversion Core 2.9.0
Mensagem: org.apache.spark.sql.functions.count tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.count function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.count function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1125 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent count function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1174¶
Message: The single-parameter udf function is supported in Snowpark but it might require manual intervention. Please check the documentation to learn how to manually modify the code to make it work in Snowpark.
Categoria: Aviso.
Descrição¶
This issue appears when the SMA detects an use of the single-parameter org.apache.spark.sql.functions.udf function in the code. Then, it might require a manual intervention.
The Snowpark API provides an equivalent com.snowflake.snowpark.functions.udf function that allows you to create a user-defined function from a lambda or function in Scala, however, there are some caveats about creating udf in Snowpark that might require you to make some manual changes to your code in order to make it work properly.
Cenários¶
The Snowpark udf function should work as intended for a wide range of cases without requiring manual intervention. However, there are some scenarios that would requiere you to manually modify your code in order to get it work in Snowpark. Some of those scenarios are listed below:
Cenário 1¶
Entrada
Veja a seguir um exemplo de criação de UDFs em um objeto com o App Trait.
The Scala’s App trait simplifies creating executable programs by providing a main method that automatically runs the code within the object definition. Extending App delays the initialization of the fields until the main method is executed, which can affect the UDFs definitions if they rely on initialized fields. This means that if an object extends App and the udf references an object field, the udf definition uploaded to Snowflake will not include the initialized value of the field. This can result in null values being returned by the udf.
For example, in the following code the variable myValue will resolve to null in the udf definition:
Saída
The SMA adds the EWI SPRKSCL1174 to the output code to let you know that the single-parameter udf function is supported in Snowpark but it requires manual intervention.
Correção recomendada
To avoid this issue, it is recommended to not extend App and implement a separate main method for your code. This ensure that object fields are initialized before udf definitions are created and uploaded to Snowflake.
For more details about this topic, see Caveat About Creating UDFs in an Object With the App Trait.
Cenário 2¶
Entrada
Veja abaixo um exemplo de criação de UDFs no Jupyter Notebooks.
Saída
The SMA adds the EWI SPRKSCL1174 to the output code to let you know that the single-parameter udf function is supported in Snowpark but it requires manual intervention.
Correção recomendada
To create a udf in a Jupyter Notebook, you should define the implementation of your function in a class that extends Serializable. For example, you should manually convert it into this:
For more details about how to create UDFs in Jupyter Notebooks, see Creating UDFs in Jupyter Notebooks.
Recomendações adicionais¶
To learn more about how to create user-defined functions in Snowpark, please refer to the following documentation: Creating User-Defined Functions (UDFs) for DataFrames in Scala
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1000¶
Message: Source project spark-core version is *version number*, the spark-core version supported by snowpark is 2.12:3.1.2 so there may be functional differences between the existing mappings
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a version of the spark-core that is not supported by SMA. Therefore, there may be functional differences between the existing mappings and the output might have unexpected behaviors.
Recomendações adicionais¶
A versão do spark-core suportada pelo SMA é 2.12:3.1.2. Considere a possibilidade de alterar a versão de seu código-fonte.
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1140¶
Mensagem: org.apache.spark.sql.functions.stddev tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.stddev function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.stddev function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1140 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent stddev function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1111¶
Nota
Este código de problema está obsoleto
Mensagem: CreateDecimalType não é compatível.
Categoria: Erro de conversão.
Descrição¶
This issue appears when the SMA detects a usage org.apache.spark.sql.types.DataTypes.CreateDecimalType function.
Cenário¶
Entrada
Veja a seguir um exemplo de uso da função org.apache.spark.sql.types.DataTypes.CreateDecimalType.
Saída
The SMA adds the EWI SPRKSCL1111 to the output code to let you know that CreateDecimalType function is not supported by Snowpark.
Correção recomendada
Ainda não há uma correção recomendada.
Mensagem: A opção Spark Session builder não é suportada.
Categoria: Erro de conversão.
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.SparkSession.Builder.config function, which is setting an option of the Spark Session and it is not supported by Snowpark.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.SparkSession.Builder.config function used to set an option in the Spark Session.
Saída
The SMA adds the EWI SPRKSCL1104 to the output code to let you know config method is not supported by Snowpark. Then, it is not possible to set options in the Spark Session via config function and it might affects the migration of the Spark Session statement.
Correção recomendada
Para criar a sessão, é necessário adicionar a configuração adequada do Snowflake Snowpark.
Neste exemplo, é usada uma variável configs.
Também é recomendado o uso de um configFile (profile.properties) com as informações de conexão:
And with the Session.builder.configFile the session can be created:
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1101¶
This issue code has been deprecated since Spark Conversion Core 2.3.22
Mensagem: Broadcast não é suportado
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.broadcast function, which is not supported by Snowpark. This function is not supported because Snowflake does not support broadcast variables.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.broadcast function used to create a broadcast object to use on each Spark cluster:
Saída
The SMA adds the EWI SPRKSCL1101 to the output code to let you know that this function is not supported by Snowpark.
Correção recomendada
Como o Snowflake gerencia o armazenamento e a carga de trabalho nos clusters, os objetos broadcast não são aplicáveis. Isso significa que o uso de broadcast pode não ser necessário, mas cada caso deve exigir uma análise mais detalhada.
The recommended approach is replace a Spark dataframe broadcast by a Snowpark regular dataframe or by using a dataframe method as Join.
For the proposed input the fix is to adapt the join to use directly the dataframe collegeDF without the use of broadcast for the dataframe.
Recomendações adicionais¶
The Snowflake’s architecture guide provides insight about Snowflake storage management.
Snowpark Dataframe reference could be useful in how to adapt a particular broadcast scenario.
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1150¶
Mensagem: org.apache.spark.sql.functions.var_pop tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.var_pop function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.var_pop function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1150 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent var_pop function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
descrição: >- O parâmetro da função org.apache.spark.sql.DataFrameReader.option não está definido.
SPRKSCL1164¶
Nota
Este código de problema está obsoleto
Mensagem: O parâmetro não está definido para org.apache.spark.sql.DataFrameReader.option
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects that giving parameter of org.apache.spark.sql.DataFrameReader.option is not defined.
Cenário¶
Entrada
Below is an example of undefined parameter for org.apache.spark.sql.DataFrameReader.option function.
Saída
The SMA adds the EWI SPRKSCL1164 to the output code to let you know that giving parameter to the org.apache.spark.sql.DataFrameReader.option function is not defined.
Correção recomendada
Check the Snowpark documentation for reader format option here, in order to identify the defined options.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1135¶
Aviso
This issue code is deprecated since Spark Conversion Core 4.3.2
Mensagem: org.apache.spark.sql.functions.mean tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.mean function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.mean function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1135 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent mean function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1115¶
Aviso
This issue code has been deprecated since Spark Conversion Core Version 4.6.0
Mensagem: org.apache.spark.sql.functions.round tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.round function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.round function that generates this EWI.
Saída
The SMA adds the EWI SPRKSCL1115 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent round function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a column object and a scale, you can convert the scale into a column object using the com.snowflake.snowpark.functions.lit function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1144¶
Mensagem: A tabela de símbolos não pôde ser carregada
Categoria: Erro de análise
Descrição¶
Esse problema aparece quando há um erro crítico no processo de execução do SMA. Como a tabela de símbolos não pode ser carregada, o SMA não pode iniciar o processo de avaliação ou conversão.
Recomendações adicionais¶
This is unlikely to be an error in the source code itself, but rather is an error in how the SMA processes the source code. The best resolution would be to post an issue in the SMA.
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1170¶
Nota
Este código de problema está obsoleto
Mensagem: a chave do membro sparkConfig não é compatível com a chave específica da plataforma.
Categoria: Erro de conversão
Descrição¶
Se você estiver usando uma versão mais antiga, atualize para a mais recente.
Recomendações adicionais¶
Atualize seu aplicativo para a versão mais recente.
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1121¶
Mensagem: org.apache.spark.sql.functions.atan tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.atan function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.atan function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1121 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent atan function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1131¶
Mensagem: org.apache.spark.sql.functions.grouping tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.grouping function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.grouping function, first used with a column name as an argument and then with a column object.
Saída
The SMA adds the EWI SPRKSCL1131 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent grouping function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1160¶
Nota
This issue code has been deprecated since Spark Conversion Core 4.1.0
Mensagem: org.apache.spark.sql.functions.sum tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.sum function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.sum function that generates this EWI. In this example, the sum function is used to calculate the sum of selected column.
Saída
The SMA adds the EWI SPRKSCL1160 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent sum function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1154¶
Mensagem: org.apache.spark.sql.functions.ceil tem uma solução alternativa, consulte a documentação para obter mais informações
Categoria: Aviso
Descrição¶
This issue appears when the SMA detects a use of the org.apache.spark.sql.functions.ceil function, which has a workaround.
Cenário¶
Entrada
Below is an example of the org.apache.spark.sql.functions.ceil function, first used with a column name as an argument, then with a column object and finally with a column object and a scale.
Saída
The SMA adds the EWI SPRKSCL1154 to the output code to let you know that this function is not fully supported by Snowpark, but it has a workaround.
Correção recomendada
Snowpark has an equivalent ceil function that receives a column object as an argument. For that reason, the Spark overload that receives a column object as an argument is directly supported by Snowpark and does not require any changes.
For the overload that receives a string argument, you can convert the string into a column object using the com.snowflake.snowpark.functions.col function as a workaround.
For the overload that receives a column object and a scale, you can use the callBuiltin function to invoke the Snowflake builtin CEIL function. To use it, you should pass the string «ceil» as the first argument, the column as the second argument and the scale as the third argument.
Recomendações adicionais¶
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.
SPRKSCL1105¶
Este código de problema está obsoleto
Mensagem: O valor do formato do writer não é suportado.
Categoria: Erro de conversão
Descrição¶
This issue appears when the org.apache.spark.sql.DataFrameWriter.format has an argument that is not supported by Snowpark.
Cenários¶
There are some scenarios depending on the type of format you are trying to save. It can be a supported, or non-supported format.
Cenário 1¶
Entrada
A ferramenta analisa o tipo de formato que está tentando salvar; os formatos compatíveis são:
csvjsonorcparquettext
Saída
The tool transforms the format method into a csv method call when save function has one parameter.
Correção recomendada
Nesse caso, a ferramenta não mostra o EWI, o que significa que não há necessidade de correção.
Cenário 2¶
Entrada
The below example shows how the tool transforms the format method when passing a net.snowflake.spark.snowflake value.
Saída
The tool shows the EWI SPRKSCL1105 indicating that the value net.snowflake.spark.snowflake is not supported.
Correção recomendada
For the not supported scenarios there is no specific fix since it depends on the files that are trying to be read.
Cenário 3¶
Entrada
The below example shows how the tool transforms the format method when passing a csv, but using a variable instead.
Saída
Since the tool can not determine the value of the variable in runtime, shows the EWI SPRKSCL1163 indicating that the value is not supported.
Correção recomendada
As a workaround, you can check the value of the variable and add it as a string to the format call.
Recomendações adicionais¶
The Snowpark location only accepts cloud locations using a snowflake stage.
The documentation of methods supported by Snowpark can be found in the documentation
For more support, you can email us at sma-support@snowflake.com or post an issue in the SMA.