Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcom-tp-etl-transformation-pipelines
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
general
bcom-tp-etl-transformation-pipelines
Commits
5fe4a975
Commit
5fe4a975
authored
Jul 27, 2023
by
Cristian Aguirre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 26-07-23. Issue 354
parent
82505e1b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
Mysql.py
dags/components/Databases/Mysql.py
+5
-1
Postgres.py
dags/components/Databases/Postgres.py
+5
-1
No files found.
dags/components/Databases/Mysql.py
View file @
5fe4a975
...
@@ -57,7 +57,11 @@ class Mysql:
...
@@ -57,7 +57,11 @@ class Mysql:
size
=
int
(
field
[
2
]
/
4
)
size
=
int
(
field
[
2
]
/
4
)
try
:
try
:
if
not
isinstance
(
field
[
3
],
type
(
None
))
and
field
[
3
]
>
0
:
if
not
isinstance
(
field
[
3
],
type
(
None
))
and
field
[
3
]
>
0
:
data_type
=
MysqlDataTypeORMEnum
[
MysqlDataTypeEnum
(
field
[
1
])
.
name
]
.
value
(
precision
=
field
[
2
],
scale
=
field
[
3
])
precision
,
scale
=
field
[
2
],
field
[
3
]
if
scale
>
precision
:
precision
=
field
[
3
]
scale
=
field
[
2
]
data_type
=
MysqlDataTypeORMEnum
[
MysqlDataTypeEnum
(
field
[
1
])
.
name
]
.
value
(
precision
=
precision
,
scale
=
scale
)
else
:
else
:
data_type
=
MysqlDataTypeORMEnum
[
MysqlDataTypeEnum
(
field
[
1
])
.
name
]
.
value
(
size
)
data_type
=
MysqlDataTypeORMEnum
[
MysqlDataTypeEnum
(
field
[
1
])
.
name
]
.
value
(
size
)
except
TypeError
:
except
TypeError
:
...
...
dags/components/Databases/Postgres.py
View file @
5fe4a975
...
@@ -59,7 +59,11 @@ class Postgres:
...
@@ -59,7 +59,11 @@ class Postgres:
if
field
[
2
]
!=
-
1
:
if
field
[
2
]
!=
-
1
:
try
:
try
:
if
not
isinstance
(
field
[
3
],
type
(
None
))
and
field
[
3
]
>
0
:
if
not
isinstance
(
field
[
3
],
type
(
None
))
and
field
[
3
]
>
0
:
data_type
=
PostgresDataTypeORMEnum
[
PostgresDataTypeEnum
(
field
[
1
])
.
name
]
.
value
(
precision
=
field
[
2
],
scale
=
field
[
3
])
precision
,
scale
=
field
[
2
],
field
[
3
]
if
scale
>
precision
:
precision
=
field
[
3
]
scale
=
field
[
2
]
data_type
=
PostgresDataTypeORMEnum
[
PostgresDataTypeEnum
(
field
[
1
])
.
name
]
.
value
(
precision
=
precision
,
scale
=
scale
)
else
:
else
:
data_type
=
PostgresDataTypeORMEnum
[
PostgresDataTypeEnum
(
field
[
1
])
.
name
]
.
value
(
field
[
2
])
data_type
=
PostgresDataTypeORMEnum
[
PostgresDataTypeEnum
(
field
[
1
])
.
name
]
.
value
(
field
[
2
])
except
TypeError
:
except
TypeError
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment