tinybird-cli 5.4.1.dev2__py3-none-any.whl → 5.4.1.dev3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
tinybird/__cli__.py CHANGED
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
4
4
  __url__ = 'https://www.tinybird.co/docs/cli/introduction.html'
5
5
  __author__ = 'Tinybird'
6
6
  __author_email__ = 'support@tinybird.co'
7
- __version__ = '5.4.1.dev2'
8
- __revision__ = '5e2ca7a'
7
+ __version__ = '5.4.1.dev3'
8
+ __revision__ = '8c78a34'
tinybird/datafile.py CHANGED
@@ -3047,20 +3047,14 @@ async def new_ds(
3047
3047
  and params.get("connector")
3048
3048
  and params.get("bucket_uri")
3049
3049
  ):
3050
- data = await client.preview_bucket(params["connector"], params["bucket_uri"])
3051
- if data:
3052
- files = data.get("files", [])
3053
- if len(files) > 0:
3054
- file_name = files[0].get("name", "")
3055
- extension = file_name.split(".")[-1]
3056
- if extension == "gz":
3057
- extension = file_name.split(".")[-2]
3058
- valid_formats = ["csv", "json", "jsonl", "ndjson", "parquet"]
3059
- if extension not in valid_formats:
3060
- raise Exception(
3061
- FeedbackManager.error_format(extension=extension, valid_formats=valid_formats)
3062
- )
3063
- params["format"] = extension
3050
+ bucket_uri = params.get("bucket_uri")
3051
+ extension = bucket_uri.split(".")[-1]
3052
+ if extension == "gz":
3053
+ extension = bucket_uri.split(".")[-2]
3054
+ valid_formats = ["csv", "json", "jsonl", "ndjson", "parquet"]
3055
+ if extension not in valid_formats:
3056
+ raise Exception(FeedbackManager.error_format(extension=extension, valid_formats=valid_formats))
3057
+ params["format"] = extension
3064
3058
  datasource_response = await client.datasource_create_from_definition(params)
3065
3059
  datasource = datasource_response.get("datasource", {})
3066
3060
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinybird-cli
3
- Version: 5.4.1.dev2
3
+ Version: 5.4.1.dev3
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -51,6 +51,11 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
51
51
  Changelog
52
52
  ----------
53
53
 
54
+ 5.4.1.dev3
55
+ **********
56
+
57
+ - `Changed` Internal change
58
+
54
59
  5.4.1.dev1
55
60
  **********
56
61
 
@@ -1,10 +1,10 @@
1
- tinybird/__cli__.py,sha256=bQsxglDNQkqHiVcuw5ahwfNSPDoOC3Wn6Xafw1cgvzo,254
1
+ tinybird/__cli__.py,sha256=PanQBFJTw32wDmj_B7RVzrBdQAYFx4hoD8VnhTkBQOI,254
2
2
  tinybird/check_pypi.py,sha256=_4NkharLyR_ELrAdit-ftqIWvOf7jZNPt3i76frlo9g,975
3
3
  tinybird/client.py,sha256=X9WYDS8gf07w0vncMMO7eeZj7G1D4vJAv9_npf1Otak,48339
4
4
  tinybird/config.py,sha256=LTHiR5JeAhslZCq4WaIZRW973KQMcEEC7TfN-uyS3wU,5397
5
5
  tinybird/connectors.py,sha256=lkpVSUmSuViEZBa4QjTK7YmPHUop0a5UFoTrSmlVq6k,15244
6
6
  tinybird/context.py,sha256=3KwB9TL-nON6qX9Mm5uev4CkrgLwYyNDvdFfQmNc0Cc,1171
7
- tinybird/datafile.py,sha256=AQpMsvSRplsyVUpFXokaXNEW5UxQwTafcZ13y_acIsg,219704
7
+ tinybird/datafile.py,sha256=y2TXSGj3WSf2otdn299L6fCWb1J-HUmlxxSv0yNCyw4,219373
8
8
  tinybird/datatypes.py,sha256=wwXaEy3l_UyfsH9xzYqBENQR7MSrFnDSvgS_CzLucOQ,10462
9
9
  tinybird/feedback_manager.py,sha256=Ks4ndSjLnxBv6HdE3QuJKpJsQvxWbHSDtqL8vvqMEgw,64780
10
10
  tinybird/git_settings.py,sha256=vu8sWb3TAXeM8Tqy27aR0el8MnPm7kqQzTRV76xB0ro,4707
@@ -36,8 +36,8 @@ tinybird/tb_cli_modules/workspace.py,sha256=TfKqSQuIk5JhG7Za4Z6e2uTwy4NhWPXLgZN2
36
36
  tinybird/tb_cli_modules/workspace_members.py,sha256=0nkaQJJdR_6rLnTeoK0eBkiDFnm4v7Z2oFGovY-jYMY,8446
37
37
  tinybird/tb_cli_modules/tinyunit/tinyunit.py,sha256=0dYYmZMMJVubxSPls2e_a-fqtUYvgLfu2B0xwLfkbHw,11667
38
38
  tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py,sha256=j92za8QbXrv4eIPjKBZPn9ghR-nYQ2wZZ88MeXyMWXE,1868
39
- tinybird_cli-5.4.1.dev2.dist-info/METADATA,sha256=2oSRHAAwQk_PVnZWMxIusA2OpDAA2NES3P50N2FzpJg,74818
40
- tinybird_cli-5.4.1.dev2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
41
- tinybird_cli-5.4.1.dev2.dist-info/entry_points.txt,sha256=PKPKuPmA4IfJYnCFHHUiw-aAWZuBomFvwCklv1OyCjE,43
42
- tinybird_cli-5.4.1.dev2.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
43
- tinybird_cli-5.4.1.dev2.dist-info/RECORD,,
39
+ tinybird_cli-5.4.1.dev3.dist-info/METADATA,sha256=rDh660UWQF5h59yzK98_6VEyZEtTKSnv_UcqyF7sJl0,74870
40
+ tinybird_cli-5.4.1.dev3.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
41
+ tinybird_cli-5.4.1.dev3.dist-info/entry_points.txt,sha256=PKPKuPmA4IfJYnCFHHUiw-aAWZuBomFvwCklv1OyCjE,43
42
+ tinybird_cli-5.4.1.dev3.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
43
+ tinybird_cli-5.4.1.dev3.dist-info/RECORD,,