<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic curl: (26) Failed to open/read local data from file/application in DBFS in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/curl-26-failed-to-open-read-local-data-from-file-application-in/m-p/54916#M30198</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am trying to upload a parquet file from S3 to dbfs with airflow bash operator curl command using Databricks python Rest API's as shown below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;databricks_load_task = BashOperator(
        task_id="upload_to_databricks",
        bash_command = """
   
        curl --location --request POST {{task_instance.xcom_pull(task_ids='get_creds', key='DATABRICKS_HOST')}}/api/2.0/dbfs/put \
        --header "Authorization: Bearer {{task_instance.xcom_pull(task_ids='get_creds', key='DATABRICKS_TOKEN')}}" \
        --form contents="@s3://bucket/test/file.parquet"\
        --form path="{{task_instance.xcom_pull(task_ids='get_creds', key='UPLOAD_PATH')}}" \
        --form overwrite="true"
        """
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Parquet files stores the dataframe result. I am unable to upload&amp;nbsp; the file as it gives me the below error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;curl: (26) Failed to open/read local data from file/application&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I tried to replace the content from s3 path to text(--form contents="test text") this works for me. Please help me with this.&lt;/P&gt;&lt;P&gt;#dbfs&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Dec 2023 13:35:46 GMT</pubDate>
    <dc:creator>kavya08</dc:creator>
    <dc:date>2023-12-08T13:35:46Z</dc:date>
    <item>
      <title>curl: (26) Failed to open/read local data from file/application in DBFS</title>
      <link>https://community.databricks.com/t5/data-engineering/curl-26-failed-to-open-read-local-data-from-file-application-in/m-p/54916#M30198</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am trying to upload a parquet file from S3 to dbfs with airflow bash operator curl command using Databricks python Rest API's as shown below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;databricks_load_task = BashOperator(
        task_id="upload_to_databricks",
        bash_command = """
   
        curl --location --request POST {{task_instance.xcom_pull(task_ids='get_creds', key='DATABRICKS_HOST')}}/api/2.0/dbfs/put \
        --header "Authorization: Bearer {{task_instance.xcom_pull(task_ids='get_creds', key='DATABRICKS_TOKEN')}}" \
        --form contents="@s3://bucket/test/file.parquet"\
        --form path="{{task_instance.xcom_pull(task_ids='get_creds', key='UPLOAD_PATH')}}" \
        --form overwrite="true"
        """
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Parquet files stores the dataframe result. I am unable to upload&amp;nbsp; the file as it gives me the below error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;curl: (26) Failed to open/read local data from file/application&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I tried to replace the content from s3 path to text(--form contents="test text") this works for me. Please help me with this.&lt;/P&gt;&lt;P&gt;#dbfs&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 13:35:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/curl-26-failed-to-open-read-local-data-from-file-application-in/m-p/54916#M30198</guid>
      <dc:creator>kavya08</dc:creator>
      <dc:date>2023-12-08T13:35:46Z</dc:date>
    </item>
  </channel>
</rss>

