Код: Выделить всё
command = f'''insert into {NewTable} ({Newcolumn})
select {column} from {Table} {Where}'''
print(command)
df = spark.read.format(snowflake_source_name) \
.options(**snowflake_options) \
.option("query", command) \
.load()
Код: Выделить всё
insert into Process.dim_ICON (ICON,dim_ICON_Key)
select ICON, ROW_NUMBER() OVER (ORDER BY ICON) from APIDATA
Код: Выделить всё
2024-12-01 16:36:44 ERROR error:An error occurred while calling o302.load.
: net.snowflake.client.jdbc.SnowflakeSQLException: SQL compilation error:
syntax error line 1 at position 15 unexpected 'insert'.
syntax error line 1 at position 62 unexpected ')'.
Сценарий должен выполнить запрос
Код: Выделить всё
insert into Process.dim_ICON (ICON,dim_ICON_Key)
select ICON, ROW_NUMBER() OVER (ORDER BY ICON) from APIDATA
Подробнее здесь: https://stackoverflow.com/questions/792 ... turn-error