An UpdateAttribute could also be used to update the mime.type, e.g. to text/csv.
I'd think the csv record writer should probably do this automatically though, so maybe worth a jira to correct that (I'm reasonably sure the existing json and avro writers do that, for example). On Sun, 24 Sept 2023, 23:52 James McMahon, <[email protected]> wrote: > That was it. I was missing the forest for the trees, yet again <lol>. I do > all the hard work and then forget to IdentifyMimeType at the end. > Thanks very much Joe. > Jim > > On Sun, Sep 24, 2023 at 6:30 PM Joe Witt <[email protected]> wrote: > >> Jim, >> >> Before you try to view it you can likely run it through >> IdentifyMimeType. As you note the conversion from XLS to CSV happens but >> we still see a mime type of 'application/vnd. >> openxmlformats-officedocument.spreadsheetml.sheet' so that is likely >> causing it to not even attempt to display. So after your python script >> execution run the data through IdentifyMimeType then you can likely view it >> just fine. >> >> Thanks >> >> On Sun, Sep 24, 2023 at 3:21 PM James McMahon <[email protected]> >> wrote: >> >>> I sure can Joe. Here they are: >>> >>> RouteOnAttribute.Route >>> isExcel >>> execution.command >>> /usr/bin/python3 >>> execution.command.args >>> /opt/nifi/config_resources/scripts/excelToCSV.py >>> execution.error >>> Empty string set >>> execution.status >>> 0 >>> filename >>> Alltables.csv >>> hash.value.md5 >>> b48840c161b645a0169e622dcb8f5083 >>> hash.value.sha256 >>> 4847ac157fd30d6f2e53cb3c4e879ae063d498709da2686c6f61ba6019456afa >>> isChild >>> false >>> mime.extension >>> .xlsx >>> mime.type >>> application/vnd.openxmlformats-officedocument.spreadsheetml.sheet >>> parent.MD5 >>> b48840c161b645a0169e622dcb8f5083 >>> parent.SHA256 >>> 4847ac157fd30d6f2e53cb3c4e879ae063d498709da2686c6f61ba6019456afa >>> path >>> ./ >>> s3.bucket >>> rampart-raw-data >>> s3.encryptionStrategy >>> SSE_S3 >>> s3.etag >>> b48840c161b645a0169e622dcb8f5083 >>> s3.isLatest >>> true >>> s3.lastModified >>> 1672701227000 >>> s3.length >>> 830934 >>> s3.owner >>> b34a7aa80a4130503fee2e8d4c2b674e154af3c4db69db9a4e3bff8a47cc92d1 >>> s3.sseAlgorithm >>> AES256 >>> s3.storeClass >>> STANDARD >>> s3.version >>> null >>> sourcing.MD5 >>> b48840c161b645a0169e622dcb8f5083 >>> sourcing.SHA256 >>> 4847ac157fd30d6f2e53cb3c4e879ae063d498709da2686c6f61ba6019456afa >>> sourcing.sourceMD5 >>> b48840c161b645a0169e622dcb8f5083 >>> sourcing.sourceSHA256 >>> 4847ac157fd30d6f2e53cb3c4e879ae063d498709da2686c6f61ba6019456afa >>> triage.datatype >>> excel >>> uuid >>> d72ec2e9-cfbd-435e-9954-4f7fae55c550 >>> >>> Thanks for any help. Perhaps my data is there but I simply can't render >>> it in the Viewer? >>> Jim >>> >>> On Sun, Sep 24, 2023 at 6:08 PM Joe Witt <[email protected]> wrote: >>> >>>> Jim, >>>> >>>> If a content type attribute exists and is not a type NiFi understands >>>> it will not be able to render it. Can you show what flowfile attributes >>>> are present at the point you attempt to view it? >>>> >>>> Thanks >>>> >>>> On Sun, Sep 24, 2023 at 3:03 PM James McMahon <[email protected]> >>>> wrote: >>>> >>>>> Hello. I have converted incoming Excel files to csv. I'd like to look >>>>> at the result, but when I select my flowfiles from the output queue, I can >>>>> only select "View as hex" - but I cannot get the display to show me the >>>>> records in the form I expect. Viewing them using the hex display is not >>>>> helpful. >>>>> >>>>> How can I fix this viewing issue? >>>>> >>>>> Here is an example of what I can see: >>>>> >>>>> 0x00000000 22 54 61 62 6C 65 20 31 2E 20 20 45 73 74 69 6D "Table 1. >>>>> Estim >>>>> 0x00000010 61 74 65 64 20 4D 6F 6E 74 68 6C 79 20 53 61 6C ated >>>>> Monthly Sal >>>>> 0x00000020 65 73 20 61 6E 64 20 49 6E 76 65 6E 74 6F 72 69 es and >>>>> Inventori >>>>> 0x00000030 65 73 20 66 6F 72 20 4D 61 6E 75 66 61 63 74 75 es for >>>>> Manufactu >>>>> 0x00000040 72 65 72 73 2C 20 52 65 74 61 69 6C 65 72 73 2C rers, >>>>> Retailers, >>>>> 0x00000050 20 61 6E 64 20 4D 65 72 63 68 61 6E 74 20 57 68 and >>>>> Merchant Wh >>>>> 0x00000060 6F 6C 65 73 61 6C 65 72 73 22 2C 55 6E 6E 61 6D >>>>> olesalers",Unnam >>>>> 0x00000070 65 64 3A 20 31 2C 55 6E 6E 61 6D 65 64 3A 20 32 ed: >>>>> 1,Unnamed: 2 >>>>> 0x00000080 2C 55 6E 6E 61 6D 65 64 3A 20 33 2C 55 6E 6E 61 ,Unnamed: >>>>> 3,Unna >>>>> 0x00000090 6D 65 64 3A 20 34 2C 55 6E 6E 61 6D 65 64 3A 20 med: >>>>> 4,Unnamed: >>>>> 0x000000A0 35 2C 55 6E 6E 61 6D 65 64 3A 20 36 2C 55 6E 6E 5,Unnamed: >>>>> 6,Unn >>>>> 0x000000B0 61 6D 65 64 3A 20 37 2C 55 6E 6E 61 6D 65 64 3A amed: >>>>> 7,Unnamed: >>>>> 0x000000C0 20 38 2C 55 6E 6E 61 6D 65 64 3A 20 39 2C 55 6E 8,Unnamed: >>>>> 9,Un >>>>> 0x000000D0 6E 61 6D 65 64 3A 20 31 30 2C 55 6E 6E 61 6D 65 named: >>>>> 10,Unname >>>>> 0x000000E0 64 3A 20 31 31 2C 55 6E 6E 61 6D 65 64 3A 20 31 d: >>>>> 11,Unnamed: 1 >>>>> 0x000000F0 32 0A 28 49 6E 20 6D 69 6C 6C 69 6F 6E 73 20 6F 2.(In >>>>> millions o >>>>> 0x00000100 66 20 64 6F 6C 6C 61 72 73 29 2C 2C 2C 2C 2C 2C f >>>>> dollars),,,,,, >>>>> 0x00000110 2C 2C 2C 2C 2C 2C 0A 2C 2C 2C 2C 2C 2C 2C 2C 2C >>>>> ,,,,,,.,,,,,,,,, >>>>> 0x00000120 2C 2C 2C 0A 2C 53 61 6C 65 73 2C 30 2C 30 2C 49 >>>>> ,,,.,Sales,0,0,I >>>>> 0x00000130 6E 76 65 6E 74 6F 72 69 65 73 2C 30 2C 30 2C 49 >>>>> nventories,0,0,I >>>>> 0x00000140 6E 76 65 6E 74 6F 72 69 65 73 2F 53 61 6C 65 73 >>>>> nventories/Sales >>>>> 0x00000150 20 52 61 74 69 6F 73 2C 30 2C 30 2C 2C 2C 0A 2C >>>>> Ratios,0,0,,,., >>>>> 0x00000160 4F 63 74 2E 20 32 30 32 32 2C 53 65 70 2E 20 32 Oct. >>>>> 2022,Sep. 2 >>>>> 0x00000170 30 32 32 2C 4F 63 74 2E 20 32 30 32 31 2C 4F 63 022,Oct. >>>>> 2021,Oc >>>>> 0x00000180 74 2E 20 32 30 32 32 2C 53 65 70 2E 20 32 30 32 t. >>>>> 2022,Sep. 202 >>>>> 0x00000190 32 2C 4F 63 74 2E 20 32 30 32 31 2C 4F 63 74 2E 2,Oct. >>>>> 2021,Oct. >>>>> 0x000001A0 20 32 30 32 32 2C 53 65 70 2E 20 32 30 32 32 2C 2022,Sep. >>>>> 2022, >>>>> 0x000001B0 4F 63 74 2E 20 32 30 32 31 2C 2C 2C 0A 2C 28 70 Oct. >>>>> 2021,,,.,(p >>>>> 0x000001C0 29 2C 28 72 29 2C 28 72 29 2C 28 70 29 2C 28 72 >>>>> ),(r),(r),(p),(r >>>>> 0x000001D0 29 2C 28 72 29 2C 28 70 29 2C 28 72 29 2C 28 72 >>>>> ),(r),(p),(r),(r >>>>> 0x000001E0 29 2C 2C 2C 0A 20 41 64 6A 75 73 74 65 64 31 2C ),,,. >>>>> Adjusted1, >>>>> 0x000001F0 2C 2C 2C 2C 2C 2C 2C 2C 2C 2C 2C 0A 20 20 20 20 >>>>> ,,,,,,,,,,,. >>>>> 0x00000200 20 20 20 20 54 6F 74 61 6C 20 62 75 73 69 6E 65 Total >>>>> busine >>>>> 0x00000210 73 73 E2 80 A6 E2 80 A6 E2 80 A6 E2 80 A6 E2 80 >>>>> ss.............. >>>>> 0x00000220 A6 E2 80 A6 E2 80 A6 E2 80 A6 E2 80 A6 E2 80 A6 >>>>> ................ >>>>> 0x00000230 E2 80 A6 E2 80 A6 E2 80 A6 E2 80 A6 E2 80 A6 E2 >>>>> ................ >>>>> 0x00000240 80 A6 E2 80 A6 E2 80 A6 E2 80 A6 E2 80 A6 E2 80 >>>>> ................ >>>>> 0x00000250 A6 2C 31 38 35 39 34 38 36 2C 31 38 34 35 32 32 >>>>> .,1859486,1....and >>>>> it continues like this. >>>>> >>>>> Thanks in advance for your help. >>>>> >>>>> Jim. >>>>> >>>>
