thoughtspot / cs_tools

Scale your ThoughtSpot adoption with tools created by the ThoughtSpot Solutions Consulting organization.
https://thoughtspot.github.io/cs_tools/
Other
8 stars 6 forks source link

CSV Syncer Error in Windows #37

Closed aldrichsison-cwt closed 2 years ago

aldrichsison-cwt commented 2 years ago

First Stop

Description

Hi! I'm trying to test out the CSV Syncer in Windows. However, I'm stuck with an error when I try to run the following command: cs_tools config modify --config prod --syncer csv://$env:USERPROFILE\Downloads\report.toml

The error is:

Your csv syncer encountered an error.                                                                                                                                    main.py:209
           Couldn't read the Syncer definition at C:\Users\aldri\Downloads\report.toml

I already tried escaping backslashes in filepaths and flipping them, to no success.

boonhapus commented 2 years ago

Hi @aldrichsison-cwt , can I assume you were following our tutorial and ran into this issue?

Can you share the contents of your CSV syncer? Windows is always fun about slashes..

aldrichsison-cwt commented 2 years ago

Hi @boonhapus, yes, I was following the tutorial.

I just have this for CSV Syncer:

[configuration]
directory = "C:\\Users\\aldri\\Downloads\\"

then also tried:

[configuration]
directory = "C:/Users/aldri/Downloads/"
boonhapus commented 2 years ago

Did you save that file to C:\Users\aldri\Downloads ? I'm unable to reproduce the issue by running through the tutorial.

aldrichsison-cwt commented 2 years ago

Hi @boonhapus , Yes, the .toml file is saved in that directory. May I know if you're using Windows Terminal or PowerShell? And which version?

aldrichsison-cwt commented 2 years ago

And may I see sample setting of CSV Syncer inside a config file when it's set to default?

boonhapus commented 2 years ago

Here's one of my syncers that I use across many customer instances to quickly grab CSV files, which lives at C:\work\thoughtspot\cs_tools_dump\_csv-definition.toml

[configuration]
directory = 'C:\work\thoughtspot\cs_tools_dump\data\tmp-client'
delimiter = '|'
zipped = false

my command is then cs_tools tools searchable gather csv://C:\work\thoughtspot\cs_tools_dump\_csv-definition.toml

image image

boonhapus commented 2 years ago

And finally, Windows Terminal with the Powershell profile, though it's slightly customized as you can tell. It's all pretty stuff though, shouldn't impact tokenization and parsing of CLI args.

** Powershell naturally gives the same result.. consider wt leverages the PowerShell shell profile,

image

and powershell version, though I'm not sure tokenization has changed throughout the versions...

image

aldrichsison-cwt commented 2 years ago

Hi @boonhapus. Finally got it working. I did the following:

I'm guessing there is something like a permission setting with the previous path or file I used; probably why the program can't access or read the definition file.

Thank you so much for responding. Cheers!