Using data from SQL Table instead of File Geodatabase Table

by Deb   Last Updated February 11, 2019 08:22 AM

Does anyone know of a method to use the table from SQL Server table using OS Authentication, instead of a File Geodatabase Table in ArcPy?

I have been using the below to reference the table

tableTemplate = r"C:\Data_table.gdb\DataTable"

where DataTable consists of a set of rows and columns. I have created a similar table in sql server and want to use the same instead of the above File Geodatabase Table.

I have tried the below so far with no luck:

arcpy.CreateDatabaseConnection_management(out_folder_path="Database Connections",

                                          out_name="DataTable.sde",

                                          database_platform="SQL_SERVER",

                                          instance="gis-server",

                                          account_authentication="OPERATING_SYSTEM_AUTH",

                                          database="TemporaryDatabase",

                                          version_type="TRANSACTIONAL",

                                          version="dbo.DEFAULT")
tableTemplate = r"Database Connections\TemporaryDatabase.sde"
Tags : arcpy python


Related Questions




Reducing function calls with Map

Updated November 08, 2018 11:22 AM

Update Data Driven Pages Index layer via Python

Updated May 28, 2015 00:09 AM