Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scriptability import failing #177

Open
3 tasks done
jhughes-naic opened this issue Oct 11, 2024 · 2 comments
Open
3 tasks done

scriptability import failing #177

jhughes-naic opened this issue Oct 11, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jhughes-naic
Copy link

First Stop

  • I have read and agreed to the ThoughtSpot Dev Tools EULA.
  • I understand that if I have a critical issue with ThoughtSpot, I should reach out to my designated Account Executive and Solutions Consultant team instead of cs_tools.
  • I searched the cs_tools documentation, with the integrated search.

Platform Configuration

cs-tools-info-2024-10-11

Description

Recently upgraded to the new version of cs_tools. It appears the required input changed. In the past the following would import the tml to our ThoughtSpot cloud account without issue.

cs_tools tools scriptability import JASON.table.tml --import-policy ALL_OR_NONE --tags Jason-Table --share-with EA_TEAM_ROLE --config prod

However, with the new version I receive a [17:25:58] ERROR Directory 'JASON.table.tml' is a file.

If it try to run the following command using a directory instead of a file I get the following.

cs_tools tools scriptability import /Users/jhughes/Desktop/tml --import-policy ALL_OR_NONE --tags Jason-Table --share-with EA_TEAM_ROLE --config prod --source whats --dest this
[17:29:27] INFO     Attempting Basic authentication                                                                                             thoughtspot.py:212
/Users/jhughes/Library/Application Support/cs_tools/.cs_tools/lib/python3.10/site-packages/pydantic/main.py:390: UserWarning: Pydantic serializer warnings:
  Expected `datetime` but got `str` with value `'2024-10-11T22:29:26.651418Z'` - serialized value may not be as expected
  return self.__pydantic_serializer__.to_python(
                            ╭─ /Users/jhughes/Desktop/NAIC_Code/python-scripts/output/2023_public/health is not a TML file system. ─╮                             
                            │ You can only import from a TML file system.                                                           │                             
                            │                                                                                                       │                             
                            │ Mitigation                                                                                            │                             
                            │ Verify the the directory is the root of a TML file system.                                            │                             
                            ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯       

What is a TML file system? I used thoughtspot_tml to generate the files. Not sure what --source and --dest is all about either. Guidence requested. We have thousands of tables and scripting import is vital.

Need to upload log files securely?

No response

@jhughes-naic jhughes-naic added the bug Something isn't working label Oct 11, 2024
@billdback-ts
Copy link
Collaborator

Scriptability v 3 had pretty significant updates. It's worth checking out the docs since they discuss some of the changes, but I'll give a brief overview here.

  • TML file system is simply a file system for organizing TML files. It expects a particular structure with TML files in the appropriate locations. You can run scriptability tmlfs init to create a new file system (docs). Note that they are created automatically on export.
  • source and dest are the and for TML and are used for GUID mappings. See docs. So let's say you have TML from dev and are moving it to prod. You would use --source dev --dest prod and it will create a mapping file that's used for future imports. The strings allow you to have multiple source/destination combos for flexibility, so you might have for different product lines, etc.
  • Scriptability does still support importing a specific file using the --guid flag and specifying the GUID of the object to import. You can also include or exclude file types.

@jhughes-naic
Copy link
Author

Thank you! I'll review the docs and see what changes I need to make to my scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants