Skip to content

Instantly share code, notes, and snippets.

@feaselkl
Created March 19, 2021 22:39
Show Gist options
  • Save feaselkl/dbd4d08ab0d579a88340af2d188e1e8c to your computer and use it in GitHub Desktop.
Save feaselkl/dbd4d08ab0d579a88340af2d188e1e8c to your computer and use it in GitHub Desktop.
Read from Azure SQL Database in Azure Machine Learning and subsequently writing back to Azure SQL Database
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@C1022G-Thanh-Tu
Copy link

Could you support me by giving me the required Tables (ExpenseReport, ExpenseCategory, Employee and ExpenseReportPrediction Table
) so that I could execute this job? Because I got errors when insert data into ExpenseReportPrediction Table

@C1022G-Thanh-Tu
Copy link

Error I got is "errorCode=DelimitedTextMoreColumnsThanDefined,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Error found when processing 'Csv/Tsv Format Text' source '.git/objects/pack/pack-8b9715f5fd992316813d506c697e5726410ab52c.rev' with row number 2: found more columns than expected column count 1.,Source=Microsoft.DataTransfer.Common,'","

@feaselkl
Copy link
Author

@C1022G-Thanh-Tu
Copy link

Hi, I follow your instruction and encounter this error

When using the blob_datastore.upload function with the src_dir='data' and target_path='ExpenseReportPrediction' parameters, the operation uploads all files from the data directory to the ExpenseReportPrediction path in the Blob Storage. Currently, the data directory contains three files: one CSV file (predictions.csv) and two additional files generated automatically by the machine learning process. As a result, when referring to the ExpenseReportPrediction path for data insertion into the SQL table, all three files are considered, which leads to unintended files being processed and inserted into the table.

Could you support me how to resolve this error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment