Call Python to interpolate many values from SQL Server Manager
$10-30 USD
Maksettu toimituksen yhteydessä
Hi, I would like to set my X and Y axis and XY matrix from SQL. Call Python from SQL to resolve many X,Y interpolations (cubic). I have already done part of the job, but I need help to achieve that...
' see attachment
IF OBJECT_ID('tempdb..#X') IS NOT NULL DROP TABLE #X
IF OBJECT_ID('tempdb..#Y') IS NOT NULL DROP TABLE #Y
IF OBJECT_ID('tempdb..#XY') IS NOT NULL DROP TABLE #XY
IF OBJECT_ID('tempdb..#2RESOLVE') IS NOT NULL DROP TABLE #2RESOLVE
SELECT value INTO #X FROM string_split('5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95',',')
SELECT value INTO #Y FROM string_split('30,60,90,180,270,360,540',',')
SELECT * INTO #XY FROM
(
SELECT 1 as Col1,2 as Col2,3 as Col3,4 as Col4,5 as Col5,6 as Col6, 7 as Col7,8 as Col8,9 as Col9,10 as Col10,11 as Col11,12 as Col12,13 as Col13,14 as Col14,15 as Col15,16 as Col16,17 as Col17,18 as Col18,19 as Col19 UNION
SELECT 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 UNION
SELECT 7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25 UNION
SELECT 11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29 UNION
SELECT 14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32 UNION
SELECT 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35 UNION
SELECT 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39
) zzz
-- here is the X,Y cooronates to interpolates
SELECT * INTO #2RESOLVE
FROM
(
SELECT 17 as X, 33 as Y UNION -- 3.66257701
SELECT 19, 44 UNION -- 5.11648115
SELECT 24, 52 UNION -- 6.94579056
SELECT 34, 63 UNION -- 10.12166594
SELECT 41, 69 UNION -- 12.15974548
SELECT 56, 74 -- 15.67988759
) yyy
EXECUTE sp_execute_external_script @language = N'Python'
, @script = N'
import sys
from scipy import interpolate
xx = [login to view URL](X,Y,XY,kind=''cubic'' )
# loop all the #2RESOLVE X,Y to interpolates
print(xx(17,33))
'
,@input_data_1 = N'SELECT * FROM #X'
,@input_data_1_name = N'X'
,@input_data_2 = N'SELECT * FROM #Y'
,@input_data_2_name = N'Y'
,@input_data_3 = N'SELECT * FROM #XY'
,@input_data_3_name = N'XY'
,@output_data_1_name = N'OutputDataSet'
Projektin tunnus: #24045547
Tietoa projektista
3 freelanceria on tarjonnut keskimäärin $25 tähän työhön
Hello I have read your project carefully and we have made multiple projects like that before in our agency I can you a sample of our work please chat with me to make sure we are very experts at our work hope to hear fr Lisää
Hello, how are you? I am a senior python developer and have 6+ years long experience. My main skills in python are tensorflow, django and Microsoft SQL Server. Especially, i have full experience building website using Lisää
Hi, I am interested in your proposal. I am a Python and Oracle (OCA and OCP certified) developer. Connect me so that we can take it forward.