h
This commit is contained in:
parent
c6483fc621
commit
513aba2a49
15
.vscode/launch.json
vendored
Normal file
15
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Python: Current File",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "${file}",
|
||||
"console": "integratedTerminal"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -16,14 +16,19 @@ def checkFile(file):
|
||||
if(x.find("DTS:ObjectName")>-1):
|
||||
propertyNameTokens=x.split('=')
|
||||
count=0
|
||||
propertyNameToken=None
|
||||
while count < len(propertyNameTokens):
|
||||
if(propertyNameTokens[count].find("DTS:ObjectName")>-1):
|
||||
propertyNameToken=propertyNameTokens[count+1].split('"')[1]
|
||||
break
|
||||
count+=2
|
||||
if(propertyNameToken==None):
|
||||
print(f"propertyNameToken findes ikke i {file.name}")
|
||||
continue
|
||||
if(file.stem!=propertyNameToken):
|
||||
ssisproject=[a for a in file.parts if a.find("SSIS_")>-1]
|
||||
if(len(ssisproject)>0):
|
||||
#insertOrUpdateTable(ssisproject[0],str(file.parent),str(file.stem),propertyNameToken)
|
||||
insertIntoTable(ssisproject[0],str(file.parent),str(file.stem),propertyNameToken)
|
||||
print(ssisproject[0] + ' ' + str(file.parent) + ' ' + file.stem + ' ' + propertyNameToken)
|
||||
print(x)
|
||||
@ -33,7 +38,16 @@ def checkFile(file):
|
||||
f.close()
|
||||
def insertIntoTable(ssisproject,tfspath,packagename,packagenameproperty):
|
||||
curser.execute("insert into [UDV_denker].[dbo].[ssispackages](SSISProject,tfspath,PackageName,PackageNameProperty,ITPUpdate,ITUUpdate) values (?,?,?,?,?,?)",(ssisproject,tfspath,packagename,packagenameproperty,0,0))
|
||||
|
||||
|
||||
def insertOrUpdateTable(ssisproject,tfspath,packagename,packagenameproperty):
|
||||
return
|
||||
|
||||
def updateTableIndex():
|
||||
curser.execute("select id,tfspath from [UDV_denker].[dbo].[ssispackages]")
|
||||
return
|
||||
|
||||
curser=cnxn.cursor()
|
||||
updateTableIndex()
|
||||
[traverseDirectory(x) for x in p.iterdir() if x.is_dir()]
|
||||
cnxn.commit()
|
||||
cnxn.close()
|
||||
Loading…
x
Reference in New Issue
Block a user