Azure / azure-documentdb-datamigrationtool

Azure DocumentDB Data Migration Tool
MIT License
387 stars 183 forks source link

Azure Cosmos Db (source) to Azure Cosmos Db (sink) bulk import fails from missing methods #84

Closed benjspriggs closed 5 years ago

benjspriggs commented 5 years ago

summary

Importing sequential documents between Azure Cosmos DB collections fails with:

Method not found: 'System.Threading.Tasks.Task1<Microsoft.Azure.Documents.Client.ResourceResponse1> Microsoft.Azure.Documents.Client.DocumentClient.UpsertDocumentAsync(System.String, System.Object, Microsoft.Azure.Documents.Client.RequestOptions, Boolean)

reproduction

Reproduced on dt.exe downloaded from v1.8, as well as on dtgui.exe.

./dt.exe /ErrorLog:... /OverwriteErrorLog /s:DocumentDB "/s.ConnectionString:..." /s.Collection:/// '/s.Query:"..."' /t:DocumentDB "/t.ConnectionString:..." /t.CollectionThroughput:... /t.IdField:id /t.DisableIdGeneration /t.UpdateExisting /t.Collection:... /t.PartitionKey:...

I attempted building both the console and WPF apps from source, and got similar errors.

VS details

Visual Studio version:

Microsoft Visual Studio Enterprise 2017 
Version 15.9.9
VisualStudio.15.Release/15.9.9+28307.518
Microsoft .NET Framework
Version 4.7.03190

Installed Version: Enterprise

ADL Tools Service Provider   1.0
This package contains services used by Data Lake tools

AetherVSPackage   1.0
Beta of Aether as VS plugin

ASP.NET and Web Tools 2017   15.9.04012.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services   15.8.31590
Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2017   5.2.60913.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.9.03024.0
Azure App Service Tools v3.0.0

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.3.7000.2
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools   15.9.02046.0
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio   2.3.7000.2
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools   2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

EZ-GIT   1.9.0

Fabric.DiagnosticEvents   1.0
Fabric Diagnostic Events

JavaScript Language Service   2.0
JavaScript Language Service

JetBrains ReSharper Ultimate 2018.3.4   Build 183.0.20190304.43214
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2019 JetBrains, Inc.

Microsoft Azure HDInsight Azure Node   2.3.7000.2
HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service   2.3.7000.2
Language service for Hive query

Microsoft Azure Service Fabric Tools for Visual Studio   2.4
Microsoft Azure Service Fabric Tools for Visual Studio

Microsoft Azure Stream Analytics Language Service   2.3.7000.2
Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node   1.0
Azure Stream Analytics Node under Azure Node

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.0.0

Microsoft Continuous Delivery Tools for Visual Studio   0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager   1.0
Install client-side libraries easily to any web project

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio Tools for Containers   1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

NuGet Package Manager   4.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Redgate SQL Change Automation   3.0.19080.6206
Extend DevOps processes to your SQL Server databases and safely automate database deployments.

Visit https://www.red-gate.com/sca/productpage for more information.

Copyright (C) 2011 Red Gate Software Ltd. All rights reserved.

This software contains components from Component Owl.
SQL Server is a registered trademark of Microsoft Corporation.
Visual Studio is a registered trademark of Microsoft Corporation.

SQL Change Automation contains code from the following open source software:

NuGet https://www.nuget.org/
SQL LocalDB Wrapper https://github.com/martincostello/sqllocaldb
Autofac https://autofac.org/
Json.NET https://json.net/
MahApps.Metro http://mahapps.com/
SemVer https://github.com/maxhauser/semver
Log4Net http://logging.apache.org/log4net/
StringTemplate https://github.com/antlr/stringtemplate4
Extended WPF Toolkit https://wpftoolkit.codeplex.com/
Code InfoBox VSX http://www.codeproject.com/Articles/55196/Code-InfoBox-Visual-Studio-Extension-VSX
OctoPack https://github.com/OctopusDeploy/OctoPack
SQLite https://sqlite.org/

This product contains icons from http://www.visualpharm.com distributed under a free backlink license.

For license details or other notices relating to the above software, please see NOTICE.TXT and EULA.rtf in the SQL Change Automation application folder.

Redgate SQL Prompt   9.4.3.7121
Write, format, and refactor SQL effortlessly

Redgate SQL Search   3.2.4.2262
Search functionality for SQL Server databases, from within Visual Studio

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

Snapshot Debugging Extension   1.0
Snapshot Debugging Visual Studio Extension Detailed Info

SQL Server Data Tools   15.1.61903.01040
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript Tools   15.9.20918.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.2 for F# 4.5   15.8.0.0.  Commit Hash: 6e26c5bacc8c4201e962f5bdde0a177f82f88691.
Microsoft Visual F# Tools 10.2 for F# 4.5

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Containers   1.0
Visual Studio Tools for Containers

VsVim   2.6.0.0
VsVim is a Vim emulator for Visual Studio
dsm0880 commented 5 years ago

Yeah, same issue here going from JSON files to Cosmos DB.

krigit commented 5 years ago

Importing between Cosmos DB collections fails on CreateDocumentAsync for me using dtgui.exe: Method not found: 'System.Threading.Tasks.Task1<Microsoft.Azure.Documents.Client.ResourceResponse1> Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentAsync(System.String, System.Object, Microsoft.Azure.Documents.Client.RequestOptions, Boolean)'

nikpelgr commented 5 years ago

I see the same error when importing from SQL Server, CSV, JSON, Azure BLOB.

haitsongmsft commented 5 years ago

fix being CR-ed.

haitsongmsft commented 5 years ago

PR merged

benjspriggs commented 5 years ago

@haitsongmsft Which PR is this issue addressed in?