Skip to content

Azure data factory Create a copy activity Error by python #701

Open

Description

Type of issue

Code doesn't work

Feedback

    # Create a copy activity
    act_name = 'copyBlobtoBlob'
    blob_source = BlobSource()
    blob_sink = BlobSink()
    dsin_ref = DatasetReference(reference_name=ds_name)
    dsOut_ref = DatasetReference(reference_name=dsOut_name)
    copy_activity = CopyActivity(name=act_name,inputs=[dsin_ref], outputs=[dsOut_ref], source=blob_source, sink=blob_sink)

this part is not working..
error is :

Cell In[13], [line 102](vscode-notebook-cell:?execution_count=13&line=102)
    [100](vscode-notebook-cell:?execution_count=13&line=100) blob_source = BlobSource()
    [101](vscode-notebook-cell:?execution_count=13&line=101) blob_sink = BlobSink()
--> [102](vscode-notebook-cell:?execution_count=13&line=102) dsin_ref = DatasetReference(reference_name=ds_name)
    [103](vscode-notebook-cell:?execution_count=13&line=103) dsOut_ref = DatasetReference(reference_name=dsOut_name)
    [104](vscode-notebook-cell:?execution_count=13&line=104) copy_activity = CopyActivity(name=act_name,inputs=[dsin_ref], outputs=[dsOut_ref], source=blob_source, sink=blob_sink)

TypeError: DatasetReference.__init__() missing 1 required keyword-only argument: 'type'

please help me
i following https://learn.microsoft.com/en-us/azure/data-factory/quickstart-create-data-factory-python

Page URL

https://learn.microsoft.com/en-us/azure/data-factory/quickstart-create-data-factory-python

Content source URL

https://learn.microsoft.com/en-us/azure/data-factory/quickstart-create-data-factory-python

Author

ganbaaelmer

Document Id

Article 05/15/2024

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions