Closed devbrian closed 5 years ago
@hvermis to the rescue :)
try this: blob_source = AzureMySqlSource(query = "select * from SalesLT.Customer WHERE Title = 'Mr.'")
@hvermis same results, however I figured this out, for anyone that's interested:
AzureMySqlSource's query has no affect from what I could tell, you have to declare it as a SqlSource (no matter what the source actually is) and then pass the sql as a parameter for it to work. Not sure why the query parameter is an option for AzureMySqlSource, perhaps it's deprecated? Not sure.
@devbrian to confirm, are you copying data from Azure SQL DB or Azure Database for MySQL? SqlSource is for the former and AzureMySqlSource is for the latter - you can see the property name for query is different, see documentation at https://docs.microsoft.com/en-us/azure/data-factory/connector-azure-sql-database#copy-activity-properties and https://docs.microsoft.com/en-us/azure/data-factory/connector-azure-database-for-mysql#copy-activity-properties.
More info: please check each connector topic on which object type to use, in majority case it varies per connector.
here is my code, I can't seem to find a way to switch the source to use a query instead of table format for accessing the data.
If I set the query param
This does nothing and still returns the entire table