<?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 Re: How to upload a file - Create table - API https://*****.com.au in Developers</title>
    <link>https://communities.sas.com/t5/Developers/How-to-upload-a-file-Create-table-API/m-p/962534#M6621</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/472193"&gt;@PabloZ&lt;/a&gt;&amp;nbsp;@,&lt;/P&gt;
&lt;P&gt;Did the reply from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/474245"&gt;@DayaB&lt;/a&gt;&amp;nbsp;@&amp;nbsp;solve your issue? If so, we'll mark it as the solution.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Apr 2025 18:51:58 GMT</pubDate>
    <dc:creator>joeFurbee</dc:creator>
    <dc:date>2025-04-01T18:51:58Z</dc:date>
    <item>
      <title>How to upload a file - Create table - API</title>
      <link>https://communities.sas.com/t5/Developers/How-to-upload-a-file-Create-table-API/m-p/961736#M6612</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS version: SAS Viya LTS 2023.9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to make an API call to upload a file and create a table. I am using this link as a reference:&amp;nbsp;&lt;A href="https://developer.sas.com/rest-apis/dataTables/createTableFromMultipart" target="_self"&gt;https://developer.sas.com/rest-apis/dataTables/createTableFromMultipart.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am doing this through Postman for testing purposes, here is code in Python:&lt;/P&gt;&lt;PRE&gt;import requests

url = "https://*****.com.au/dataTables/dataSources/Compute~fs~be7240bc-96e9-4eff-b3f9-ba9e23d7d3b2~fs~WORK/tables"

payload = {'tableRequest': '{
    "sourceArguments": {
        "delimiter": ",",
        "firstRowHasColumnNames": true
    },
    "targetArguments": {
        "tableName": "IMPORT_TEST_NONADMITTED_TEST",
        "replace": true,
        "columnDefinitions": [
            { "name": "RecordID", "type": "numeric", "informat": "BEST32.", "format": "BEST12." },
            { "name": "T2Clinicv7", "type": "numeric", "informat": "BEST32.", "format": "BEST12." },
            { "name": "fundingsource", "type": "numeric", "informat": "BEST32.", "format": "BEST12." },
            { "name": "STATE", "type": "numeric", "informat": "BEST32.", "format": "BEST12." },
            { "name": "indstat", "type": "numeric", "informat": "BEST32.", "format": "BEST12." },
            { "name": "bir_date", "type": "date", "informat": "DDMMYY8.", "format": "DDMMYY8." },
            { "name": "service_date", "type": "date", "informat": "DDMMYY8.", "format": "DDMMYY8." },
            { "name": "Postcode", "type": "character", "length": 6 },
            { "name": "SA2", "type": "numeric", "informat": "BEST32.", "format": "BEST12." },
            { "name": "pat_multiprov_flag", "type": "numeric", "informat": "BEST32.", "format": "BEST12." },
            { "name": "est_eligible_paed_flag", "type": "numeric", "informat": "BEST32.", "format": "BEST12." },
            { "name": "estabid", "type": "character", "length": 9 }
        ]
    }
}'}
files=[
  ('file',('test_data_non_admitted.csv',open('/C:/****/test_data_non_admitted.csv','rb'),'text/csv'))
]
headers = {
  'Content-Item-Type': 'application/vnd.sas.data.table.cas.delimited.request+json',
  'Content-Type': 'multipart/form-data',
  'Authorization': '***********',
  'Cookie': '***********'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)&lt;/PRE&gt;&lt;P&gt;Thi is the response I am receiving:&lt;/P&gt;&lt;PRE&gt;{
    "httpStatusCode": 503,
    "errorCode": 11916,
    "message": "The provider for the source \"Compute~fs~be7240bc-96e9-4eff-b3f9-ba9e23d7d3b2~fs~WORK\" is not available, or it is currently starting up.",
    "details": [
        "path: /dataTables/dataSources/Compute~fs~be7240bc-96e9-4eff-b3f9-ba9e23d7d3b2~fs~WORK/tables",
        "correlator: 65510512-b779-484e-8c1a-eef71fa7bac9"
    ]
}&lt;/PRE&gt;&lt;P&gt;Any ideas of how to make this work will be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pablo&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 23:02:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-upload-a-file-Create-table-API/m-p/961736#M6612</guid>
      <dc:creator>PabloZ</dc:creator>
      <dc:date>2025-03-12T23:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload a file - Create table - API https://*****.com.au</title>
      <link>https://communities.sas.com/t5/Developers/How-to-upload-a-file-Create-table-API/m-p/961990#M6613</link>
      <description>&lt;P&gt;Before trying to upload you should check that you can connect to &lt;A href="https://*****.com.au" target="_blank"&gt;https://*****.com.au&lt;/A&gt; from Python.&lt;/P&gt;
&lt;P&gt;Can you?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 07:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-upload-a-file-Create-table-API/m-p/961990#M6613</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2025-03-17T07:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload a file - Create table - API https://*****.com.au</title>
      <link>https://communities.sas.com/t5/Developers/How-to-upload-a-file-Create-table-API/m-p/962018#M6614</link>
      <description>&lt;P&gt;The said error is returned when Compute service is unavailable. To verify it is running, see if GET&amp;nbsp;&lt;A href="https://*****.com.au/dataSources/providers/Compute/sources" target="_blank" rel="noopener"&gt;https://*****.com.au/dataSources/providers/Compute/sources&lt;/A&gt;&amp;nbsp;request is successfully processed.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 17:15:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-upload-a-file-Create-table-API/m-p/962018#M6614</guid>
      <dc:creator>DayaB</dc:creator>
      <dc:date>2025-03-17T17:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload a file - Create table - API https://*****.com.au</title>
      <link>https://communities.sas.com/t5/Developers/How-to-upload-a-file-Create-table-API/m-p/962033#M6615</link>
      <description>&lt;P&gt;I am running the test through Postman and I am able to make API calls succesfully, I can even run jobs from the API, my issue is trying to upload a file to create a table.&lt;BR /&gt;Here is an example showing that a GET call is working:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PabloZ_0-1742253859079.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105462i498E2920549C887E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PabloZ_0-1742253859079.png" alt="PabloZ_0-1742253859079.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 23:24:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-upload-a-file-Create-table-API/m-p/962033#M6615</guid>
      <dc:creator>PabloZ</dc:creator>
      <dc:date>2025-03-17T23:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload a file - Create table - API https://*****.com.au</title>
      <link>https://communities.sas.com/t5/Developers/How-to-upload-a-file-Create-table-API/m-p/962035#M6616</link>
      <description>&lt;P&gt;Hi Daya,&lt;BR /&gt;That GET request is succesfulllt processed:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PabloZ_0-1742253949220.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105463iF1F959F435CD71FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PabloZ_0-1742253949220.png" alt="PabloZ_0-1742253949220.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 23:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-upload-a-file-Create-table-API/m-p/962035#M6616</guid>
      <dc:creator>PabloZ</dc:creator>
      <dc:date>2025-03-17T23:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload a file - Create table - API https://*****.com.au</title>
      <link>https://communities.sas.com/t5/Developers/How-to-upload-a-file-Create-table-API/m-p/962040#M6617</link>
      <description>&lt;P&gt;Hello Pablo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I see the issue. You are trying to create a table using Compute provider. Unfortunately Compute provider (service) is not registered with capability for creating tables. Currently only cas provider allows table creation. You can try creating the table in cas.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 02:23:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-upload-a-file-Create-table-API/m-p/962040#M6617</guid>
      <dc:creator>DayaB</dc:creator>
      <dc:date>2025-03-18T02:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload a file - Create table - API https://*****.com.au</title>
      <link>https://communities.sas.com/t5/Developers/How-to-upload-a-file-Create-table-API/m-p/962534#M6621</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/472193"&gt;@PabloZ&lt;/a&gt;&amp;nbsp;@,&lt;/P&gt;
&lt;P&gt;Did the reply from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/474245"&gt;@DayaB&lt;/a&gt;&amp;nbsp;@&amp;nbsp;solve your issue? If so, we'll mark it as the solution.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2025 18:51:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-upload-a-file-Create-table-API/m-p/962534#M6621</guid>
      <dc:creator>joeFurbee</dc:creator>
      <dc:date>2025-04-01T18:51:58Z</dc:date>
    </item>
  </channel>
</rss>

